[AccessD] Q: using the host id to protect copyright in Access

Stuart McLachlan stuart at lexacorp.com.pg
Sat Jan 22 20:26:42 CST 2005


On 22 Jan 2005 at 19:56, John W. Colby wrote:

> Does anyone know of a way to retrieve the cpu serial number 

For Intel P3 and above:

You have to poke around in the CPUs registers.  How's your assembler  :-)

To detect the presence of the serial number, you issue the CPUID 
instruction with EAX=1 to read the feature flags, and check the SN bit (bit 
18) in EDX. If the bit is clear, the machine has no serial number or it has 
been disabled. And once disabled, it cannot be re-enabled without resetting 
the processor. The serial number, if present, is read with the CPUID 
instruction when EAX =3. The lower 64 bits of the 96-bit serial number are 
returned in EDX:ECX, and the top 32 bits comes from the processor signature 
(ECX = bits 0 to 31, EDX = bits 32 to 63).

No idea about AMDs etc

>or the motherboard serial number?  

If the CMOS has not been set to disable reading the Motherboard number, you 
can use WMI.

An alternative is to just use the various bits of information in 
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System



-- 
Stuart





More information about the AccessD mailing list