I have made an updater which checks for the latest update on server and if installed version is less than the version available on server then it downloads the latest update exe from the server using "NSISdl" and replaces it with newer version. This all happens if the internet connection is available. I have implemented this mechanism when I start my application. When application starts it first checks the internet connection using "Dialer::GetConnectedState" and if connection is there then it hits the server and compares the version. Now my problem is, every time when I start my application and when internet is ON my application hits the server everytime even when I have latest update. Can anyone tell me How do I make my updater to hit the server for only once in a day so that every time I start my server it will hit the server only once and for the rest of the day it should't hit the server. Can you please tell me how can I achieve this ??
Asked
Active
Viewed 173 times
1 Answers
0
Every time you check for updates, you could save/update a key in the registry containing the current date. Also, when your program starts, before checking for updates, you should read that key and compare it to current time so you'll only check for updates if current date is newer than the stored one.
You can get current date with ${GetTime}. See this answer from a similar question:

Community
- 1
- 1

Francisco R
- 4,032
- 1
- 22
- 37