Click to See Complete Forum and Search --> : Locking an Application
kiransangita
May 18th, 1999, 09:37 AM
Hello:
I have been working on an application that is fully functional, as everyone wants to try it before buying it, I want to lock the application after the user uses it for a certain no. of days (say, 30)or certain no. of uses (say, 30) of the application.
Any help in this regard is greatly appreciated. Thanx in advance.
Kiran
Marqy
May 18th, 1999, 10:14 AM
Depends on how smart-arsy you want to be. The easiest to implement (and get around) is to write the date/time at install time into some private (probably encrypted) file. Every time your app runs it checks the current system time against the contents of the file written at install. Once the specified length of time expires, no more executions. When they register, you send them a registry key which your program is looking for. When it detects it's existence, don't do the date/time check anymore. I implemented someting similar to this, the only drawback is if they set the date/time on the PC to some date in the future when they install they can get free usage, but you can detect the date moving around and bomb out due to suspected fishy-ness.
Number of uses is easier, just write to a private, hidden, encrypted file somewhere the number of times you've been run (or store it in the registry). Same trick with the registry key when they cough up the registration fee...
MJA
Dan Haddix
May 19th, 1999, 01:24 AM
This is not a direct answer to your question, but I have a program called EasyIcons 98 which I think has a very clever approach to detering over usage of shareware. What it does is count the number of days over the trial peoiod at a rate of about 1 per second before allowing access to the program. This is no big deal when the user is a week over due, but once they get to 4-6 weeks over due and have to wait an extra 30-45 seconds just to start the application they will get so impatient they will either pay or stop using it. The one thing you should do to make sure this is an effective method, is to use a randomly named DLL (nothing that resembles your program name) to keep track of the days. This way the user can't just uninstall and reinstall the app when they overrun the trial period.
sbrandwood
May 19th, 1999, 06:13 AM
I use a password protected database file.
This way I can store system control data there.
The date thing is the easiest way of doing it but it has the drawback of users setting back the system clock and getting unlimited usage...What I generally do for these demo releases is everytime the package is activated I increment a number and when if this number is above fifty I lock the app. This means you will have to link to a DB though. I don't know whether you want to do this but as long as the DB is password protected then you will be okay.
SB
PS Forever Everton
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.