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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENT!!! TIME RESTRICTED CODING

Status
Not open for further replies.

frenz101

Programmer
Aug 8, 2002
1
IN
HOW CAN WE MAKE A SOFTWARE WHICH WILL EXPIRE AFTER A LIMITED TIME
e.g, ANTIVIRUSES

TELL THE CODE IN ANY LANGUAGE
THANX
 
If you are asking how to modify a software you have written so that it expires after a fixed number of days, just add some code to the system startup.
On startup, check an obscure and poorly labelled section of the windows registry for a specific key. If it does not exist, create it and store the current date in it. This should only happen the first time the software runs on a given machine.
On every startup after the first, checking for your new registry key will return the date that the software was installed. When this happens, don't update the value in the registry to the current date. Rather, compare the value with the current date and if more than your maximum number of days have gone by, display an expiration date and close down your application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top