Hi all.
I'm having some difficulty getting some hardware info
I can get the Hdd serial, and CPUID.
string cpuInfo = string.Empty;
ManagementClass managementClass = new ManagementClass("win32_processor");
ManagementObjectCollection managementObjectCollection = managementClass.GetInstances();
foreach (ManagementObject managementObject in managementObjectCollection)
{
if (cpuInfo == "")
{
//Get only the first CPU's ID
cpuInfo = managementObject.Properties["processorID"].Value.ToString();
managementObject.Dispose();
break;
}
}
MessageBox.Show(cpuInfo);
string hdd = "c";
ManagementObject disk = new ManagementObject(@"win32_logicaldisk.deviceid=""" + hdd + @":""");
disk.Get();
string volumeSerial = disk["VolumeSerialNumber"].ToString();
disk.Dispose();
MessageBox.Show(volumeSerial);
But I cannot find a way to get Bios and motherboard info.
Love any help if you can offer it.