Solved

Shareware expiry

Posted on 2001-08-16
6
281 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
[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
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
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 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Find and Replace Stream with 0s 8 86
TEMBEDDEDWB how can i change its user agent ? 8 104
Base1 Encode/Decode 3 99
firemonkey Android Listview Sort items 7 100
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

737 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