After testing I've confirmed that XP doesn't store the necessary information for USB Flash drives where Vista and later do, so more effort is required in order to support XP.

I can use hardware I/O (actually this seems to be driver interrogation) to get serial numbers w/o admin rights for internal hard drives but it doesn't return a serial number for USB Flash drives or even for USB hard drives. Same results for this on XP, Vista, and Win7.

Actually true hardware I/O can also get the serial number from internal hard drives, but this requires admin rights and still doesn't work for USB devices.

It appears that the info is available for USB drives, but it may take a lot more effort to get it.


The more I fiddle with this the shakier it all seems. It looks like a new version of Windows could easily come along and break what's working now. Even the WMI method is erratic about returning the information, requiring different logic for various OSs.