Add motherboard information from the base board class

This commit is contained in:
Hoang Hong Quan
2024-10-02 14:54:57 +07:00
parent 71dba4e3f8
commit bd1ba0f2b4

View File

@@ -72,9 +72,13 @@ class WindowsHardwareInfo:
self.devices_by_class[device_class].append(device)
def motherboard(self):
base_board = c.Win32_BaseBoard()[0]
computer_system = c.Win32_ComputerSystem()[0]
system_name = " ".join((computer_system.Manufacturer.split()[0], computer_system.Model)).upper()
try:
system_name = " ".join((base_board.Manufacturer.split()[0], base_board.Product)).upper()
except:
system_name = " ".join((computer_system.Manufacturer.split()[0], computer_system.Model)).upper()
try:
device_id = self.parse_device_path(self.chipset_device.PNPDeviceID).get("Device ID")