Solved

Shareware expiry

Posted on 2001-08-16
6
276 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
Comment Utility
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
Comment Utility
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
Comment Utility
Smurff...how do you get the BIOS date?!
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 44

Expert Comment

by:CrazyOne
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

12 Experts available now in Live!

Get 1:1 Help Now