win32.getRegistry() and unique machine ID
Posted: Mon Oct 28, 2013 12:26 pm
I was trying to use the new win32.getRegistry() method.
I wanted to find a unique machine ID, which could be used for node-locked licenses, etc.
This code seems to do the job
Maybe there are better keys? Or is that one ok? Does it work on all versions of Windows? Not sure.
I wanted to find a unique machine ID, which could be used for node-locked licenses, etc.
This code seems to do the job
- Code: Select all
local s = win32.getRegistry("HKLM SOFTWARE\\Microsoft\\Cryptography", "MachineGuid");
if s then
host:trace(s);
end
Maybe there are better keys? Or is that one ok? Does it work on all versions of Windows? Not sure.