0

Without adding dependency of WMIC and getting MAC.

I know we can read MachineGuid in registry key:

 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography

and it won't change unless user formats the PC. But the issue is it can be easily bypassed if the hard drive is cloned.

I came across https://msdn.microsoft.com/en-us/library/windows/desktop/ms724423%28v=vs.85%29.aspx

Does the info returned by

GetSystemInfo ()

remain same after OS installation, and avoid cloning issue.

adnan kamili
  • 8,967
  • 7
  • 65
  • 125
  • 2
    The industry standard is to use the MAC. Some people complain that this can be overridden, but that's a feature, not a bug - the system administrator *must* be able to override the licensing if it becomes necessary to do so, otherwise you're being evil to your own customers, which always comes back to bite you in the long run. Note that you don't need to use WMIC to get the MAC, there are other APIs available. – Harry Johnston Jan 09 '16 at 22:32
  • 1
    Agree with Harry, using the MAC address is the way to go. If you refuse to do that, you'll have to combine multiple pieces of information and hope that if you picked enough different bits of information, you'll end up with something unique. Begs the question of ***why*** you think you need to do this, though. – Cody Gray - on strike Jan 11 '16 at 13:26

1 Answers1

1

No, GetSystemInfo() is not unique either.
It fill a SYSTEMINFO which contains mostyl data about the CPU, and some other non-unique fields.

Some really unique ID which additionally stays the same
on one Windows instance, like you're searching, doesn't exist.

deviantfan
  • 11,268
  • 3
  • 32
  • 49