jeroenhouba
Posts: 2
Joined: Thu Apr 12, 2012 10:33 am

Auto updater download-only/install-only option?

Hello,

I use the auto updater utility in a project to download and install critical updates silently without user interface as soon as a user logs on to the computer (using the /silentcritical option of the updater utility in a windows task). The application that is updated is blocked while the check for critical updates and installation of the possible updates is performed to prevent that the application is in use while the update is in progress.
In some situations the available internet connection is so slow that the download (and even the check for available updates) will receive a time-out and the updater utility returns the code 0x2EFD. To prevent that the lack of (reliable) internet connectivity will block the application for a long time it would be better to separate the download process from the installation process.

So my question is if it is possible to check for updates silently with a download-only option. And if it is possible to run the updater utility (on the next logon) with an install-only option which installs any updates that are downloaded?

Kind regards,

Jeroen
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Auto updater download-only/install-only option?

Hi Jeroen,

This can be done quite easily. For checking if an update is available you can call the updater with the switch "/justcheck".

Once the updater returns you a code telling the new version is available you can start a download from your application to an established location for the new update. After the download is complete you can create a new registry value in "RunOnce" registry key so that the package is launched with the desired command line at the next restart.

In my solution the download and install process do not involve the updater, i.e. you will have handle them from your application.

Let me know if you have any questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jeroenhouba
Posts: 2
Joined: Thu Apr 12, 2012 10:33 am

Re: Auto updater download-only/install-only option?

Hello Bogdan,

Thank you for your reply.

I already use the configuration project and the updater with the switch "/justcheck" to check if a new version is available.

I understand from your reply that it is not possible to use the updater tool to only download the new updates (and install them later). You say that you use your application to download the updates but how do you determine the download url in your application? Now, I use the configuration project to provide these details so that the updater tool can handle the download (and install) and differentiate between critical and non-critical updates. I use the critical update indication to install critical updates automatically without user interface. The non-critical updates are handled in another way.

So how do you pass the download url (and critical/non-critial indication) of the available updates to your application? It would be nice to reuse the information that is configured in the configuration project so that this information does not have to be configured multiple times.

Kind regards,

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

Re: Auto updater download-only/install-only option?

Hello Jeroen,
So how do you pass the download url (and critical/non-critial indication) of the available updates to your application? It would be nice to reuse the information that is configured in the configuration project so that this information does not have to be configured multiple times.

All this information is stored in the updates configuration file. You can try to parse the file from your application and get the information you need. Here's an article to help you with the updates configuration file structure.

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

Return to “Building Installers”