Results 1 to 4 of 4

Thread: How to know the hard drives installed?

  1. #1

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

    Question How to know the hard drives installed?

    Hello,

    I know how to get all the drives on a computer.. (Directory.GetLogicalDrives)

    but is there a way know the physical drives on the computer? (not floopy and
    cd or dvd...)

    thanks!

    Dekel C.

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: How to know the hard drives installed?

    I don't know why you'd even want to do this. I can't think of one design that would require something like this so you may want to double check your design.

    Having said that, you're going to want to take a look at WMI. There are examples posted in the VB.Net CodeBank. It should be fairly straight forward to convert those to C#
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3

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

    Re: How to know the hard drives installed?

    I want to do it in order to search for a file in my computer...

    Dekel C.

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

    Re: How to know the hard drives installed?

    You can test a drive's type using WMI. Search the forum and you'll find examples of doing just this.
    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