markus.ebenhoeh
Posts: 2
Joined: Mon Dec 05, 2011 4:24 am

updater.exe /justCheck with check frequency

Wed Dec 14, 2011 5:17 am

Hi!

We are packaging a Tomcat web application. I put shortcuts to the URL on the desktop and under the start up menu. Everything works fine.
We now want to check for updates before starting the application in the default browser. So I created this silly script and added shortcuts to that script instead.

Code: Select all

@echo off
echo checking for updates
"[#updater.exe]" /justcheck
set checkResult=%ERRORLEVEL%
echo update check result = '%checkResult%'
if %checkResult% EQU  0 (
     echo found update, running updater
     "[#updater.exe]" /checknow
)
if %checkResult% EQU  -536870895 (
     echo starting up the application
     start http://[AI_TOMCAT_HOSTNAME]:[AI_TOMCAT_HTTP_PORT]
)
echo all done 
Works fine, it seems.
I am aware that users could simply by pass this script by directly accessing the URL.

But I would prefer the check only to happen once per day, since some of the users will have very slow internet connectivity when in the field.
Apart from writing my own little frequency check, what are my options?
Or what better way to achieve the same goal?

Thank you,
Markus

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: updater.exe /justCheck with check frequency

Wed Dec 14, 2011 1:16 pm

Hi Markus and welcome to Advanced Installer forums,
Apart from writing my own little frequency check, what are my options? Or what better way to achieve the same goal?
You can try to integrate the updater in your application:
http://www.advancedinstaller.com/user-g ... dater.html

The frequency check can be configured from the Updater page in the "Run Updater" section:
http://www.advancedinstaller.com/user-g ... -page.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

markus.ebenhoeh
Posts: 2
Joined: Mon Dec 05, 2011 4:24 am

Re: updater.exe /justCheck with check frequency

Thu Dec 15, 2011 3:17 am

Hi!
Thanks for the reply!

I think I do not understand the suggestion, though; I have read the updater documentation and tried to find similar topics in the forum, but I probably am starting from the wrong assumption anyway.

As far as I understand, "updater.exe /justcheck" does not take the “check frequency” into account.
I again looked at the example code that shows how to integrate the updater into a native application, but this seems to just run the updater.exe as well, so this would not allow me to just check for an update based on the on the "check frequency".

So I guess if "updater.exe /justCheck" does not take the "check frequency" into account, then I have to create my own indepenedent check of the "check frequency" before I call "updater.exe /justCheck"

Another issue I am having is that in a virtual test machine, when I "disconnect" the network, it takes a minute for the check to run. From reading the forum, there is now way to set the time out on the updater. Is that correct?

Thanks you,
Markus

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: updater.exe /justCheck with check frequency

Thu Dec 15, 2011 3:39 pm

Hello,
As far as I understand, "updater.exe /justcheck" does not take the “check frequency” into account.
Indeed only /silent, /silentall or /silentcritical support the frequency check value from the Updater page.

If you want to check and let the users decide which available updates to install, you should use /silent option. To install all updates automatically, you should use /silentall.
From reading the forum, there is now way to set the time out on the updater. Is that correct?
Yes, I'm afraid that's correct.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

AdvInstTester
Posts: 8
Joined: Fri Jan 05, 2024 2:55 pm

Re: updater.exe /justCheck with check frequency

Tue Feb 20, 2024 12:09 pm

It is old question, but my suggestion to new viewers, who will read this post.
Make a timer event like in c#, DispatcherTimer (wpf) or Timer (winform), set it interval time and call update.exe with justcheck argument. It will check for update after specific interval of time which is set by you.

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: updater.exe /justCheck with check frequency

Tue Feb 20, 2024 3:56 pm

Hello,

Thank you for your suggestion.

I'm sure this will help others facing a similar scenario to yours.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”