Solved

Shareware expiry

Posted on 2001-08-16
6
282 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
Industry Leaders: 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

Industry Leaders: 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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 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