David,
For 1.x or for 2.0.
In 2.0 there is a method for that.
http://msdn2.microsoft.com/en-us/lib...em.drives.aspx
For 1.x you need some WMI code.
There are a lof of samples made for this, this is one I have saved, which
is looking at the code obviously not made by me.
\\\
Dim searcher As New ManagementObjectSearcher _
("SELECT * FROM Win32_LogicalDisk")
Dim ManObjOp As ManagementObject
If searcher.Get.Count > 1 Then
For Each ManObjOp In searcher.Get
Dim win32 As String = "Win32_LogicalDisk='" &
ManObjOp("Name").ToString & "'"
Dim ManObjLogD As New ManagementObject(win32)
For Each diskProperty As PropertyData In
ManObjLogD.Properties
If Not diskProperty.Value Is Nothing Then
Console.WriteLine _
("{0} = {1}", diskProperty.Name, diskProperty.Value)
End If
Next
Next
End If
///
I hope this helps,
Cor
"D Miller" <de**********@yahoo.com> schreef in bericht
This should be easy, but I can not figure it out, how does one get a list
of current drives on the computer?
Thanks,
David