I puzzle over how to do this. I found a link about 2 months ago that showed how to get one item from a wmi call.
class Sample
{
public static int Main(string[] args)
{
ManagementObject o =
new ManagementObject("Win32_Service.Name='Alerter'");
ManagementObject mObj =
new ManagementObject(
"\\\\MyServer\\root\\MyApp:MyClass.Key='abc'");
return 0;
}
}
which I thought was awesome because it returns results much faster than by doing a full search through WMI to get 1 property. I played with it and got this code to work with Win32_ComputerSystem, and I think I even got it to work with Win32_DiskDrive and, possibly, BaseBoard, but I can’t remember my head since I can’t find this particular code bit So, now I'm trying to get it to work with Win32_BIOS and continue to work out. I can't seem to find the key property so that it returns a valid result.
I tried the following paths to no avail.
\\.\root\cimv2:Win32_BIOS.SoftwareElementState=3
\\.\root\cimv2:Win32_BIOS.TargetOperatingSystem=0
\\.\root\cimv2:Win32_BIOS.SoftwareElementState=3,TargetOperatingSystem=0
2 , Win32_BIOS, - .. - , . , BIOS. , , . ?