[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!!
:wave:
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.
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.