I have developed a windows application.I just want to set a trial period for 30days. After that the user should get the message about Trial period has been completed and make the buttons to be inactive state. Suggest me some links.
-
3You'll have better luck getting more answers if you accept some previous ones. – David Sep 01 '10 at 11:37
-
Using just C#4.0, you can't. Using Google, you could :) – Benjol Sep 01 '10 at 11:55
-
I tried with google man.Tell something otherthan this – Hemant Kumar Sep 01 '10 at 12:42
-
Similar question: http://stackoverflow.com/questions/2423976/how-to-create-trial-version-of-net-software – JPReddy Jan 28 '11 at 12:24
1 Answers
This is not something which can be done with a single thought. It depends on various factors related to your application. Is your application has access to registry or not? Is it installed with administrator privileges or not.
I can give you some idea on how do it with basic privileges.
Create an encrypted key which takes current system date and some other parameter which you can take as you wish and store this key in a file in the application folder or wherever you can.
Every time user starts the application get the key and decrypt it and check whether the date stored minus today is more than your trial period than based on that you need to do whatever action you can such as disabling buttons etc.
I'm sure there are so many other methods followed by others and everybody has their own criteria and constraints in this implementation.
Some questions you really need to ask yourself are:
How important is what you are trying to protect? How much are you willing to pay (in time, money and effort) to implement this behavior? What are the chances people are going to try and bypass your implementations? Is the cost (in time, money and effort) going to be more than the potential lose in income from people bypassing the trial period?
There is another question on SO with similar requirement, go through those answers as well.