Possible duplicate:
How can I resolve the "Provider loading failed" for WMI requests?
When I try to access the Win32_NetworkAdapter table, I get the following exception:
Fix System.Management.ManagementException: Provider Download Failure Error
This is how I tried to access it:
ManagementObjectSearcher mos = new ManagementObjectSearcher( @"SELECT * FROM Win32_NetworkAdapter WHERE Manufacturer != 'Microsoft' " + "AND NOT PNPDeviceID LIKE 'ROOT\\%'"); var managementObjectList = mos.Get(); // Exception: foreach (var networkAdapter in managementObjectList) { }
So I get an exception:
ManagementClass mgmt = new ManagementClass("Win32_NetworkAdapter"); using (ManagementObjectCollection objCol = mgmt.GetInstances()) {
I also get the same error when I try to open Win32_NetworkAdapter instances using WMI CIM Studio
What could be causing this and how can I make it work reliably?
c # wmi
bitbonk
source share