ManagementClass objMC = new
ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection adapters = objMC.GetInstances();
foreach (ManagementObject adapter in adapters)
...
The call to objMC.GetInstances fails. The error message (via a try/catch) is
simple "Not found" which is basically useless. The computer in question is a
student notebook with all sorts of extras installed, but I don't see
anything obvious that would interfere with WMI. The WMI service is also
running. Google searches have so far come up dry, but I don't have a very
useful item to key my search on. Has anyone got any suggestions on what
might be causing this problem?
What OS are these failing systems running? Did you try to create an instance
of this class using Wbemtest.exe or a simple Vbscript?
Willy.
The student in question was very keen and tracked the problem down himself.
Turned out
that his WMI database was corrupted and he found this link to fix it: