how to create trial period setup file for 30 days of my c# windows application?
The Office trials are written to explicitly prevent you from installing the same trial twice on a computer. Since the Office Pro trial has expired on this computer you have only one option. You would have to RE-INSTALL WINDOWS.
All you have to do is take a snapshot of your Windows Registry before you install the trial for the first time. Then install and use the trial, and when the time period runs out, uninstall it, then restore the Registry to the saved values it had before the trial.
In this case, when the program is installed, it creates several files in different locations, especially the ones that are related to Windows functioning. Based on the data written to these files, the program can detect if the trial period is still remaining or if it has expired.
Making C# application a 30 day trial version
http://www.dotnetspider.com/forum/130150-Making-C-application-day-trial-version.aspx
How to add more functionality in setup file? - C#
http://www.daniweb.com/forums/thread226490.html
One possible solution is to use the registry and write there in some key the installation date. This step is done in the installation time/ first time the application is in use. Then periodically check the current date against the installation date.
You can take also these references:
http://www.codeproject.com/KB/cs/Trial_Maker.aspx
http://trial.qarchive.org/
Using .Net built-in classes
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