I've been trying to read the Everest WMI with C# without any success.
This is part of the code (just an example):
SelectQuery query = new SelectQuery(@"Select * from Root\WMI\EVEREST_SensorValues");
ManagementObjectSearcher wmiSearcher = new ManagementObjectSearcher(query);
ManagementObjectCollection collection = wmiSearcher.Get();
foreach (ManagementObject obj in collection)
{
string id = obj["ID"].ToString();
}
I get an "Invalid query" in foreach.
Can anyone help?
This is part of the code (just an example):
SelectQuery query = new SelectQuery(@"Select * from Root\WMI\EVEREST_SensorValues");
ManagementObjectSearcher wmiSearcher = new ManagementObjectSearcher(query);
ManagementObjectCollection collection = wmiSearcher.Get();
foreach (ManagementObject obj in collection)
{
string id = obj["ID"].ToString();
}
I get an "Invalid query" in foreach.
Can anyone help?