I have created a program with a 30 day trial period in VB.Net. The program saves the time in the registry that the program was first launched and also the time is was used last. From that I calculate if the trial is still valid.
The problem is, the only place in the registry that a non-admin user can access is the HKEY_LOCAL_USER key. I need to implement the trial for all users, otherwise a user can just use a new account and that would reset the trial.
Where can I save this information so that a user without admin rights can read and write from that location? I also want to save it in a place that the average user can't find too easily and delete the file that would reset the trial.
Thanks
I am not sure anyone has found a definitive answer for this. The only way is to store the data with you and not with the client - so do a web call on installation, and on every startup, and store the data on your server.
Which, unless you have an especially serious problem, is very OTT.
Short of that, encrypt and save the information on a file in the install directory. Encrypting it should make sure that the value cannot be changed, and if the file does not exist then do not allow access.
But it all depends how critical the trial period is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With