Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Serial Number Options
Message
De
04/08/2003 09:12:41
 
 
À
01/08/2003 20:34:14
Michael Gass
Instructional Software, Inc.
Kirkland, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00815455
Message ID:
00816465
Vues:
21
Man, I'm giving away all my secrets here. :). Just kidding. I use the hard drive serial number adjust to six digits, which is what the codemine serial number requires for the first part. So if the user installs a new hard drive or installs it on an alternate drive, he will need to contact support for a new serial number
******************
** zGetHDDSerial
**
**	returns the last 6 digits of the HDD serial number.
LOCAL lcCurDrive, lcHDD, lcValue1
lcCurDrive=SUBSTR(SYS(5),1,1) && return current hard drive letter 'c'

**	return the hard drive serial number
ofs=create('scripting.filesystemobject')
lcHDD=ALLTRIM(STR(abs(ofs.drives(lcCurDrive).serialnumber)))
**	get the last 6 digits or pad with '0' if less than 6.
IF LEN(lcHDD)<6
	lcHDD=PADR(lcHDD,6,'0')
ELSE
	lcHDD=UPPER(SUBSTR(lcHDD,(LEN(lcHDD)-5),6))
ENDIF
return lcHDD
Following this I have a method that confirms the serial number, the first 6 digits must match the hardware id, then the serialhash must correspond to the second part of the serial number.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform