Solved

Application expiry strategy

Posted on 2011-02-23
10
373 Views
Last Modified: 2013-11-23
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
Comment
Question by:Aurii
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 17

Accepted Solution

by:
Dejan Pažin earned 125 total points
ID: 34960110

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
 

Author Comment

by:Aurii
ID: 34960603
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
 
LVL 47

Expert Comment

by:for_yan
ID: 34963895
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!

 
LVL 37

Expert Comment

by:zzynx
ID: 34978963
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
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 34979675
>> I have used the 1st solution earlier..

Why wont you use this solution any more?
0
 
LVL 5

Assisted Solution

by:aciuica
aciuica earned 250 total points
ID: 34981814
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
 

Author Comment

by:Aurii
ID: 35014714
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
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 125 total points
ID: 35014754
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
 
LVL 5

Assisted Solution

by:aciuica
aciuica earned 250 total points
ID: 35015152
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
 

Author Closing Comment

by:Aurii
ID: 35187926
This solution worked but its' not perfect solution
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question