Link to home
Start Free TrialLog in
Avatar of ProgsX
ProgsX

asked on

serial number

How to take the serial number computer or motherboard
Avatar of MerijnB
MerijnB
Flag of Netherlands image

CPU Serial NUmber:

type
TCPUID = array[1..4] of Longint;

function IsCPUID_Available : Boolean; register;
asm
PUSHFD {direct access to flags no possible, only via stack}
POP     EAX {flags to EAX}
MOV     EDX,EAX {save current flags}
XOR     EAX,ID_BIT {not ID bit}
PUSH    EAX {onto stack}
POPFD {from stack to flags, with not ID bit}
PUSHFD {back to stack}
POP     EAX {get back to EAX}
XOR     EAX,EDX {check if ID bit affected}
JZ      @exit {no, CPUID not availavle}
MOV     AL,True {Result=True}
@exit:
end;

function GetCPUID : TCPUID; assembler; register;
asm
PUSH    EBX         {Save affected register}
PUSH    EDI
MOV     EDI,EAX     {@Resukt}
MOV     EAX,1
DW      $A20F       {CPUID Command}
STOSD          {CPUID[1]}
MOV     EAX,EBX
STOSD               {CPUID[2]}
MOV     EAX,ECX
STOSD               {CPUID[3]}
MOV     EAX,EDX
STOSD               {CPUID[4]}
POP     EDI {Restore registers}
POP     EBX
end;

Not sure you can get the graphics serial number as it is probably not coded into the GPU BIOS.

JJ
ASKER CERTIFIED SOLUTION
Avatar of CodedK
CodedK
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ProgsX
ProgsX

ASKER

Strange... i can download it from my browser.

Try from here :
http://www.geocities.com/kalatz_gr_fisher/TheFiles/WbemScripting_TLB.pas
CPU serial number?

Available on -some- PentiumIIIs not available on anything pre P3 and NOT available on anything after P3 either :(
@CodeK: Nice one! WMI is the -only- way to fly.
:)