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

30 Day Timer

Status
Not open for further replies.

dolphin99

Programmer
Jan 18, 2004
12
AU
How do I setup a timer to disable my application say 30 days after it was first run ?

Thanks,
Phil.
 
The simplistic way is to set the install date in the registry, using Savesetting. On each run compare today's date with the registry date (from GetSetting). Use DateDiff to see if 30 days is up.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
OK,
I am just a begginer..
Could you be a little more specific in how I would do that..?

My application doesnt warrant packaging with the deployment wizard, will that change anything ?

Thanks,
Phil.
 
Unless this is merely an application for your own machine, you really do need to think about the packaging and deployment wizard. VB does not produce exes that the processor can simply run as is, but rather ones that reply on a number of specific dlls that are not forced to be on the machine - often called the runtime libraries...

Which function do you require help on - the SaveSetting or DateDiff? If both, perhaps you have bitten off more than you can chew for a first project...

mmilan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top