Return Disk Number (i.e. "Disk 0" for C Drive)??

  • Thread starter Thread starter mikeybe
  • Start date Start date
M

mikeybe

Anyone know how to return the disk number (i.e. the number you see
when you launch windows disk manager and see your drives numbered disk
0, disk 1, etc.)? I'm not talking about the volume serial number or
drive serial number. For example, I want to programatically determine
what disk number the c drive is using vb.net and windows 2000.

Thanks,

Mike Beccaria
 
Check out the System.Management namespaces and get to know WMI. You'll be
looking for LogicalDisk queries.. its kinda like SQL for your computer.

-CJ
 
I went through the logicaldisk wmi class and tried all of the
variables that I thought would apply, and none of them return the disk
number. Any other thoughts?

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top