How to uniquely identify a system

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

How to uniquely identify a system

#1 Post by Ed Dyreen » 13 May 2012 13:52

http://www.dostips.com/forum/viewtopic.php?p=16191#p16191
http://www.dostips.com/forum/viewtopic.php?p=16251#p16251
abc0502 wrote:Hi Ed, sorry for PM u and i know u said
But I won't deviate this topic any further, 8)

But isn't the Process ID is a unique 16 letters & number and can not be duplicated like the mac address, so i tried that code using the WMIC CPU GET ProcessorId command and it worked

Code: Select all

@echo off
cls
For /f "tokens=1" %%a in ('WMIC CPU GET ProcessorId ^|find /v "ProcessorId"') Do (
   If %%a==XXXXXXXXXXXXXXXX ( echo ID Verified
   ) else ( echo Access_Denied )
)
pause

replace the Xs with ur ID number.
:wink:

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to uniquely identify a system

#2 Post by Ed Dyreen » 13 May 2012 13:53

'
Instead of testing the motherboard, why not test the CPU :idea:

I used the MAC address before which can be duplicated and on occasion two systems will have the same MAC address although the chances are infinitely small.

I've verified with only two systems so far and not only is ProcessorID filled, it also proved unique so far.


Great, thanks abc0502 :D

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: How to uniquely identify a system

#3 Post by abc0502 » 14 May 2012 12:12

I'm Glad it worked fine, thanks for the feedback. :D
I tested on Two PC till now and they have different IDs.

Post Reply