Solved

Shareware expiry

Posted on 2001-08-16
6
277 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now