In my opinion putting a secret key information in the registry is the simplest way to go. As long as you make it something nonsensical then you should be able to keep honest people honest.
Another way is to get the actual sector of where the exe is installed and store that in the registry as well. An app rarely installs in the same location on someones hard disk.
Of course someone intent on stealing your app will do so no matter what protection you use. Hackers enjoy a challenge.
For example they could backup their registry before installation and then after installation compare the two to find out what and where your key is. It would take someone with technical know how to read the registry though.
Costas
>Hi, Edward
>
>One way to do it, is to find the serialno. on the harddrive you install your app. on, and save it in an .ini file.
>
>Each time your app. is started it checks the serialno. on the harddrive. If they don't match, then "do something bad to the user".
>
>
>
>>I have developed an application which will be used by over 50 locations. I would like to prevent my application from illegal copy usage by unlicenced users. Is there any way to enact it?