I was wondering if someone could tell me how I can determine the System ID programmatically? I am contemplating adding some form of copy protection to an installer I am writing using an algorithm based on the ID. I am well aware how easily these schemes are defeated however I am approaching this partially as an academic exercise plus wanted to add some sort of deterent for the casual non-authorised distributor of my software(!).

Any help or suggestions much appreciated.
Cheers,
Andrew
Posted on 2004-07-23 21:34:50 by andrew_k
Well, the CPU serial number is unreliable, it can be disabled or just not present so that is pretty much a pointless effort. A unique ID can be derived from the Windows registration key and the volume serial number. But the volume serial number is subject to change (requiring a new unlock code) and we all know that the Windows registration key is pretty much useless. I think it would be difficult to extract a unique system ID that would be reliable across a wide range of processors and systems, you would probably be better off devising some other registration system than wasting any time on a scheme that can be easily broken and would be a headache to write.
Posted on 2004-07-23 23:00:29 by donkey
I know some software that uses the computers MAC address. I know it can
be determined in software, because I have seen programs give me it. I dont
know how they do it though.

Or is the MAC address and CPU serial number the same thing?
Posted on 2004-07-24 13:18:34 by Graebel
To obtain network card's MAC address, use GetAdaptersInfo API.
Posted on 2004-07-24 13:57:12 by omega_red
A MAC address can be changed by a user.
Posted on 2004-07-24 15:55:43 by Mecurius
not always, and its hard
Posted on 2004-07-24 16:21:02 by comrade
The MAC address has an unstated assumption of a computer system that is networked. Beside NIC cards can be exchanged for new ones just like any other unique hardware key situation.

Regards, P1 :cool:
Posted on 2004-07-25 01:27:42 by Pone
As others have mentioned, it is hard to generate a unique ID.

Along with the ideas already presented, one form I did for a company was to get various ID (like HDD, BIOS vers, GUID) and generate a ID from all of that. That pretty much made it unique but if a hardware was changed, it made it invalid.

Relvinian
Posted on 2004-07-25 04:06:25 by Relvinian
sometimes a MAC can changed very easily, on my system I can change it in the device manager by default.
Posted on 2004-07-25 05:47:06 by Mbee
I'm not really sure how effective it would be, but why not just grab the value of HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionProductId and encrypt it using a simple substitution cipher. That's not a value in the registry people are likely to mess with, and for the most part (unless on a pirated copy) the ID will be fairly Unique.

Also, from a uniqueness pov, for amusement purposes you might want to check out http://lamezoid.port5.com/code/random_crypt.txt and try compiling it with different compilers on different OS's. Due to how each compiler handles rand() differently, to get the "decoded text" you have to compile this with DJGPP on Windows98, otherwise you get garbage text. A friend of mine wrote this in C, so it's not really that relevant, but I found it interesting none the less as far as getting unique results dependant on the system.

Regards,
Bryant Keller (aka Synfire)
Posted on 2004-07-25 06:16:10 by Synfire