Handle 0x0002, DMI type 1, 27 bytes System Information Manufacturer: Dell Inc. Product Name: Vostro 1720 Version: Null Serial Number: 996C4L1 UUID: Not Settable Wake-up Type: Power Switch SKU Number: Null Family: Vostro Handle 0x000F, DMI type 12, 5 bytes System Configuration Options Option 1: Jumper settings can be described here.
Introduction
For licensing purposes, according to me, the best and secure way is to generate a unique key for the client's machine and provide a corresponding license key for that key. For this purpose, you can take help of the unique id of the client's computer motherboard, BIOS and processor. When you get these IDs, you can generate any key of your preferable format.
Year ago, I found a very handy and useful code in C# by searching the Internet to get these IDs. And it's serving me perfectly so far. Thanks to the original author of the code.
I added some additional code to generate a 128 bit key of a machine. The output is a nice looking key in hexadecimal format (eg. 4876-8DB5-EE85-69D3-FE52-8CF7-395D-2EA9).
Suggestions
I have a few suggestions in this regard:
- Generate a key from only the Motherboard, Processor and BIOS since the user normally doesn't change these parts.
- Don't use MAC ID, Graphics Card ID AND Disk ID since it's very common to change these devices.
- It takes significant time to get IDs of devices. So make the finger print generating function
static
and save it in astatic
variable so that it generates the key only once in the whole application.
The Code
Here is the class. The code in the region 'Original Device ID Getting Code' is from the original author.
Upcoming Code
Later I'll show how I generated the license key from the unique machine key. The license key contains a lot of information like the Product Name, License Start Date, End Date and the Key.
Keep eyes on my blog (sowkot.blogspot.com).
History
- 19th August, 2008: Initial post
My Other Articles
Introduction
For numerous reasons, you may need to access system hardware information. One example is when you have created a software and you want to put a lock on that software.
One of the most efficient ways to do so is to get one of the IDs of a piece of hardware in the target machine and then plan your software so that it can just work with the computer that has the same ID. Since some hardware IDs (and not all of them) are unique, you have very simply created a lock!
Notice
In the first versions of this article, I thought that the Processor ID was unique, but some other users told me that they had tested the Processor ID in different computers and sometimes they give the same result. So you should consider this and not try to just rely on Processor ID. I suggest that you combine it with some other IDs such as Motherboard, USB Controller, Bios, CD-ROM Drive and so on.
Another example is the need to get hard disk information, its partitions, and the free space on each partition. You may also require the hardware information while working on a multimedia application when you need to have complete information about the sound device and the VGA device of the target machine. An excellent use of this application is getting information about the memory of the system and valuable information such as the device memory address, memory device and so on.
Using the Code
Cpu Serial Number Linux
First of all, you have to know that the application function is using some System.Management
classes. So you need to add this line of code:
To get hardware information, you need to create an object of ManagementObjectSearcher
class.
The Key
on the code above, is a variable that is replaced with appropriate data. For example, to get the information of the CPU, you have to replace the Key
with Win32_Processor
. A complete list of these keys is given below:
Java Serial Number
First, call the Get()
method of the ManagementObjectSearcher
object that this application calls the searcher
object. This will fill the object with the information you need. After that, you need to process the data that is in the searcher
object.
Serial Number Lookup
Each ManagementObject
has some Properties that are useful for us. Of course the Data of those properties is needed and we can process them like this:
Intel Cpu Serial Number
The other parts of this application are nothing but working with the ListView
control and that is really easy!