[Solved] Fingerprint

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Learning one
Posts: 137
Joined: 04 Oct 2013, 13:59
Location: Croatia
Contact:

[Solved] Fingerprint

09 Feb 2014, 10:42

There's an old thread; How to generate a unique hardware ID / fingerprint. I wonder is this code enough to generate fingerprint?

Code: Select all

For obj in ComObjGet("winmgmts:{impersonationLevel=impersonate}!\\" . A_ComputerName . "\root\cimv2").ExecQuery("Select * From Win32_ComputerSystemProduct")
	Fingerprint .= obj.IdentifyingNumber obj.UUID	; http://msdn.microsoft.com/en-us/library/aa394105%28v=vs.85%29.aspx
MsgBox % Fingerprint
Last edited by Learning one on 13 Feb 2014, 02:24, edited 1 time in total.
Zelio
Posts: 275
Joined: 30 Sep 2013, 00:45
Location: France

Re: Fingerprint

09 Feb 2014, 17:08

...this UUID is calculate with what ? and that can fail...
"Universally unique identifier (UUID) for this product. A UUID is a 128-bit identifier that is guaranteed to be different from other generated UUIDs. If a UUID is not available, a UUID of all zeros is used."

Why do you want this ?

For local things, to use motherboard informations (serial number and other core info, not hdd or other)
For internet registration, email address and MAC address (maybe store IP for a free change or an upgrad to a new computer)
For a safe fingerprint (different lenght without trim, also you can hash it to have a key), gathering every important informations who will not be replace easly...
User avatar
Learning one
Posts: 137
Joined: 04 Oct 2013, 13:59
Location: Croatia
Contact:

Re: Fingerprint

10 Feb 2014, 02:04

Thanks for reply. :)

I need fingerprint for local things. For example, one script should work only on 2 of 10 computers in the office.
I dont' understand what's wrong if I use UUID - it's unique... and therefore suitable for a fingerprint if I understand this correctly...
Is it OK if I combine Motherboard SerialNumber and ProcessorId to make a fingerprint (for local things) ? Like this;

Code: Select all

For obj in ComObjGet("winmgmts:{impersonationLevel=impersonate}!\\" . A_ComputerName . "\root\cimv2").ExecQuery("Select * From Win32_BaseBoard")
    Fingerprint .= obj.SerialNumber
For obj in ComObjGet("winmgmts:{impersonationLevel=impersonate}!\\" . A_ComputerName . "\root\cimv2").ExecQuery("Select * From Win32_Processor")
    Fingerprint .= obj.ProcessorId
MsgBox % Fingerprint
Zelio
Posts: 275
Joined: 30 Sep 2013, 00:45
Location: France

Re: Fingerprint

10 Feb 2014, 10:55

In your case, I guess your UUID will be enough because it is only for your office and you can check easly...

However for sell software that take every case...
Always check that you haven't an empty or a null value, because any id or serial number can be unviable or missing (check quote and google, uuid can fail, mb serial too).
That's why you have to add a condition like this if Fingerprint=0 or Fingerprint="" or allfail or error and !regexist(fingerprint) then regwrite, fingerprint, random_or_onlineregistration_or_datetick() and hash it with md5 or sh1 or anything to format length, character, and form (more elegant, compare,... )
User avatar
Learning one
Posts: 137
Joined: 04 Oct 2013, 13:59
Location: Croatia
Contact:

Re: Fingerprint

13 Feb 2014, 02:22

Thank you for the tips Zelio! :)

[Solved]

Return to “Ask For Help”

Who is online

Users browsing this forum: abitofmaya, AHKStudent, blad4, BreezeB, Google [Bot], LibertyToad, murataygun, Odlanir and 214 guests