RepCad Posted November 24, 2020 Posted November 24, 2020 Hi all, I'm trying to obtain Hard Disk Physical serial number and I'm doing it with this method : "Select SerialNumber,Tag from Win32_PhysicalMedia" It returns an confusing serial number : "32533138314a5a4b303436313934202020202020" While the real Serial number of Hard Disk is : "S281J1KZ401649" Does someone know what the problem is? Quote
Roy_043 Posted November 24, 2020 Posted November 24, 2020 (edited) The returned serial number consists of heximal numbers that are the ASCII codes of the letters in the 'real' number. Additionally each pair of letters appears reversed. The returned serial ends in a number of spaces. x32 -> 50 -> "2" x53 -> 83 -> "S" x31 -> 49 -> "1" x38 -> 56 -> "8" etc. Edited November 24, 2020 by Roy_043 1 Quote
RepCad Posted November 24, 2020 Author Posted November 24, 2020 (edited) Thank you for your clear explanation, but what about this serial number of other system : “194395475601” Is that a heximal numbers or a real HDD serial? Edited November 24, 2020 by amir0914 Quote
Dana W Posted November 24, 2020 Posted November 24, 2020 (edited) It's Hexidecimal, a base 16 computer numbering system used internally by the software after it's compiled. You can convert it using a number conversion website. The hex(idecimal) digits are 0 1 2 3 4 5 6 7 8 9 A B C D E F. Edited November 24, 2020 by Dana W correct spelling 2 Quote
Dana W Posted November 24, 2020 Posted November 24, 2020 You haven't lived until you have had to learn formulas to convert binary, and base 16 (hexadecimal), to base 10 (decimal) numbers. You may be retrieving the wrong data item. Then again, my wireless router and a few other items have a straight up hexadecimal serial number. 2 Quote
Roy_043 Posted November 24, 2020 Posted November 24, 2020 Probably “194395475601” is a 'real' serial. It does not follow the rules that seem to apply to the 'returned' number in your OP. For one thing the number of characters is uneven. But why do you ask? You must know how you have retrieved the number. But “194395475601” can also be a hex number. 1 Quote
RepCad Posted November 25, 2020 Author Posted November 25, 2020 (edited) Thank you both for replying, actually in a project I need to retrieve some information of Hard Disk like name,caption,serial.. I only have problem with the serial number so that it gives an uneven serial and I realized that I have to convert it to the original form from your explanation, but it's important to know if it's a hex or not. Do I really need to convert it? it's hard to say because an original serial number may be only numbers or between A to F, like the second serial that I mentioned. is there another method to get the serial number in its original form (without need to convert)?? I think it's possible because some tools like HDDSCAN does that easily. Edited November 25, 2020 by amir0914 Quote
Dana W Posted November 25, 2020 Posted November 25, 2020 21 hours ago, Dana W said: Then again, my wireless router and a few other items have a straight up hexadecimal serial number. Printed right on the case. 1 Quote
BIGAL Posted November 25, 2020 Posted November 25, 2020 have a look at this (setq fso (vlax-create-object "Scripting.FileSystemObject")) (setq drv (vla-get-drives fso)) (vlax-for what drv (vlax-dump-object what)) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.