Is there any way to detect the number of HD using VB .NET? I have managed to get the number of all disk drive(floppy, HD, CD) with Management Object Collection. But couldn't tell which one is which. Any idea?
...
Dim diskClass As _
New ManagementClass("Win32_LogicalDisk")
Dim disks As ManagementObjectCollection = _ diskClass.GetInstances()
Dim disk As New ManagementObject
For Each disk In disks
Label1.Text &= disk.Properties("Name").ToString & vbCrLf
Next disk
-------------------------------------------------------------------------------
The codes above only shows all the drive letters, nothing more.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.