views:

691

answers:

2

Is it possible to read the serial number of a USB drive using VB.

A: 

Google found these tutorials:

visual basic (for hdd serial, but it seems it works for a usb drive too):

http://www.codeproject.com/KB/cs/hard_disk_serialno.aspx

powershell and vbasic:

http://blogs.msdn.com/powershell/archive/2007/02/24/displaying-usb-devices-using-wmi.aspx

vbasic:

http://www.myitforum.com/forums/m_147418/mpage_1/key_/tm.htm

Mercer Traieste
A: 

It's in the registry, HKLM\System\CCS\Enum\USB\VID_XXXX&PID_YYYY\<serial>. (Vendor and Product ID will vary too, as serial numbers are only unique for a single product.)

MSalters