Getting Machine Serial Number With WMI Class

12.3k views Asked by At

I wrote this part of c# WMI Code for getting MotherBoard serial Number

ManagementObjectSearcher ComSerial = new ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard");

foreach (ManagementObject wmi in ComSerial.Get())
{
    try
    {
        MainBoard.Text = wmi.GetPropertyValue("SerialNumber").ToString();
    }
    catch { }
}

But in fact i want to learn PC(Machine) Serial Number(Written On PC Box'es top,bottom,right,left,front or back side).

In which table of Win32 has contains this information? I hope you understand me?

1

There are 1 answers

3
Black Frog On BEST ANSWER

The serial number is in the Win32_BIOS class.