|
-
Aug 4th, 2006, 10:40 AM
#1
Thread Starter
Fanatic Member
[1.0/1.1] Knowing if a drive type is "Fixed".
Hello!
I have a project that uses the computer drives list (GetLogicalDrives).
How can I know which drives are "Fixed" and which are not?
In the .Net FW 2.0 I could use the DriveInfo class, but it is not available in
the .Net FW 1.0/1.1.
So how do I do it in the .Net Framework 1.0/1.1??
Thanks!!
Last edited by dekelc; Aug 4th, 2006 at 12:13 PM.
Dekel C.
-
Aug 4th, 2006, 05:07 PM
#2
PowerPoster
Re: [1.0/1.1] Knowing if a drive type is "Fixed".
you may need to take a look at the WMI approach, using the System.Management namespace and finding a query on the drives.
-
Aug 5th, 2006, 04:15 AM
#3
Re: [1.0/1.1] Knowing if a drive type is "Fixed".
You need to look at the MediaType property of the Win32_PhysicalMedia WMI class. If you want to relate the physical media to a drive then you also need to employ the Win32_DiskDrive and Win32_DiskDrivePhysicalMedia classes. Gigemboy has posted a CodeBank submission for working with WMI classes. There are also some things to be aware of when using those WMI classes. For instance, I have two hard disk drives in a RAID array and WMI cannot see the individual drives, but rather sees the array as one drive.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|