PDA

Click to See Complete Forum and Search --> : How to know the hard drives installed?


dekelc
Feb 18th, 2006, 11:28 AM
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!

:wave:

Kasracer
Feb 18th, 2006, 12:12 PM
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#

dekelc
Feb 18th, 2006, 12:24 PM
I want to do it in order to search for a file in my computer...

:wave:

jmcilhinney
Feb 18th, 2006, 07:35 PM
You can test a drive's type using WMI. Search the forum and you'll find examples of doing just this.