Results 1 to 3 of 3

Thread: [1.0/1.1] Knowing if a drive type is "Fixed".

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Location
    I'm right here!
    Posts
    849

    Question [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.

  2. #2
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    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.

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width