Click here to Skip to main content
15,899,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm writing some software that I have to ensure can only be installed on one machine. The plan is to have them download the application. The first time the application is ran, the app will find this unique value on the machine, encode it, and instruct the client to send it to us to get their license number. Then, of course, the value they gave us will be used to construct a license number that will only work on that machine.

A unique value per machine would be the best, but I'd settle for a unique value per the installation of windows (XP) on their machine. Does anyone have any idea what value I could use?

Thanks n Regards,
Posted

I don't advocate such a solution. Windows XP used to do something like this and it was a total pain in the a**. Since all kind of machine relevant bits were used to calculate such a machine identifier this identifier is very much dependant on the currently installed hardware. If the customer decides to install a new device (or a CPU) for instance or replace an existing one the caculated code would change and the customer would have to request a new license key.
I'm not telling you not to do it the way you intended to, but I'm only saying to consider the consequences for the customer and for you. :)
There are other ways to go like Google for example. They don't sell you their search product, but you can buy or lease an appliance (HW & SW combination).
To make it easier for us to help you could you elaborate a bit on what kind of product you have developed.

Best Regards,

Manfred
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 3-Mar-11 11:59am    
I think I agree with you, my 5.
And I bet there should be much better architectural approach; we only need to know the ultimate goals.
--SA
try

{

     string cpuInfo = String.Empty;

     ManagementClass mc = new ManagementClass("Win32_Processor");

     ManagementObjectCollection moc = mc.GetInstances();

     foreach (ManagementObject mo in moc)

    {

          if (cpuInfo == String.Empty)

          {     // only return cpuInfo from first CPU

                cpuInfo = mo.Properties["ProcessorId"].Value.ToString();

          }

    }

     return cpuInfo;

}

catch(Exception ex)

{

      throw new DataStoreUniqueMachineIDException(

     "Error while calculating the unique machine ID.", ex);

}
 
Share this answer
 

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