Dim query As ManagementObjectSearcher = New _
ManagementObjectSearcher("SELECT * From
Win32_LogicalDisk ")
Dim queryCollection As ManagementObjectCollection = query.Get()
For Each mo As ManagementObject In queryCollection
if you want to get the name of potential properties you can use this code:
Dim pdc As PropertyDataCollection = mo.Properties
For Each pd As PropertyData In pdc
Console.WriteLine(pd.Name)
Next
just stick it in the above loop.
I suppose you could stick something in there to see if there is a missing
drive letter to get the next available one. You can also check to see the
type, whether is a local or network drive. I forgot the numbers but you
should be able to find them in help somewhere. You can identify a CD, a
fixed drive, a network drive, a floppy drive etc.
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.