Solved

Shareware expiry

Posted on 2001-08-16
6
279 Views
Last Modified: 2010-04-06
What is the best way to make an application stop running on a set number of days after installation, ie expire after, say one month? Obviously the users must not be able to alter their system date, delete registry keys, or reinstall the software to get round the expiry feature.
0
Comment
Question by:nuttyprofessor
6 Comments
 

Accepted Solution

by:
david-johnstone earned 100 total points
ID: 6392082
I would write a couple of values into an obscure registry key in HKEY_CLASSES_ROOT (no body would ever want to fiddle with things in that key!).

I would store a date and a count in the key.  When the program runs, check if the current system date is different to the date stored in the registry key.  If so, add 1 to the count and store the current date in the other value.

Once the count has reached a certain value, then stop the application running.

If the user changes the date back, then the count will still be incremented as the current date will still be different to the stored date.  Reinstalling the program will not help, as the registry keys will be persistent.  The only way round it would be formatting your hard disk!

Hope that helps!

David.
0
 
LVL 3

Expert Comment

by:smurff
ID: 6392087
Just a suggestion. On installation of your program, create a file deep in the windows directory, I would call it something like *.dll then when you app fires up it can check the BIOS date and compare it to the file. You can then keep a track of it and compare it also to the previous days entry to stop them altering the date.
Maybe? Theres probably some components for it at torry.net too.
regards
Smurff
0
 

Author Comment

by:nuttyprofessor
ID: 6392136
Smurff...how do you get the BIOS date?!
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 44

Expert Comment

by:CrazyOne
ID: 6393350
Well if your applications are something that you feel is worth protecting a great deal here is product we use at the company I work for.

PROTECTION PLUS PROFESSIONAL
http://www.softwarekey.com/prod_serv.htm


One thing I use to do to thwart crafty users was to create a bunch of Registry keys and also create several files and dump them within the Windows sub directories. It is a bit of work to code for all these things but if a user were to delete or modify any of these things my code would pick up on that and the code would remodify or recreate it because there would usually be all the other files and reg settings that were still valid. Once the user has licensed the app then my code would clean out all these things.


The Crazy One
0
 
LVL 5

Expert Comment

by:Gwena
ID: 6394852
You can make tiny alterations in .txt .doc .hlp files that are in the windows directories. Don't mess with exe files or dll's
Encode the start date for your demo and store that... then have your program store the current date in a different place each time it runs... if it ever detects a current date that is earlier than the last date it stored you will know the system date has been set back.. and if the current date ever exceeds the set number of days in relation to the start date then the trial period is over :-)
0
 

Expert Comment

by:enricco
ID: 6407569
Here's a clever way to do it: Create a string constant (or even an initialized string variable) in your program, something like: "ZCZC...". Now, you can treat this string as storage space. Everythime your program executes you go and look for the string in the actual .EXE file. In the example, the string starts with ZCZC. Once you locate the position of such string you may store some data after ZCZC but you have to make sure you do not touch ZCZC itself as it is your locating point. You can store many things, like the number of thimes the program has run as well as the last date it was run. Your program can then read these values and decide what to do next. You can even encrypt the data if you wish. Here's the interesting part: if the program gets copied to a different location the data is kept.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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