System.Management.ManagementException : Provider Load Failure

D

Daniel Edwards

I have some code which works on a standard XP system, but fails on XP
Embedded test machine.

I get System.Management.ManagementException : Provider Load Failure

// this is C# code likely the cause of the exception
ManagementObject disk;
disk = new ManagementObject("Win32_Logicaldisk=\"" + drive + "\"");
disk.Get();
HDDsize = Convert.ToDouble(disk["Size"].ToString());
FreeSpace = Convert.ToDouble(disk["FreeSpace"].ToString());

I believe there is a missing component. Probably one of the WMI components.
I don't know exactly. Has anyone seen this issue before?
 
D

Doug Hoeffel

Daniel:

What WMI components do you have in your image? I would think that you
atleast need "WMI Win32 Provider".

HTH... Doug
 
D

Daniel Edwards

Found the answer. Need to include c:\windows\system32\dskquota.dll


Doug Hoeffel said:
Daniel:

What WMI components do you have in your image? I would think that you
atleast need "WMI Win32 Provider".

HTH... Doug
Daniel Edwards said:
I have some code which works on a standard XP system, but fails on XP
Embedded test machine.

I get System.Management.ManagementException : Provider Load Failure

// this is C# code likely the cause of the exception
ManagementObject disk;
disk = new ManagementObject("Win32_Logicaldisk=\"" + drive + "\"");
disk.Get();
HDDsize = Convert.ToDouble(disk["Size"].ToString());
FreeSpace = Convert.ToDouble(disk["FreeSpace"].ToString());

I believe there is a missing component. Probably one of the WMI components.
I don't know exactly. Has anyone seen this issue before?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top