The same CPU ID on two Intel computers

Possible duplicate:
WIN32_Processor :: Is ProcessorId is unique to all computers

I am creating an application with a trial function. To find that a user has already used the trial version, the application connects to my server using machineHash .

The machineHash function is as follows:

 string cpuInfo = string.Empty; ManagementClass mc = new ManagementClass("win32_processor"); ManagementObjectCollection moc = mc.GetInstances(); foreach (ManagementObject mo in moc) { if (cpuInfo == "") { //Get only the first CPU ID cpuInfo = mo.Properties["processorID"].Value.ToString(); break; } } return cpuInfo; 

However, it reports my processor ID as BFEBFBFF000206A7 (on two different Intel computers, i5 and Celeron). Googling BFEBFBFF000206A7 also has hits, so it is not unique.

Can someone tell me why this is not unique? I do not want to use VolumeSerial, let the C:\ drive say, because it can be easily changed with a simple command.

+6
source share
1 answer

Instead of using the processor identifier, combine several system identifiers in one line to compare each time the program sends a check.

Use something like this:

 using System.Management; ManagementObjectSearcher searcher = new ManagementObjectSearcher( "select * from " + whatever_id); 

All values โ€‹โ€‹that you can replace what_id can be found here: http://www.codeproject.com/Articles/17973/How-To-Get-Hardware-Information-CPU-ID-MainBoard-I

I would find a few that you want to use, some of which may be unique, but even if you do not use a unique field, you can create combinations that for most purposes will be unique.

+5
source

All Articles