Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i developed a program but i need it to stop working after one year! so any body have the code for it? or the idea?
Posted

 
Share this answer
 
Please refer to my answer. Here is the link:need guideline to make a demo application[^]

Good luck,
OI
 
Share this answer
 
you can use the windows registry to make the program to not to run in given time...
some values can be saved and you can follow the registry to compare the values
with the system and program....
in the given seconds.... you can stop the program to run.....
 
Share this answer
 
Hello,
I have never tought about this problem until now.
But I have a tought right now , do I get a penny :)

Do you want that your program works in continuity one year ?

Do you want that your program work until First January 00:00:01 hours ?

Do you expect some kind of fraud by the user with date and time ?

In first case :

Theoretically, it is best that the program itself has a built-in clock.
When user starts program it measures the time while program is running.
When user stops program, the passed time is added to previously measured time.
This information is vital for time limitation of using program so it should be
hidden somwhere in hidden or encrypted file , where it can be reloaded and used in
program again.
This way if you limit running program for one year time period , user should
actually be able to use program for period of one year.
That means that program can be used theoretically longer period than one year,
it depends of number of times that user have actually started the program,
and the time that passed while program running.So you could limit number of times for runnig program.

In the seckond case :

The easiest way is to check system date and time after sturtup the program and if it is passed First January 00:00:01 hours , you stop the program.

In the third case :

It is complicated to find out what is the actual date and time
because user can change the system date and time , and make deception.
So you have to rely on alternative means of obtaining information about the date and time.
Maybe by connection on internet, that would be an independent source of information.

All the best,
Perić Željko
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900