nserialhd() vs serialnumber

Post Reply
Marc Vanzegbroeck
Posts: 1163
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

nserialhd() vs serialnumber

Post by Marc Vanzegbroeck »

Hello,

What is the different between the serialnumber returned by nSerialHD() and the number returned by the dos-command
wmic diskdrive get serialnumber


I'm always use nSerialHD(), but I see that the other number is also with characters, instead only numbers.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
Posts: 1163
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: nserialhd() vs serialnumber

Post by Marc Vanzegbroeck »

Unfortunately give this also a number.

Enrico Maria Giordano wrote:Try

Code: Select all | Expand

? NUMTOHEX( NSERIALHD() )


EMG
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
Posts: 1163
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: nserialhd() vs serialnumber

Post by Marc Vanzegbroeck »

Code: Select all | Expand

nSerialHD() = 410452486
NUMTOHEX( NSERIALHD() ) = 18770206
wmic diskdrive get serialnumber = S3TRNA0M316529
 
Last edited by Marc Vanzegbroeck on Thu Mar 11, 2021 9:43 pm, edited 1 time in total.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
Posts: 1163
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: nserialhd() vs serialnumber

Post by Marc Vanzegbroeck »

It's added now :D
Enrico Maria Giordano wrote:You forgot the code. :-)

EMG
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
User avatar
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: nserialhd() vs serialnumber

Post by Enrico Maria Giordano »

nSerialHD() returns the number of the VOL command.

EMG
Marc Vanzegbroeck
Posts: 1163
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: nserialhd() vs serialnumber

Post by Marc Vanzegbroeck »

Yes now I see. :D

It's NUMTOHEX( NSERIALHD() ) that give the same result as the VOL command.

So NSERIALHD() is not the real serial-number. After re-formating it, it will be different then.

There are also utilities to change it :cry:
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Post Reply