Link to home
Start Free TrialLog in
Avatar of fixx17
fixx17

asked on

Finding Drive Volume information based on device interface type.

I'm currently working on a project where I'd like to be able to identify drive volume information (dirve letter, volume name) based on the device interface type and model.

I'm using  "Win32_LogicalDisk" to list volume information and "Win32_DiskDrive" to list the device information.  My problem is I don't know how to link the two.

A sample from my current code for detecting the device ID is:

For Each DiskObj In DiskObjSet
            If DiskObj.interfacetype = "USB" And DiskObj.Model = "HITACHI_ DK13FA-40 USB Device" Then
                UsbDevice = DiskObj.Index
            End If

This effectively detects the device ID, but I haven't been able to find a way of lising volume info for the detected ID.

I'm relatively new to VB programming so maybe there's a simpler way of doing this.  Any help would be appreciated.
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of RonaldBiemans
RonaldBiemans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fixx17
fixx17

ASKER

I thought there must be a way to associate everthing, just missed the  Win32_DiskDriveToDiskPartition association class.

Thanks for the help.