05-03-2010 04:01 AM
Need to use the id for software liscence control and protection.
Thanks.
05-03-2010 04:05 AM
On Win, it's most likely stored in the registry. You can get the id from the hardware manager and then search the registry for it to find the locations. There might also be some API calls (kernel32.dll). Google Bing on MSDN.
Felix
05-03-2010 06:02 AM
Select "Start -> Programs -> National Instruments -> NI License Manager"
From the Manager, select "Options -> Display Computer Information"
Or from the DOS prompt; change directory to "C:\Program Files\National Instruments\Shared\License Manager\Bin\"
and then run generateComputerId.exe
05-03-2010 12:59 PM
The CPU ID is a very unreliable way to identify a computer because the way to get it differs for different CPU brands and it also is up for interpretation even between CPU families from the same manufacturer. What is more it does not really distinguish computers very much since all CPUs of the same series will have the same ID.
The CPU serial number which would be unique never made it and only a few Pentium chips had that unconditionally enabled. After that Intel allowed BIOSes to disable it and most did and more modern Intel CPUs don't have the serial number anymore.
05-03-2010 08:52 PM
I am using it to protect my own software.
I may need to call some dll file to get it.
If the cpu id not good, can I use the network card id or motherboard it, since I already using the hardisk id.
Any suggestion, thanks.
05-04-2010 12:39 AM - edited 05-04-2010 12:47 AM
While I haven't protected any software yet I have played around with this myself a little out of interest how to get at these informations. My findings are, that there is no reliable method to get at any of these informations under all circumstances. For instance any method but raw disk device access fails to retrieve the serial number of my built in SATA drive. But raw disk device access is only possible with administrator rights. It seems not to fail on all computers as others seem to be successful with this, I have no problem to retrieve ATA or SCSI device serial numbers, but SATA on my notebook is not possible without being logged in as admin.
The same or similar limitations apply to other uniquely identifying information pieces on computers. The basic thing I found out is that there is a likely chance that you can retrieve one of these informations on most computers, but never all if you do consider the requirements to run as admin as unacceptable, which I do.
The network card MAC is probably the most likely candidate to be retrievable even as non admin on most computers, but this can be easily changed with special programs by users to anything they like, and of course you do need a network card in a computer to be able to retrieve its MAC address. Granted it is fairly unlikely nowadays that a computer doesn't have a network card but I've seen high throughput production systems where the network was disabled in the BIOS for security reasons.
Motherboard ID needs physical memory access that is only possible with a kernel device driver and installing such a beast is not exactly what most customers would be happy with and its installation needs admin privileges too, in Vista and higher supposedly even evelated rights meaning you have to go explicitedly through an UAC on startup of the process to get enough privileges to install device drivers.
05-04-2010 01:45 AM