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.
LVL 1
fixx17Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RonaldBiemansCommented:
look at this link

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_tasks__disks_and_file_systems.asp

the last example explains (bottom of the page) how to do that

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fixx17Author Commented:
I thought there must be a way to associate everthing, just missed the  Win32_DiskDriveToDiskPartition association class.

Thanks for the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.