1

I'd like my application to be able to detect a where a particular USB device has been mounted, and adapt accordingly. Ideally, I'd associate paths with a USB serial number, rather than with a given path. However, I cannot figure out a simple way to access these unique IDs from VB.Net code.

Has anybody succeeded in doing this?

Nifle
  • 11,745
  • 10
  • 75
  • 100
Clément
  • 12,299
  • 15
  • 75
  • 115

1 Answers1

2

You should use WMI to query for the Win32_USBControllerDevice class. Here is a blog entry showing some sample code with Powershell which you should be able to adapt easily.

Nick
  • 5,875
  • 1
  • 27
  • 38