My app is getting this error on Windows 7. Does the " Windows Management Instrumentation" service need to be is started on the computer for this class? Any ideas?
BTW, this code runs fine on my computer -- So the code does work. A remote user is getting this error.
Void Initialize()... Call was canceled by the message filter. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED)) ... ...
at System.Management.ManagementScope.Initialize() at System.Management.ManagementObject.Initialize(Boolean getObject) at System.Management.ManagementClass.GetInstances(EnumerationOptions options)
The offending C# code is this
ManagementClass mc = new ManagementClass(
"Win32_LogicalDisk");
ManagementObjectCollection moc = mc.GetInstances();
User contributions licensed under CC BY-SA 3.0