Click here to Skip to main content
12,625,166 members (38,318 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#3.5
I have a desk top Application(c#.Net) which has a date check and saves the date in a file during the time of installation.My requirement is suppose if the system is formatted this date file will also get formatted and this particular file cannot be recovered.
Is there some way so that even if the system is formatted we can get the date when this particular application is installed. Some way to check in the application itself.
Posted 7-Oct-12 23:21pm
Updated 7-Oct-12 23:45pm
Erik Rude 8-Oct-12 4:31am
Try searching for licensing - I guess what you want is a bullet proof method to make sure unauthorised use of your software is not happening. Lots of methods are mentioned here and also a bit of philosophical discussions on whether it is worth it or not.
sanjaym100 8-Oct-12 4:43am
I am having a licensing created for my application ie install date check till a period
for 2 years but once if the system is formatted this will not work accordingly.because the install date will change i need to have the first install date.
Why don't you embed the date in the installer itself ?
sanjaym100 8-Oct-12 6:06am
could you please be more specific about this
You can use dual licencing - 1. Generate a licence key that will expire after a particular date. Embed this function in your application. 2. Generate another key for a particular machine. I have added my answer as solution below..
sanjaym100 8-Oct-12 8:25am
I think i did not make it clear.
I am having a licensing(this is not a trial) created for my application ie install date check till a period for 2 years. But incase once if the system is formatted this will not work accordingly.Because again when the application is installed the date will be based on the current date when the application is being installed For eg: I installed on 01-04-2012 but if system is formatted today and the application is installed the date check will be from 08-10-2012 to 2 years time.
I got your point. My answer is NO. There is no fool proof method to detect the previous installation after the disk is formatted. In your current licencing system If the system is formatted, it will not be able to detect the previous installed date. So inorder to overcome this, I suggested you to use a licencing system that is NOT dependent on the installed date, but will be dependent on the expiry date. Even if the system is formatted any number of times and the application is installed any number of times, the key will expire on a pre-defined date, which you can set to 2 years, from the day your client buys the licence.

And when you yourself say that the licence is for 2 years, isn't it for a 2 year trial period ?
sanjaym100 8-Oct-12 8:47am
Ok. but either way install date or expiry date we need a solution to get the date when the system is formatted.
No.. This is not the fool proof method. There are hundreds of ways to format a disk. And thousands of ways to recover the data after formatting. You cannot write your code for all of them. And remember the thumb rule - the disk belongs to the user. He can hack it any way he wants. Why not secure your app from your code itself INSTEAD OF keeping a dependency on user's machine....
sanjaym100 8-Oct-12 9:09am
Only thing i need is a way to check this time frame through some method.An application can be hacked but the point is it should not be done so easily. thanks for your comments and time.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Use the activation key for activating the key on a specific computer. This way one setup will be installed on one system pnly
Software Copy Protection for .Net Applications - a Tutorial[^]

Use the trial key maker to generate the trial key ; in your case a trial period of 2 years
Application Trial Maker[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 8 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100