Auto Updater Questions: - Page 2 - Advanced Installer Community
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Auto Updater Questions:

Hi Dan,
I like the improvements to the Updater EXE in v11.1. But still I haven't found a way yet to "force" the user to download our latest published version.

Our current method is to offer them a modal dialog (forcing them to choose an option before continuing) and the two options are:
  • "download and install now"
  • "download and install later"
if "now", then we exit our app, start the download process and then when downloaded immediately start the installation of the latest version.
if "later", then we download in the background and when the user exits our app we will silently install the latest version.

This means that they can really only delay the installation of our version for one session. Which typically means they can only delay for about 1 day.

How would this be achieved using the AI's latest "Updater EXE" programme?

It seems like I can force them to acknowledge the "Updater EXE" by launching it modally using (say) the ShellExecute & WaitSingleObject APIs, but how do I prevent them from being able to cancel or close the dialog without downloading?

Thanks.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Auto Updater Questions:

Hello Kevin,

In order to achieve that, you can use the following approach:
You can call the Updater and check for updates using the /justcheck command line option.
Using this option, the Updater just checks if new updates are available and uses a return code to tell that. This check is silent without UI. If there are any updates then its status information is 0 (found updates for the application) and you can prompt the user with the related dialog.
"download and install now"
For this you can use the /silentall switch. Using this option, the Updater will search silently for updates and automatically install all updates.
"download and install later"
For this you can use the -justdownload switch. When using this switch, the updater returns immediately after downloading the updates without installing them. When the user exit the application, you can call the updater with the /silentall command line option.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Auto Updater Questions:

Thanks for the help Dan.
There are a couple of questions that I have about this still...

If I implement the -justdownload switch, I assume I will do that with a call like this:

Updater.exe /silentall -justdownload

is that correct?

And when the user exits the application you said that I can use the /silentall command line option. I can't seem to get this feature to work for me so far in my testing. When my app exits the system is calling

Updater.exe /silentall

The return code is:
-536870886
but I cannot seem to find that number documented anywhere.

How does the Updater know at this point to use the "just-downloaded" updated installation file?
What prevents the /silentall in this scenario from re-downloading it a second time...what are the "smarts" built into the Updater.exe that first checks for the (already) downloaded file so that it doesn't attempt a second download of the same file?

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater Questions:

Hello,

The "-536870886" (decimal value) updater return code correspond to "0xE000001A" (hexa value) code documented in our "Updater" article. You are getting this return code because when calling the updater with "/silentall" option the frequency check interval was not elapsed since last updates check. However, in order to achieve what you want you can first call the updater with the following command:

Code: Select all

Updater.exe /silentall -justdownload -nofreqcheck
and secondly with the following command:

Code: Select all

Updater.exe /silentall -nofreqcheck
Also, as another solution, you can set the "Silent mode update check frequency", from "Updater" page, to 0 days and then use your first pair of command lines.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Auto Updater Questions:

Hi Dan,
Ok yes, seems to be progressing nicely now. I can use our propreietary dialog to get the needed behaviors, but there is one or two final things that aren't quite right and I haven't found the answers yet in the Help or online searches.

1) is there a way to get the progress percentage from the installation process when we use Updater.exe? (Right now it just says "Installing..." so the user has no idea how long it will take; and there does seem to be a little time when it doesn't look like it is doing anything which may give them the impression that it has hung).

2) in our "download and install later" scenario where we are using the "-justdownload" switch the EXE is downloaded, but I can't find a way to later instantiate/launch that downloaded setup EXE. What I am doing at the moment is calling

Code: Select all

Updater.exe /silentall -nofreqcheck
but that seems to be doing the download for a second time (which we don't want). In my "download and install later" scenario, the user wants the download to happen in the background while they interact with our application. And when exiting out of our application we prompt them to install it at that time, but I can't seem to get the correct (Updater.exe?) command line switches to do that. I suppose I'm looking for a switch that might be something like "-installfromlocalEXE"

Reminder: we are trying to implement the above whilst also taking full advantage of the "install update without elevation" option.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater Questions:

Hello,
1) is there a way to get the progress percentage from the installation process when we use Updater.exe? (Right now it just says "Installing..." so the user has no idea how long it will take; and there does seem to be a little time when it doesn't look like it is doing anything which may give them the impression that it has hung).
Unfortunately, we don't have support for this. I've added this improvement on our TODO list and hopefully it will be available in a future version of Advanced Installer. Thank you for your suggestion.
2) in our "download and install later" scenario where we are using the "-justdownload" switch the EXE is downloaded, but I can't find a way to later instantiate/launch that downloaded setup EXE. What I am doing at the moment is calling

Code: Select all

Updater.exe /silentall -nofreqcheck
but that seems to be doing the download for a second time (which we don't want). In my "download and install later" scenario, the user wants the download to happen in the background while they interact with our application. And when exiting out of our application we prompt them to install it at that time, but I can't seem to get the correct (Updater.exe?) command line switches to do that. I suppose I'm looking for a switch that might be something like "-installfromlocalEXE"
I'm not sure why this happens. I've tested the scenario but I cannot replicate the behavior. Can you give us a detailed step by step test case scenario so we can investigate on our side? Also it would be useful if you could isolate the behavior in a sample and send it us alongside a detailed test case scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Auto Updater Questions:

Hi Dan,
I will try to come up with the a sample, but it is going to be quite tricky...we'll see if I can manage it.

In the meantime, can you explain...is the Updater.exe smart enough to tell that it has already downloaded to the local drive and should install from there at a later date, say the next day or one hour after it is downloaded? I want to make sure that your scenario that you tested mirrors what I'm trying to do.

Here is the detailed scenario:
User manually installs our app, v13.08.44.
Later, we publish an update to the system called v13.08.55
The next time they launch 13.08.44 our splash EXE "sees" that 13.08.55 is available and offers them the chance to install it: "download and install now" vs "download and install later" vs "remind me later".
If they choose "download and install later" then I call "Updater.exe/silentall -justdownload -nofreqcheck" and while that is background downloading the Splash EXE shells to the our v13.08.44 to allow them to work.
Later, the user exits our app, and the app sees that the new version is already locally-downloaded and offers them the opportunity to do the installation step.
Here is where I would like Updater to launch that locally-downloaded setup file, but I see in the Advanced Updater notification icon that it is actually downloading the file again.

What should I use for the command line & switch options so that the Updater will launch that locally-downloaded setup file?

Best regards.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater Questions:

Hello,
In the meantime, can you explain...is the Updater.exe smart enough to tell that it has already downloaded to the local drive and should install from there at a later date, say the next day or one hour after it is downloaded? I want to make sure that your scenario that you tested mirrors what I'm trying to do.
In order to achieve this you can call the Updater using the following command line:

Code: Select all

/justcheck -installready
If the return code is 0, then this means the updates has been downloaded and are ready for install.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Auto Updater Questions:

Hi Dan,
The updater.exe help site seems to indicate that "-installready" means that it is "ready for download". Or is that just a type on that webpage (http://www.advancedinstaller.com/user-g ... dater.html)
-installready - Only available for /justcheck command, it determines if updates are ready for download.
What would be the Updater.exe switches that are needed to launch the setup from the downloaded file?

Best regards,
Kevin
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater Questions:

Hello Kevin,

I apologize for my delayed reply.
The updater.exe help site seems to indicate that "-installready" means that it is "ready for download".
Indeed, the "-installready" switch it is used to check if updates are ready for download. If updates are available and haven't been downloaded yet the updater will return 0xE0000021. If the updates are available and already have been downloaded the updater will return 0. We will update our "Updater" page with this info too, thank you for bringing this to our attention.
What would be the Updater.exe switches that are needed to launch the setup from the downloaded file?
You can use the /silentall command line like this:

Code: Select all

Updater.exe /silentall -nofreqcheck
All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: Auto Updater Questions:

Hi Dan,
That helps a lot thank you! Continuing with my questions I have a new one that is recent observation (maybe as of v11.2?):

In my tests I have a 51MB file that I'm downloading via Updater.exe, and that is suddenly taking a lot longer than it did weeks ago. It's taking 15 minutes now, I think it was like 2-3 minutes before.

So, doing the basic math that is a download speed of 51MB / 15minutes = 0.05Mbps however, SpeedTest.net is consistently reporting my download speed as 21.77Mbps

Is there something that is new with the Updater.exe that might explain why I am seeing this super slow speed in the download?

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater Questions:

Hello Kevin,

This may happen if your network bandwidth is simultaneously used by another processes/services. Can you test the scenario and see if you can replicate the behavior on multiple machines? Also, you can try to use a network traffic analyzing tool in order to check your network traffic during the updater download operation.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”