From: Kirk on
Hi,

I need to read the manufacturers serial number from a USB drive and have not
been successful. I was able to create a handle to the drive using
CreateFile() and the drive letter( E:\), but was not able to read the serial
number using deviceIoControl(). I kept getting unsupported request. Could
anyone help?
From: Lynn McGuire on
> I need to read the manufacturers serial number from a USB drive and have not
> been successful. I was able to create a handle to the drive using
> CreateFile() and the drive letter( E:\), but was not able to read the serial
> number using deviceIoControl(). I kept getting unsupported request. Could
> anyone help?

Good luck. I have tried this for a while with my DiskId32 tool but I
could not get it to work. http://www.winsim.com/diskid32/diskid32.html

HDTune www.hdtune.com does not get serial numbers for USB
hard drives either.

Lynn


From: Uwe Sieber on
Kirk wrote:
> Hi,
>
> I need to read the manufacturers serial number from a USB drive and have not
> been successful. I was able to create a handle to the drive using
> CreateFile() and the drive letter( E:\), but was not able to read the serial
> number using deviceIoControl(). I kept getting unsupported request. Could
> anyone help?

It's possible using a batch of undocumented USB functions.
But you can read if from the registry in many places.

Sample of an USB drive with serial 058F0O1111B:

Disk's Device Path
\\?\usbstor#disk&ven_multi&prod_flash_reader&rev_1.00#058f0o1111b&0#{GUID}

Drive's Device ID
USBSTOR\DISK&VEN_MULTI&PROD_FLASH_READER&REV_1.00\058F0O1111B&0

USB bridge's Device ID
USB\VID_058F&PID_6369\058F0O1111B


If the USB device has no serial then Windows generates
an ID which apparently always contains '&' chars.


Uwe


From: jakeyjia on
i have got the Serial by the way you shown.

but if there are two or more devices that they have only defferent in Serial.
how to identify these device which is the Device I Want? (i want to identify
them by Plate Symbol)

hope the solution~

"Uwe Sieber" wrote:
>
> It's possible using a batch of undocumented USB functions.
> But you can read if from the registry in many places.
>
> Sample of an USB drive with serial 058F0O1111B:
>
> Disk's Device Path
> \\?\usbstor#disk&ven_multi&prod_flash_reader&rev_1.00#058f0o1111b&0#{GUID}
>
> Drive's Device ID
> USBSTOR\DISK&VEN_MULTI&PROD_FLASH_READER&REV_1.00\058F0O1111B&0
>
> USB bridge's Device ID
> USB\VID_058F&PID_6369\058F0O1111B
>
>
> If the USB device has no serial then Windows generates
> an ID which apparently always contains '&' chars.
>
>
> Uwe
>
>
>
From: Uwe Sieber on

English isn't my native language... What is a 'Plate Symbol'?


jakeyjia wrote:
> i have got the Serial by the way you shown.
>
> but if there are two or more devices that they have only defferent in Serial.
> how to identify these device which is the Device I Want? (i want to identify
> them by Plate Symbol)
>
> hope the solution~
>
> "Uwe Sieber" wrote:
>> It's possible using a batch of undocumented USB functions.
>> But you can read if from the registry in many places.
>>
>> Sample of an USB drive with serial 058F0O1111B:
>>
>> Disk's Device Path
>> \\?\usbstor#disk&ven_multi&prod_flash_reader&rev_1.00#058f0o1111b&0#{GUID}
>>
>> Drive's Device ID
>> USBSTOR\DISK&VEN_MULTI&PROD_FLASH_READER&REV_1.00\058F0O1111B&0
>>
>> USB bridge's Device ID
>> USB\VID_058F&PID_6369\058F0O1111B
>>
>>
>> If the USB device has no serial then Windows generates
>> an ID which apparently always contains '&' chars.
>>
>>
>> Uwe
>>
>>
>>