What should be the unique ID of a machine? Its motherboard ID? Windows Product ID?
Asked Answered
G

4

4

I want to retrieve the unique ID of a machine.

Like others I also did a lot of research, and found none of the process of Unique ID generation works perfectly.

For Motherboard Serial Number (ID): It is Unique; it can't be changed. However, it may not be found in some machines if Manufacturers didn't put information on Memory Location. Then I found it gives no Unique Id .. lol

Similarly for "Processor ID", "BIOS ID".

Afraid to use other hardware information of PC.

MAC and Windows Product ID can be changed by a software.

And is "Windows Product ID" unique?

One option is there to combine those but what if combination is not unique if above conditions applied?

Any other way to find the Unique ID of a machine?


Edit: I want to generate serial key based on that unique ID for software piracy protection. Machine means target PC I've to install software. @Guge: Thanks for mentioning.

Groundspeed answered 26/8, 2010 at 10:4 Comment(4)
I think it would be good to also state your purpose for identifying the machine. Also, what exactly do you mean by "machine"? What if you have a virtual machine? Would one VM be unique from a different VM on the same hardware? What if you VM is transferred to another hardware? Or copied? Could you assign unique ID's in the form of certificates?Radiance
Have you looked at this question: https://mcmap.net/q/463474/-unique-computer-id/…?Protozoon
I came to know that IDs can be enabled/disabled from BIOS. Is it true? if yes How?Groundspeed
Another is here: #100380Groundspeed
R
2

the Unique ID of a machine?

There is no such thing as "The Unique ID of a machine", as you have found.

You need to define your requirements, and use an ID (possibly allocated by yourself) that meets those requirements. E.g. for a web app, a cookie with a GUID might be sufficient to distinguish otherwise anonymous users (the small number of users who use multiple browsers or "in private" mode can be ignored).

For systems management assigning a GUID at the system level should be enough (multiple OS installs with multi-boot need to be tracked separately anyway).

...

Rathenau answered 26/8, 2010 at 10:12 Comment(0)
B
2

Because some of these IDs might be missing and users can swap out components you need to decide what you mean by "a machine".

For example, I'd look at motherboard id, processor id and bios id as these are the least likely to change. Then I'd look for all three and allow one to be missing and/or changed since the last time. If those conditions are met then allow the software to run.

What you do if two or even all three are missing I don't know, because, as you say, other things like MAC address can be changed by software and hard disk ID probably isn't unique and subject to more frequent change.

Banksia answered 26/8, 2010 at 10:12 Comment(0)
W
1

If you are trying to track unique computers in a situation where the computer owner is intentionally trying to bypass your unique check, for example a free computer game where you only want one account per player, I have seen a similar approach mentioned above but with the use of some encryption.

Gather, or try to gather, several pieces of relatively stable PC information (The MotherboardID / MAC Address / BIOS) combine them with a salt prefix and then encrypt it using a simple free algorithm. That key is what you store for that player along with their UserID similar to the way passwords are encrypted. That key will be a pretty good unique identifier for "The machine" which you can check every time they log in.

There are several pieces of computer information you can go after, depending on how risky you want to get with normal people who change their components, but as long as you don't get blanks for everything you are checking for you should be pretty safe.

Woorali answered 28/9, 2017 at 19:59 Comment(0)
J
0

I created this python script to do the same thing. you just have to decide what path to save the file. If it exists the uuid will be displayed if not it will create one and save it for later. I suppose you cold rewrite in bat for windows.

from pathlib import Path
import uuid

seedfile = Path(".HOST_UUID")
if not seedfile.exists():
    UUID = uuid.uuid4()
    seedfile.write_text(str(UUID))
else:
    UUID = seedfile.read_text().strip()
print(UUID)
Jonell answered 9/6, 2023 at 19:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.