-
Dec 22nd, 2018, 09:11 AM
#1
Thread Starter
Member
-
Dec 22nd, 2018, 10:55 AM
#2
Re: Obtain the serial number of the external hard drive, need help
According to this https://stackoverflow.com/questions/...rddrive-in-vb6
"152D20337A0C" might be your Serial-No, but you have to decode it
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
-
Dec 22nd, 2018, 11:44 AM
#3
Re: Obtain the serial number of the external hard drive, need help
The archive linked to seems to have been grabbed from this thread:
http://www.vbforums.com/showthread.p...r-Admin-Rights
I haven't had a reason to go back to revisit this, but reading the thread again it sounds like the code may only be a problem when run on XP or earlier. Since XP is dead now it is hard to get too worried about it.
-
Dec 22nd, 2018, 06:34 PM
#4
Thread Starter
Member
Re: Obtain the serial number of the external hard drive, need help
Hello Everyone,
[Zvoni] Thank you, I checked, "152D20337A0C" is the InstanceID of Hard Disk Box Adapter, it does not change with all hard drives
[dilettante] Thank you, This happens with every version of Windows. I think it seems that Hard Disk Box Adapter has caused the returned information to be misleading.
Best regards
-
Dec 23rd, 2018, 05:17 AM
#5
Re: Obtain the serial number of the external hard drive, need help
Well, everything i could find uses WMI, so, there....
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
-
Dec 23rd, 2018, 07:10 AM
#6
Thread Starter
Member
Re: Obtain the serial number of the external hard drive, need help
 Originally Posted by Zvoni
Well, everything i could find uses WMI, so, there....
Thank Zvoni, I tried with WMI, and the information returned is also the InstanceID of Hard Disk Box Adapter
-
Dec 23rd, 2018, 08:37 AM
#7
Re: Obtain the serial number of the external hard drive, need help
Here's something I'd be interested in knowing: Does that Western Digital tool work with a non-WD USB hard disk? I bet it doesn't.
So, we really need to re-frame your question. Is what you want the serial number of Western Digital USB drives? But even that might be quite difficult, and here's why. The Western Digital corporation certainly knows how to communicate with their drives at a very low-level. In other words, their Data Lifeguard Tools program is quite possibly going directly to their hard drive to get the information, and not going through Windows API calls. To do that from another program, you'd need to know very detailed (quite possibly proprietary) information about how to communicate with the drive's firmware. And I seriously doubt you're going to find information on how to do that from anybody except some Western Digital firmware specifications sheet.
And then, when you're all done, it probably won't work on other USB hard drives from other companies like Hitachi, Seagate, Toshiba, etcetera, as they'll all have different protocols for communicating directly with their firmware.
You need to find an example of some code that uses standard API calls (possibly digging something out of the registry similar to a monitor's EDID information) before this will become standardized.
Good Luck,
Elroy
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Dec 23rd, 2018, 10:15 AM
#8
Thread Starter
Member
Re: Obtain the serial number of the external hard drive, need help
 Originally Posted by Elroy
Here's something I'd be interested in knowing: Does that Western Digital tool work with a non-WD USB hard disk? I bet it doesn't.
So, we really need to re-frame your question. Is what you want the serial number of Western Digital USB drives? But even that might be quite difficult, and here's why. The Western Digital corporation certainly knows how to communicate with their drives at a very low-level. In other words, their Data Lifeguard Tools program is quite possibly going directly to their hard drive to get the information, and not going through Windows API calls. To do that from another program, you'd need to know very detailed (quite possibly proprietary) information about how to communicate with the drive's firmware. And I seriously doubt you're going to find information on how to do that from anybody except some Western Digital firmware specifications sheet.
And then, when you're all done, it probably won't work on other USB hard drives from other companies like Hitachi, Seagate, Toshiba, etcetera, as they'll all have different protocols for communicating directly with their firmware.
You need to find an example of some code that uses standard API calls (possibly digging something out of the registry similar to a monitor's EDID information) before this will become standardized.
Good Luck,
Elroy
Hi Elroy,
I tried Western Digital's tool with a variety of different hard drives, and it all yielded accurate results. And not only WD, some other drive tools (eg CrystalDiskInfo, HD Tune ...) also get the Serial Number of USB hard drives.
I really feel very stuck on this issue. Is there any way for messages to go through Hard Disk Adapter Box to reach the Hard Disk?
Best regards,
ferrmask
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|