I have to store a demo install date somewhere on a client PC. The app demo period is calculated on the install date. Obviously it must be impossible for users to edit or delete this value.
How can this be done ?
- We can’t use HKLM registry because of Citrix
- Can’t use /Program Files because of Vista
- Can’t use /Documents and settings because of Citrix
- erm … is there anything left … besides asking the user “Choose the location you want to store the install date” .. 🙂
A solution would be to connect to a server and validate it there, but that would mean an internet connection is Required, which, .. sucks ..
You could create a simple file with the date, together with some machine specific information and sign it.
The rule would be: if the file is present and the signature is valid and the environment is correct and the date is still in the future, only then the demo will start.
This prevents from changing the file or using a file from a different machine. It doesn’t cover the problem, that one might change the system date…
About your concerns – if the license file is missing, the software will not start. And the user can’t create the license file, he’ll get it from you (you need to sign it – the use can only validate if the signature is correct). You may ask him for a MAC address, add the address to the license file, just to make sure, that the license file cannot be used on a different machine.
And about uninstall – the user can keep it – it will be worthless the day after the demo period ends.