the absolute unique number of each pc ? how to get it in d3

Posted on 1998-08-25
Last Modified: 2010-04-04
I need.. a ABSOLUTE unique number (like the processor serialn. or motherboards n. or or or)
it's to generate a key-file for my app.. so some samples are welcome to :)

Question by:skatan187
  • 3
  • 3
  • 2
  • +5

Expert Comment

ID: 1337719
what about combining all these togheter to one key?

Expert Comment

ID: 1337720
Combining them all is a good solution.
Include the MAC-address also (if there is one)?

/// John

Expert Comment

ID: 1337721
Hi Skatan,

We have been working on this problem for around nine months now.  Unfortunately, appart from the network cards' address, there is no way of getting a completely unique number for every PC.  And, the addres of a network card can only be retrieved from cards which support it.  To date, I have not been able to get it to work on very many cards at all except for genuine NE2000 cards (from Novel).

The best that we have been able to come up with is the hard disk serial number, combined with the Windows OEM number, Date and Time of Installation, Name and Company name and physical drive attributes.  We use all of these factors and then use a random seed to generate a unique ID number.

Problem with this is, if someone uses hard disk copying program which does the drive sector by sector, you will end up getting fairly similar numbers.

My suggestion to you would be to use what we have done above.  If you are interested, I can send you some code to get going with, but obviously I can not send you everything we are using.  I have the code to return the NICs' address, and I can forward that onto you as well.

The main problem with retrieving all that stuff you where after is this.  Using a protected mode operating system, you have to do "Thunking" to retrieve that info (because it resides in protected memory areas).  I dont know too much about this, so I wont go into it.  All I know is what I have been told, and its DAMN hard.

Good luck, and let me know if you want some of our code.

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why


Expert Comment

ID: 1337722

it sounds like you're doing something very similar to something I tried to do a while back. I couldn't make it work though... (that wonderful thunking problem you were talking about) I know it's  a bit cheeky, but I'd be really grateful if you could mail me any code which you don't mind sharing, or point me at a resource covering this sort of thing.

Incidentally, I know there is a way of getting the MAC address out of non NE2000 cards - although I don't know how you do it... It  has been done though; Quake will give you the MAC address in it's network game setup screen. I'll dig around and see what I can find...



Email :

Expert Comment

ID: 1337723

95 AND nt?



Author Comment

ID: 1337724
the component I have right now is not coded by me..
but it finds the serial number of the motherboard..

A problem I have with the hard-disk serial is that when a user changes
the drive wich contains the used number.. the program will have to be
reregistered.. and since hard-drives are more often changed then
processors or motherboard numbers... However,, I am also looking for
a working sample to make somekinda serial number protection with
this key : I tried encryption of the string-combined with the name
of the users .. and use this as the 3 veriables for checking the

why do I need this: the most users of my program have serial number
lists and know what warez are :) .. to avoid that the app will be listed in
these lists, I wan't to combine this unique number with the name of the user
and make a key with these values .. If somebody knows another solution then
using this unique number .. like for example the windows registery : the
problem here is that cracks will be made ! (my app: a menu for cd's ..
yea : also warez cd's ! so most users will use the crack if it's availeble)


Expert Comment

ID: 1337725
Adam: I'll post you off some stuff today.  Parts are in C, others are in Delphi.

Skatan187: Any chance of getting a look at that component at all?  Does it have the source code at all, if so, we maybe on track to being able to get some other info!


Expert Comment

ID: 1337726
Why not generate a GUID? I know there's debate over whether these are truly unique - but will it do for your purposes?

Author Comment

ID: 1337727
I rejected your answer because there is not eneuf information explaining how ..


Accepted Solution

chrismo earned 40 total points
ID: 1337728
Sorry 'bout that.

A GUID is a Globally Unique ID. The algorithm for generating it was created by Microsoft I believe. Some math heads claim it's not absolutely reliable for a truly globally unique ID - but for practical uses it works very well.

GUIDs are used with COM objects. Every COM object must have a GUID to identify itself and register's itself on your machine in your registry with its GUID. This should allow multiple COM objects to be installed on your machine and guarantee there won't be an ID conflict.

To programmatically generate a GUID in D3 - use the following API call:

CoCreateGUID (check the Win32.hlp file for specifics). This call exists in the OLE2.pas file in the RTL\WIN Delphi source directory.

Delphi provides a TGUID record for working with the value as well as GUIDToString and StringToGUID functions for ease of use. You will most likely have to store the GUID as a string in your table (perhaps not an option for you).

What database platform are you using? If you're using MS SQL Server - it has a timestamp data type which is a unique value as well - though it's a bit awkward to work with.

If you'd like more information on the contents of a GUID, check out the following:

Author Comment

ID: 1337729
I'll accept this anwer.. but it still not exactly what I was looking for:
I am looking for a number wich is stored somewhere is the hardware of the
user.. so that he can only use the software on HIS computer .

(like: perhaps a serial of the CPU, mother-mainboard, hardisk dunno.. )
I also prefer hardware that is a part of the basics of the pc: like
the mainboard, C-drive, CPU ...


Expert Comment

ID: 1337730
If you look up the DejaNews links I provided - some of the GUID data is read from the machine, combined with some timestamping algorithmic stuff...

But you are correct - if you simply want a single number per machine - a GUID is not really it. Thanks for the points, however! Hope it works out for you...

Expert Comment

ID: 1337731
hoi, chrismo -

are these those which are to be found in the HKEY_CLASSES_ROOT\CLSID -Key structure?

Black Death.

Expert Comment

ID: 2119553
I know this is a dead question, but perhaps my comments serv to someone.

Like several guys of you, I've also worked during almost one year to get a unique machine ID number.

What I've finally discovered is a "machine's fingerprint" derived from several parts of machine itself:
1- BIOS's creation date
2- Machine's processor type, model and manufacturer
3- Creation date & time of directory where system is stored
4- Disk geometry (cyls/sectors/heads)
5- Info stored at non-reachable regions of disk

Of course, if user buys a new machine, he must call to re-register, but that's the only way I've found to obtain a secure protection scheme.

The registering program remains at user's machine; this program is used each time user needs to install the system in another machine (or if he has changed, let's say, the disk, or the motherboard). It uses single-use telephone passwords which disables user to re-register each time he want, because the right passwords to open registering process must be supplied when user is in front of the screen and after giving me some "control numbers" displayed at initial screen, numbers that change on each program execution.

I've installed more than 400 copies of a system developed by me, and all of them run under this scheme. Of course, from time to time, I receive a call from someone which has upgraded the machine, perhaps buying a faster processor (of course, with another mobo), or a higher-capacity disk. The process to call me to re-install the system lasts no more than 3 minutes. And I can sleep very quietly knowing that my system is secure.

Unfortunately, all of this require non-protected mode accesses, which make my system be yet a DOS application. I'll see what will occur when I migrate to Windoze... :~(

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
error 1.1 400 Bad request idhttp delphi 18 91
Intraweb download file link ? 1 134
Run video youtube webbrowse 10 62
Error E2158 compiling with Delphi XE10 Seattle 2 100
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In a recent question ( here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question