is there a way to retrieve a unique machine ID. I want to protect a piece of software so that it can only execute on a particular machine.
is there a way to retrieve a unique machine ID. I want to protect a piece of software so that it can only execute on a particular machine.
MAC-address of the Network card is one of the widly used identifiers...
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
As long as you realize that a determined person can circumvent it... Some combination of hostname, MAC address, other system stats. You could get the machine GUID directly from Windows, but again, this can be faked. Just type GUID into an MSDN search.
Also, you are creating a pain in the ass for your user, because they can no longer change their hostname, or install a new network card, without changing their identifier. Are you sure you want to take the support calls when that happens?
> I want to protect a piece of software so that it can only execute on a particular machine.
And lose customers whenever they upgrade the bit you're dependent on?
Unless you pull an ID from several different sources, and tolerate a certain amount of change from the baseline.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.