import wmi
c = wmi.WMI()
board_info = c.Win32_BaseBoard()[0]for board in c.Win32_BaseBoard():print("Manufacturer:", board.Manufacturer)# 这个属性获取主板的制造商信息。print("Product:", board.Product)# 这个属性获取主板的产品型号信息。print("Serial Number:", board.SerialNumber)# 这个属性获取主板的序列号信息。for processor in c.Win32_Processor():print("CPU Serial Number:", processor.ProcessorId.strip())# 硬盘序列号for disk in c.Win32_DiskDrive():print("Disk Serial Number:", disk.SerialNumber)# 计算机的 CPU 序列号for bios in c.Win32_BIOS():print("BIOS Serial Number:", bios.SerialNumber)# BIOS 序列号for os in c.Win32_OperatingSystem():print("操作系统唯一识别码:", os.SerialNumber)#