Im trying to get some system information using WMI
but the problem is when i want to get for example Graphic Card information .. i get many drivers (real & virtual)
ManagementObjectSearcher searcher = new ManagementObjectSearcher("select Name from " + key);
foreach (ManagementObject share in searcher.Get())
{
Console.WriteLine(share["Name"].ToString());
}
The result was :
Radmin Mirror Driver v3
ATI Mobility Radeon HD 5650
LogMeIn Mirror Driver
PCI GDIHOOK5
so i decided to edit the query to get only the real one.. in this case the real one should has AdapterRam that doesn't equal to null
ManagementObjectSearcher searcher = new ManagementObjectSearcher("select Name,AdapterRAM from " + key+" where AdapterRAM is not null");
foreach (ManagementObject share in searcher.Get())
{
Console.WriteLine(share["Name"].ToString());
Console.WriteLine(share["AdapterRAM"].ToString());
}
The Result was:
ATI Mobility Radeon HD 5650
number of bytes
is there a better and general way to get only the real adpaters in WMI ?