Forum Home
Press F1
 
Thread ID: 61209 2005-08-28 11:29:00 Unique identifier in Windows? andrew93 (249) Press F1
Post ID Timestamp Content User
384262 2005-08-28 11:29:00 Hello everyone

Is there an identifier within Windows that can uniquely identify a PC? For instance, is there some sort of registry key that says this is 'me'? Why I'm asking is to determine if some software is being run from a particular PC or not. If it is running on my PC then ok, but if the software is being run on a different PC then I want to be able to detect that (i.e. within the software itself). If there is a unique identifier, whereabouts in the registry will I find it? And is it in the same place for varying versions of Windows?

TIA, Andrew
andrew93 (249)
384263 2005-08-28 11:42:00 If the pc has a network card and is using a network connection to run that application then the answer is yes

Every network card has unque address known as MAC address it is possible to strip this address from IP packets.

As far as the reg key its held in I'm not sure, do an ipconfig /all (Physical Address) from a cmd prompt then search the registry for that string.

We strip this information for logging info on our network

check your pms i have pmed a site with vb6 code snippet
beama (111)
384264 2005-08-28 23:02:00 Thanks for the info and the links beama. I'll give the VB script a go (given I was using VB anyway, so that's perfect). But I do have a couple of questions. The mac address in the network card - is that unique to the network card such that there no other card in the world will have that number? Is that correct? Secondly, is there a unique identifier for a PC without a network card?

Thanks, Andrew
andrew93 (249)
384265 2005-08-29 00:25:00 The MAC address is not repeated in any other pc world wide. It is unque to the network card.

Unless you create a unique identifier (create a reg key on app install) I know of no other way to id a machine except you maybe able to intergate the cpu for its serial number. But this method could possibly have privacy issues ( as Microsoft found out).
beama (111)
384266 2005-08-29 02:07:00 if you use the MAC method There is a registry key that holds that indetifer do a google on "registry key and MAC address" secound search item half way down the page beama (111)
384267 2005-08-29 04:42:00 You could always compare the Windows Product ID value to that which yours is set to. Chilling_Silence (9)
384268 2005-08-29 05:15:00 The MAC number is "unique". Up to a point. It's a 48 bit number. The first 24 bits are allocated to a manufacturer, by the IEEE, I think. The last 24 bits are assigned by the manufacturer, usually in a straight numerical sequence, to the equipment they produce. That's only 16 million addresses, so some manufacturers have a number of allocated numbers. The MAC was usually in a programmable chip, then in an EEPROM. Now it might be laser burnt in a chip which does all the work.

But it's possible for people to programme their own MAC chips. Some Ethernet cards can have the MAC number changed by software. I've got a parallel port Ethernet adapter which has this feature.

If someone wanted to beat your system there are plenty of ways this could be done. ;)

Slightly more secure would be the Intel CPU serial number. Of course this might rule out AMD CPUs, Alphas, etc.
Graham L (2)
384269 2005-08-29 11:02:00 Thanks for the replies everyone.

beama - have you used the code from this lnk you provided? (www.osix.net) I'm getting an error on the first line (I'm using VB6 on a Win98 PC). If I create a new project, add a module, and copy the code, it doesn't like the first line 'Option Explicit Public' and if I comment the line out the error shifts to the 2nd line. Any thoughts?

Graham and Chill - have you any suggestions or thoughts with extracting the suggested identifiers?

Cheers, Andrew
andrew93 (249)
384270 2005-08-29 14:18:00 Absolutely none sorry :)

Im not a Doze programmer, coming up with thoughts/suggestions is the easy part ;)

Mind me asking why you want to do all this?
Chilling_Silence (9)
384271 2005-08-29 20:04:00 Thanks for the replies everyone.

beama - have you used the code from this lnk you provided? (www.osix.net) I'm getting an error on the first line (I'm using VB6 on a Win98 PC). If I create a new project, add a module, and copy the code, it doesn't like the first line 'Option Explicit Public' and if I comment the line out the error shifts to the 2nd line. Any thoughts?

Graham and Chill - have you any suggestions or thoughts with extracting the suggested identifiers?

Cheers, Andrew



Not completly, I did test it briefly, havn't had time to debug the code completly yet (see what today brings).

But the MAC addrress is readable from the registry, pm me if you want the hive location.
beama (111)
1 2