Question

Get processor ID or Motherboard ID

Asked by: Motaz

How can I get one of them?

Motaz

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-11-20 at 01:59:43ID20803727
Tags

id

,

get

,

motherboard

Topic

Delphi Programming

Participating Experts
5
Points
200
Comments
22

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Processors?
    Which would you recommend: AMD Athlon Processor Intel Celeron Intel Pentium
  2. motherboard
    i am new to the cumputer world, so give me a break. I have an GA-5AX motherboard. I would like to know how big of a processor i can put in it, and what kind am i going to need for it?
  3. Single Processor on Dual Motherboard?
    Hi all. I have been looking at an Epox Dual processor motherboard for my P2-450. I only want to put one processor on it for the moment. Is this possible, and how? Any other info on this would be greatly appreciated. Thanks, P.
  4. Processor in bad motherboard?
    If my motherboard is fried, and I put a new processor in it, will it fry my new processor? Will a friend processor ruin my motherboard?
  5. Motherboard and its processors
    I am wondering that what kind of motherboards and compatible with which kind of processors? I used to think that processors are attached with motherboard when they made. but i was wrong. What kind og motherboards are there to support different type of processors, what are th...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: gmayoPosted on 2003-11-20 at 03:13:21ID: 9786458

http://www.torry.net/cpu.htm has what you want, most with source.

Geoff M.

 

by: snehanshuPosted on 2003-11-20 at 04:10:19ID: 9786747

From:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_11054364.html

HTH,
...Shu

Comment from Olympus
Date: 08/21/2000 06:05AM IST
 Author Comment  

im sure theres an assembly function that returns something you can convert to the specific processor type string..


 
Comment from ckaneta
Date: 08/21/2000 08:20AM IST
 Comment  

well, that code I mentioned uses an awful lot of assembly
here it is
------------------------------------
/////////////////////////////////////////////////////////////////////////////
// (c) NPS, 1997                  - Idea, realisation, adoptation IsCPUID_Available) //
//                        kvk@estpak.ee                                    //
// (c) Alex Abreu, 1997 - IsCPUID_Available source and idea                //
//                        simonet@bhnet.com.br                             //
/////////////////////////////////////////////////////////////////////////////

interface

uses
  Windows,
  Messages,
  SysUtils,
  Classes,
  Graphics,
  Controls,
  Forms,
  Dialogs,
  ExtCtrls,
  StdCtrls,
  Buttons;

type
  TDemoForm = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    GetButton: TBitBtn;
    CloseButton: TBitBtn;
    Bevel1: TBevel;
    Label5: TLabel;
    FLabel: TLabel;
    MLabel: TLabel;
    PLabel: TLabel;
    SLabel: TLabel;
    PValue: TLabel;
    FValue: TLabel;
    MValue: TLabel;
    SValue: TLabel;
    procedure GetButtonClick(Sender: TObject);
  end;

var
  DemoForm: TDemoForm;

implementation

{$R *.DFM}

const
     ID_BIT     =     $200000;               // EFLAGS ID bit
type
     TCPUID     = array[1..4] of Longint;
     TVendor     = array [0..11] of char;

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;

function GetCPUVendor : TVendor; assembler; register;
asm
  PUSH    EBX                         {Save affected register}
  PUSH    EDI
  MOV     EDI,EAX               {@Result (TVendor)}
  MOV     EAX,0
  DW      $A20F                    {CPUID Command}
  MOV     EAX,EBX
  XCHG          EBX,ECX     {save ECX result}
  MOV               ECX,4
@1:
  STOSB
  SHR     EAX,8
  LOOP    @1
  MOV     EAX,EDX
  MOV               ECX,4
@2:
  STOSB
  SHR     EAX,8
  LOOP    @2
  MOV     EAX,EBX
  MOV               ECX,4
@3:
  STOSB
  SHR     EAX,8
  LOOP    @3
  POP     EDI                         {Restore registers}
  POP     EBX
end;

procedure TDemoForm.GetButtonClick(Sender: TObject);
var
  CPUID : TCPUID;
  I     : Integer;
  S               : TVendor;
begin
     for I := Low(CPUID) to High(CPUID)  do CPUID[I] := -1;
  if IsCPUID_Available then begin
       CPUID     := GetCPUID;
       Label1.Caption := 'CPUID[1] = ' + IntToHex(CPUID[1],8);
       Label2.Caption := 'CPUID[2] = ' + IntToHex(CPUID[2],8);
       Label3.Caption := 'CPUID[3] = ' + IntToHex(CPUID[3],8);
       Label4.Caption := 'CPUID[4] = ' + IntToHex(CPUID[4],8);
       PValue.Caption := IntToStr(CPUID[1] shr 12 and 3);
       FValue.Caption := IntToStr(CPUID[1] shr 8 and $f);
       MValue.Caption := IntToStr(CPUID[1] shr 4 and $f);
       SValue.Caption := IntToStr(CPUID[1] and $f);
       S := GetCPUVendor;
       Label5.Caption := 'Vendor: ' + S; end
  else begin
       Label5.Caption := 'CPUID not available';
  end;
end;

end.
 

 

by: MotazPosted on 2003-11-20 at 04:39:24ID: 9786857

It seems that I miss-ask the question:

It should be:

How can I get CPU Serial number, or motherboard serial number

I need an idetification of a computer

Motaz

 

by: snehanshuPosted on 2003-11-20 at 04:50:26ID: 9786924

Motaz,
  Has your premium service expired?
:-P
  Most of the threads suggest it is not a very good idea to use these any way!
...Snehanshu

Unique indentifiers like MAC address, CPU serial number
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20671536.html

Accepted Answer from geobul
Date: 07/08/2003 03:59PM IST
 Accepted Answer  

Hi,

MAC Address example (works on Win2000 and XP for sure):

uses NB30;

function GetAdapterInfo(Lana: Char): String;
var
 Adapter: TAdapterStatus;
 NCB: TNCB;
begin
 FillChar(NCB, SizeOf(NCB), 0);
 NCB.ncb_command := Char(NCBRESET);
 NCB.ncb_lana_num := Lana;
 if Netbios(@NCB) <> Char(NRC_GOODRET) then
 begin
   Result := 'mac not found';
   Exit;
 end;

 FillChar(NCB, SizeOf(NCB), 0);
 NCB.ncb_command := Char(NCBASTAT);
 NCB.ncb_lana_num := Lana;
 NCB.ncb_callname := '*';

 FillChar(Adapter, SizeOf(Adapter), 0);
 NCB.ncb_buffer := @Adapter;
 NCB.ncb_length := SizeOf(Adapter);
 if Netbios(@NCB) <> Char(NRC_GOODRET) then
 begin
   Result := 'mac not found';
   Exit;
 end;
 Result :=
   IntToHex(Byte(Adapter.adapter_address[0]), 2) + '-' +
   IntToHex(Byte(Adapter.adapter_address[1]), 2) + '-' +
   IntToHex(Byte(Adapter.adapter_address[2]), 2) + '-' +
   IntToHex(Byte(Adapter.adapter_address[3]), 2) + '-' +
   IntToHex(Byte(Adapter.adapter_address[4]), 2) + '-' +
   IntToHex(Byte(Adapter.adapter_address[5]), 2);
end;

function GetMACAddress: string;
var
 AdapterList: TLanaEnum;
 NCB: TNCB;
begin
 FillChar(NCB, SizeOf(NCB), 0);
 NCB.ncb_command := Char(NCBENUM);
 NCB.ncb_buffer := @AdapterList;
 NCB.ncb_length := SizeOf(AdapterList);
 Netbios(@NCB);
 if Byte(AdapterList.length) > 0 then
   Result := GetAdapterInfo(AdapterList.lana[0])
 else
   Result := 'mac not found';
end;

// usage
procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessage(GetMACAddress);
end;

Regards, Geo  

 

by: gmayoPosted on 2003-11-20 at 04:51:31ID: 9786927

Well, just glancing at the page I suggested (http://www.torry.net/cpu.htm), at least 1 of the components DOES give you the serial number:

"By  AA. CPUID asm instruction wrapper component, reveals CPU's Serial Number, Cache Descriptor and available features (FPU, VME, DE, PSE, TSC, MSR, PAE, MCE, CX8, APIC, SEP, MTRR, PGE, MCA, CMOV, PAT, PSE-36, PSN/PPN, CLFlush, DTES, ACPI, MMX, FXSR, ISSE/XMM, ISSE2, SSNOOP, ACC, JMPE), retrieves Windows Global Info (Hardware Profile, System, OS Version and Memory Status). Calls CPUID for virtually any specified level and get all of the results.
You may even see it's capabilities in design mode, just right-click and pick one of 4 samples on the menu items. "

Geoff M.

 

by: snehanshuPosted on 2003-11-20 at 04:56:01ID: 9786949

And,
  Why not use Hard disk serial number? I used that for my software at my previous job.
GetVolumeInformation
...Shu

The code from EXEX:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_10181822.html

Accepted Answer from simonet
Date: 07/13/1999 07:24AM IST
 Accepted Answer  

CPUs have no serial numbers. Only very few P-III were released with this feature, and Intel didn't make the code public available.

For HD's you can use this routine:

function GetVolSN(Volumn:String):string;
var
   sVolName, sFName: Array[0..20] of Char;
   dwVolSN, dwMaxFNameLen, dwFlag: DWORD;
begin
  result:='';
  if GetVolumeInformation(PChar(Volumn), sVolName, 20,
@dwVolSN,dwMaxFNameLen, dwFlag, sFName, 20) then
    result := IntToHex(dwVolSN, 8);
end;


Usage: GetVolSN('C:');

YOurs,

Alex

 

by: MotazPosted on 2003-11-20 at 05:11:56ID: 9787044

I cann't user Harddisk serial number, because it can be replaced with another one (actually that should be the last solution if I fail to get another ID)

MAC!!
isn't for network cards
I want to deploy my applications in computers that has not network card nor modem

Motaz

 

by: gmayoPosted on 2003-11-20 at 05:19:05ID: 9787095

So... have you looked at this page yet? The page that has exactly what you are looking for?

Geoff M.

 

by: snehanshuPosted on 2003-11-20 at 06:08:40ID: 9787460

Motaz
  #1) I don't understand how does one determine whether there is more probability that a user would replace his hard disk and not the motherboard: Somebody could just as well upgrade the motherboard :-) And I have observed that in commercial organizations, people most probably get new systems: very few upgrades, so nither CPU nor harddisk works.
  #2) Not all CPUs have a serial number (only P3 onwards) and it seems serial numbers of BIOS are not unique.

Any way, check this:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_10327192.html

Cheers!
...Snehanshu

 

by: MotazPosted on 2003-11-20 at 06:22:37ID: 9787556

I want to give my customers a cd, containing a valid version only can run on thier computer by using unique serial number, and most of them solve thier windows problems by formatting thier hard disk, so that they need another copy of the application,

I cann't determine wither they replace the hard disk with another one (and run this application in another computer), and gave me a new hard disk, or they are really format it

anyway, as I was said, it is the last solution (althought it is my first thinking on protecting my application)
Motaz

 

by: snehanshuPosted on 2003-11-20 at 06:53:26ID: 9787850

Well,
  The choice is yours: either use CPU/Bios serial numbers which you are not guaranteed to find on all systems (My P3 doesn't have a serial no.) or use HDD serial number: I think all hard disks have a unique s/no.
  For CPU, you could use the links gmayo suggested. Or use simonet's BIOS serial number, again not guaranteed to be unique. Or use HDD serial no.
  Cheers!
...Shu

 

by: snehanshuPosted on 2003-11-20 at 07:09:23ID: 9788018

Motaz,
  Thank you for the points!
>>I cann't determine wither they replace the hard disk with another one (and run this application in another computer), and gave me a new hard disk, or they are really format it
  Well, you could copy the serial number to a floppy and take it with you for your reference so that next time you are required to install the S/W, you could cross-check. perhaps you could use a combination of HDD S/No and BIOS Serial Number.
  Just a suggestion. (We also had all these issues discussed when we finalized on HDD serial number security!)
:-)
...Snehanshu

 

by: odissey1Posted on 2003-11-20 at 10:13:13ID: 9789479

Hi All,

I've used SW protection before. That was a specific one which comes with a hardware (so the price was in 4-digit range anyway). The final solution was to use USB dong with SN burned (Alladin or Rainbow - I do not remember which company it was), with price per key ~$15. But SW protection brought us nothing but a headacke. This is not technical issue but a human perception. People just do not like it. So think twice. Thinking back I would rather loose 1/2 sales.

Regards,
odissey1  

 

 

by: MotazPosted on 2003-11-21 at 23:39:04ID: 9802005

BIOS serial number!
how can I get that, because I found that I can not rely only on HD serial number

 

by: snehanshuPosted on 2003-11-22 at 23:29:23ID: 9805283

From:
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_10327192.html
:-)
HTH,
...Snehanshu

Accepted Answer from simonet
Date: 05/25/2000 10:54AM IST
 Accepted Answer  

>is really this number UNIQUE to each PC?

No. The BIOS serial number identifies the motherboard: manufacturer, model, bios, Bios date, etc.

>How can I get the BIOS Serial No. of the machine running my Delphi 5.0 programs?

I've written a component, TASCpuInfo, that does that. It's freeware and can be downloaded from:

http://www.bhnet.com.br/~simonet/omnitools.htm

It also gives you other very useful information on the CPU and BIOS.

Yours,

Alex

 

by: MotazPosted on 2003-11-23 at 01:04:52ID: 9805448

Thanks Alex, but I'll use the combination of CPUID and HD Serial number

Motaz

 

by: snehanshuPosted on 2003-11-23 at 02:02:26ID: 9805518

It was me, snehanshu, pasting a previously provided solution from Alex.
You could use his tools to get the BIOS serial number.
:-)
Cheers
...Snehanshu

 

by: MotazPosted on 2003-11-23 at 02:22:49ID: 9805529

Yeah, I know Alex, I mean I'll use your first answer about CPUID, because I don't like to use third-party components, because of portability.

Motaz

 

by: olasPosted on 2004-01-14 at 10:59:04ID: 10113349

Hi!
I would think fingerprint.......combining bios id/version features, hd serial, maybe some timing info and then produce a fingerprint that allows for some deviation. If no timings are involved you can probably rely on that two computers wont get EXACTLY the same fingerprint.

Fingerprints(read checksums) can be combined with other bits of info to identify
a system with (i am guessing) more than 90% probability. That would be ok would it not?

Would be fairly simple to gather components that does the job.

//Olas
 

 

by: oygPosted on 2004-06-23 at 02:40:52ID: 11377580

Hi Motaz, And Hi To All,

For software  protection I face the same problem, but I want to mention some points:

1- The Hard Disk Serial no that you all talk about it , it is not a Serial No. , but it is a Volume Serial No That becomes when you make a format to the Hard Disk. So it must be Unique, but it is not. because by some software you can copy this volume serial no and also you can change it, because it is a Logical Serial No, Not Physical.

2- So The Physical Hard Disk Serial No. it is  a number that fixed on external Hard Disk cover and It is very Difficult to depend on that because the component that I test is worked only with Win98, And Also The BIOS Component only worked with Win2000 / XP, So we don't have a component that worked with Poth Operating System.

3- So What I do with my software I make the protection with Hard Disk Volume Serial Number and I store it Encrypted in the Database.

that is the last solution that I find it for four years of searching.

Best Regards To all

Osama

 

by: oygPosted on 2004-06-23 at 02:43:34ID: 11377592

Hi Again,

I Also make the hard disk two partitions and make the protection for hard disk C and D, so If he format the C the protection still on D.

Best Regards,

Osama

 

by: MotazPosted on 2004-06-28 at 00:35:03ID: 11413606

That's good idea, I may apply it in my future software in sha allah
Motaz

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...