Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you Restict the use of a VB6 Application 1

Status
Not open for further replies.

pungy

Instructor
Aug 5, 2007
71
US
VB6-Enterprise edition.

I have an application I would like to distribute. I want to restict the use of the application to either a "day-time-limit" or a "number-of-use" limit. After "x" days or after "x" number of uses, I want to disable the app. If the user "registers" the app with me, this restiction would be lifted.

I have no idea how this is done. Can you help?

Thanks,
Sam
 
You can do it just using regular code but there are always ways around it for the determined 'hacker'.

The most obvious way is to store the date of installation in the Registry and then use DateDiff each time the application runs to get the number of days since installation.

Obvious ways around this if you're a user:
1. Re-install the product
2. Change the computer date to 2050 before installing
3. Compare the registry before and after installation to find the date entry
4. Change the computer date to the installation date before running your program
5. Use Windows System Restore to roll-back the system to a date prior to your installation and then re-install your product

If you can address these issues, you make it harder for someone to bypass your 30-day limit (or whatever).

I wrote a database application that needed to be time-limited, and to make it harder for the user to bypass this date-stamping method I wrote the date of installation into every file that the application generated. That way, if the user reinstalled the product, the existing database was incompatible because the dates no longer matched.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
I'd stay away from getting the time off of their computer for doing your checking. I've "tricked" many trial periods by just setting my clock back. You don't see that as much any more and I think it's because people moved away from that.
 
Andy:
I agree with your thought--you are NOT stopping a user from working around the problem, you are just making it harder to do.

I do like your ideas and I would also add a few of my own. For example, once the date was reached.I could delete all the database files.

I need your help: Can you tell me how to write the install date to the Registry and how do you check that Registry date when you use the application?

Thanks,
Sam
 
This has been discussed here previously, see Thread222-6529.

Patrick

 
Redsmooth:

Thanks for your post. The routine written by Netwalker solves my problem.

Sam
 
Forum Administrators: This Thread can be closed. The problem has been resolved.

Thanks,
Sam
 
That's not the way it works here. Threads don't get formally closed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top