Tim,

Cheers for the great solution!!

Your code gives me an easy to parse string containing the same serial
number as reported by USBDeview.exe.

Thank you very much,
Malcolm

<snipped>

Try using Win32_DiskDrive instead. I'm not 100% sure (read: I'm 
about 1% sure) what constitutes the USB serial number. The only
thing I'm fairly sure about is that it's *not* the volume label.

The PNPDeviceID looks good, even if it might need a bit of parsing:

<code>
import wmi

c = wmi.WMI ()
for usb in c.Win32_DiskDrive (InterfaceType="USB"):
  print usb.PNPDeviceID

</code>

</snipped>
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to