System.Management.ManagementObject problem 
Author Message
 System.Management.ManagementObject problem

Hi,

I'm having the following lines of code on which I get a ManagementException
(Invalid Class.):

ManagementObject nwDrive = new
ManagementObject("win32_mappedlogicaldisk.deviceid=\"P:\"");

nwDrive.Get();

BTW what I'm trying to accomplish is to check whether a certain mapped drive
is online or offline.

I can retrieve other objects without any probs. Only the
win32_mappedlogicaldisk is giving me a headache.

I'm running a 2K WS and the class should be supported. Or does the .Net
Framework not support this one??? Where can I get a list of WMI classes
which are supported by the FCL?

Please advice, I'm getting fat on this :)

Matthias

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ( http://www.*-*-*.com/ ).
Version: 6.0.427 / Virus Database: 240 - Release Date: 12/6/2002



Thu, 16 Jun 2005 08:26:16 GMT  
 System.Management.ManagementObject problem
Hi Matt,

I have tried your problem, i can get access to some of
the properties expose by Win32_MappedLogicalDisk using a
query differant to yours, which property did you want to
get a value from?

Mike



Thu, 16 Jun 2005 21:57:23 GMT  
 System.Management.ManagementObject problem
Hi Mike,

thanks for your reply. I want to get the Offline/Online Status (thought it
might be the Availability Property). I'd even any other way to get this
Information, doesn't have to be through System.Management.

Thanks again,

M.

Quote:
> Hi Matt,

> I have tried your problem, i can get access to some of
> the properties expose by Win32_MappedLogicalDisk using a
> query differant to yours, which property did you want to
> get a value from?

> Mike

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.427 / Virus Database: 240 - Release Date: 12/6/2002


Fri, 17 Jun 2005 03:56:40 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Unhandled Exception: System.Configuration.ConfigurationException: Could not create System Configuration.NameValueSectionHandler, System

2. ? HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_

3. System.Runtime.InteropServices.VTableCallsNotSupportedException

4. Problems with namespace System::Collections::Specialized

5. bufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbuf

6. System.Text.RegularExpression.Regex problem

7. System.Drawing.Bitmap.FromResource throwing System.ArgumentException

8. microsoft.public.management.mmc

9. Why don't I have System.Management?

10. System.Management Namespace ?

11. System.Management;

12. Questions with System.Management Class

 

 
Powered by phpBB® Forum Software