Windows management Instrumentation

  • Thread starter Thread starter cmrchs
  • Start date Start date
C

cmrchs

Hi,

using the Windows management Instrumentation interface (WMI) do I get illogical results :

the following works :
ManagementObject account = new ManagementObject
("Win32_logicaldisk.deviceid=\"c:\"");
account.Get();
lblName.Text = account["size"].ToString();

but the following gives me an exception
System.Management.ManagementException: Invalid object path

ManagementObject account = new ManagementObject
("Win32_Account.name=\"a_user\"");
account.Get(); // exception is thrown here

The class-name is correct though.
Any ideas ?

thanks
Chris



**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
hi Cor,

ok, thanks. I'll have a look

but i'm still wondering why my sample code doesn't work.
any ideas ?

Chris

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
Chris,

I don't know I think that it has to do with authorisations
However that deep I never went in it.

Cor
 
Back
Top