• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 380
  • Last Modified:

Application expiry strategy

I have developed an application in java swing.. I am going to give it to my client for trial. I want that the software to stop its working after a specified period.. how can i do this??
0
Aurii
Asked:
Aurii
  • 3
  • 2
  • 2
  • +2
4 Solutions
 
Dejan PažinCommented:

There are many ways to do this, depends on secure you would like to make it.

Here are some examples:

1. Check the system date and compare it to a hardcoded date. Obviously, the client can change the system date on his local machine, and pass by this date check. But this is the simplest solution.

2. Create a webservice and have the application call the service with a unique key, and the webservice then checks if the key is still valid.
0
 
AuriiAuthor Commented:
I have used the 1st solution earlier..
My client wont be using internet hence i cant use the 2nd solution also..
Is there any other solution apart from these?
0
 
for_yanCommented:
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
zzynxSoftware engineerCommented:
You could use an encrypted "license file" that contains an expire date. (This way you don't have to recompile your program for each different expire date you want)
At start up your program reads in that file, decrypts it and determines the expire date.
Of course, setting back the clock does always work to bypass these ways of working.

At installation time you could write an encrypted expire date (today + x days) in the registry (in a well hidden place).
0
 
Dejan PažinCommented:
>> I have used the 1st solution earlier..

Why wont you use this solution any more?
0
 
aciuicaCommented:
I think that this first solution can be improved if you store at startup the system date and every time compare compare the system date with last stored date. If the system date is smaller than last stored system date you know that the user changed back the date and you can make the application expired.
0
 
AuriiAuthor Commented:
But user can log in many times in single day. If today is 2/3/2011 then we can store this date but on next day "before log in" user can set same date 2/3/2011. By this way if he set same date on each day before login then we can not make the application expired.
0
 
for_yanCommented:
But if along with checking that the date should not be later than certain pre-assigned date,
you will also  encode the date and store the date at each startup and
then check on the next startup that the date + time should be later than on previous startup
and then do not go forward if (1) the current date is before the stored date or (2) later than pre-assigened date - then
eventually this date chasing will become very annoying for any user.
0
 
aciuicaCommented:
Let say date-time (timestamp).
Ok, if the user take care that the "system changed date-time" is always < "expiration date-time" but > "last started date-time".
It is steel possible to trick that, but it is one more check.
And This stored "last started date-time" is probablly better "last stoped date-time" - the last date-time which the apppllication know.
0
 
AuriiAuthor Commented:
This solution worked but its' not perfect solution
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now