Click here to Skip to main content
15,886,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
For issuing licenses for a certain computer, what would be a good way to determine a unique, globally distinct computer (windows) based on their hardware.

What I have tried:

1- CPU ID but it is unique to each processor type not to each processor part

2- Motherboard Serial Number is unique but in many devices this string appear instead of the serialnumber "To be filled by O.E.M."

3- MAC address should be unique but collisions can occur - can be changed and easy to replace the device or move it from device to another. also it can be overridden in software and A single computer can have a large number of interface cards.

4- Harddrive serial should be unique but for each individual manufacturer and can be changed also the users change and format its HDD many times.
Posted
Updated 28-Oct-19 8:01am

If you really want to uniquely identify a computer you have to collect info on all hardware and somehow combine that into a single code...
However this method is extremely problematic from the point of view of the end user... For instance the upgrade of a HDD will break the license (see Microsoft)...

A good method would be providing dongle with a code (like old time cartridge protection)... In that case only the computer with the dongle can have the software run (which does not prevent transfer, but prevents multiple use)...

Of course you can define a set of hardware to define uniqueness - like exclude monitor and HDD - in which case only less frequent changes (like CPU or network card) will brake software... In any case you have to think of a way to re-enable the software with not much effort...
 
Share this answer
 
Comments
Golden Basim 28-Oct-19 5:28am    
i can't use dongle because of the location of my customers. if i used HDD serial no. , the serial will change with formatting disk ?
Kornfeld Eliyahu Peter 28-Oct-19 5:41am    
Formatting will change the software serial (since DOS it called volume serial number), that's why you should look for hardware serials...
Golden Basim 28-Oct-19 6:35am    
private void GetAllDiskDrives()
    {
        var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");

        foreach (ManagementObject wmi_HD in searcher.Get())
        {
            HardDrive hd = new HardDrive();
            hd.Model = wmi_HD["Model"].ToString();
            hd.InterfaceType = wmi_HD["InterfaceType"].ToString();
            hd.Caption = wmi_HD["Caption"].ToString();

            hd.SerialNo =wmi_HD.GetPropertyValue("SerialNumber").ToString();//get the serailNumber of diskdrive

            hdCollection.Add(hd);
        }

 }

i think SerialNo is a hardware serial ????
Kornfeld Eliyahu Peter 28-Oct-19 6:39am    
Yes. 'SerialNumber' is hardware serial and will not change until physical replacement...
Golden Basim 28-Oct-19 10:24am    
thank you , i think that i will combine HDD SerialNumber & ProcessorID and MotherBoard Serial.
See this CodeProject article: A Ready To Use Software Licensing Solution in C#[^]
 
Share this answer
 
Comments
Golden Basim 31-Oct-19 18:38pm    
i have online system which auto generate the license after payment process. also i linked my software with the licensing system using API. thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900