Posted on 2005-05-08
I have written a VB.NET 2003 application which I would like to reduce the possibilities of people making illegal copies. Therefore, I wrote some code that when the program is run for the first time, it gererates a random code. The user must then e-mail or phone me and read this number to me. I then type it into a little program I wrote which performs some simple calculations on it and spits out another code. I then give this to the client to punches it into the program. The program performs the same calculation on the original number, and if it matches the number I gave him, it unlocks the program. It can even unlock the program for a certain number of days (basically extend the trial period) depending on what code I give him. Just two problems:
1. The trial number of days left / unlock status is stored in the registry and can therefore be modified my anyone with some Windows knowledge. What is the best way to encrypt this number?
2. Is there a program or code that does more or less what Windows XP Activation does - where instead of randomly generating a number when the program is run for the first time, it generates a number based on the user's hardware? That way I can tell if he is installing it on another machine if he phones trying to get another unlock key. Also, if he formats and reinstalls the program, the same unlock her from before will still work.