Click here to Skip to main content
15,073,472 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)

how to create trial period setup file for 30 days of my c# windows application

Please Reply Me..

You can have sort of licensing feature in your application.

There are different ways to achieve this
1) encrypted license files that contains the expiry dates etc.
2) encrypted license keys held in the registry
3) challenge/response mechanism which require an internet connection
4) probably others.......
Try: License Key Generation[^] or: How can I create a Product Key for my C# App[^] or: c# Licensing[^]

Cryptography 101 for the .NET Framework[^]
If I told you, if there was one single way, that everyone used, then surely you realise that everyone would know how to defeat the system ? You need to think of a way. I tend to store the date the app was first run, and the system date when it was last run, in a file that I try to hide in the system, Vista makes this harder to do. Then you can tell if someone wound back the clock to get more time, as well as if their trial is over.
al-foysal 6-Jan-16 2:03am
yeah you are right. can you please go through the following example:i install an app on 1 jan 2015,so according to your solution the value of first run:1 jan 2015
if closing on the same day that time value of last run:1 jan 2015.Now question is that if i open the app after 5 days and alter system date to 2 jan 2015 ,then last_run= 2 jan 2015. now how can i prevent this ? any idea plz
You're back. Use google to find a library that does what you want. there are literally dozens of ways to do this, certainly too many for us to list here.

Like I said yesterday, it's a waste of time. Anything that can be done with software, can be UNDONE with software.
Espen Harlinn 8-Jan-11 12:38pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900