Solved

Application expiry strategy

Posted on 2011-02-23
10
370 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
  • 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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 
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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

810 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