CharlesAnthony
Posts: 18
Joined: Wed Oct 07, 2009 9:45 am

AutoUpdate + Service

Hi,

Note: I haven't tried any of this, I'm just going from the documentation.

I'm interested in using the AutoUpdater
a) Is it possible to confiure the AutoUpdate to *only* check on demand? i.e. I want my application to control the frequency of checking, not Updater.exe itslef; I see I can force this by passing the -nofreqcheck to updater.exe; in which case, what should I configure the "Run Updater" part of the AI package to be? 999? It seems a little arbitrary.

b) AutoClosing the application : I understand that this is configured in the "server side" Auto Update configuration file, and that updater closes the application by sending a windows message to it (i.e. close the window, close the app). How are Windows services supported in conjunction with Auto Update? We plan on having a windows service running, and only having a GUI for on-dmand configuration - yet we'd still like to use Auto Update (launched from the service) to install updates. Is this possible?

Regards,

Charles.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: AutoUpdate + Service

Hi Charles,
a) Is it possible to confiure the AutoUpdate to only check on demand? i.e. I want my application to control the frequency of checking, not Updater.exe itslef; I see I can force this by passing the -nofreqcheck to updater.exe; in which case, what should I configure the "Run Updater" part of the AI package to be? 999? It seems a little arbitrary.
You can set it to whichever value you like, it will be ignored as long as -nofreqcheck is used.
b) AutoClosing the application : I understand that this is configured in the "server side" Auto Update configuration file, and that updater closes the application by sending a windows message to it (i.e. close the window, close the app). How are Windows services supported in conjunction with Auto Update? We plan on having a windows service running, and only having a GUI for on-dmand configuration - yet we'd still like to use Auto Update (launched from the service) to install updates. Is this possible?
This is automatically done by Windows Installer, there is no need for other settings.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
CharlesAnthony
Posts: 18
Joined: Wed Oct 07, 2009 9:45 am

Re: AutoUpdate + Service

GabrielBarbu wrote:Hi Charles,
b) AutoClosing the application : I understand that this is configured in the "server side" Auto Update configuration file, and that updater closes the application by sending a windows message to it (i.e. close the window, close the app). How are Windows services supported in conjunction with Auto Update? We plan on having a windows service running, and only having a GUI for on-dmand configuration - yet we'd still like to use Auto Update (launched from the service) to install updates. Is this possible?
This is automatically done by Windows Installer, there is no need for other settings.
How does Windows Installer know which service to stop? Perhaps a more concrete example... I create an AI installer for a java package, which runs as service "hpd-service". "hpd-service" is a java app, with the appropriate service wrapping from AI. "hpd-service" launches "updater.exe", which finds that there is an update; the update is automatically installed (/silentall).

How does windows installer (or updater) know to stop the "hpd-service" before running the update? I assume that the service needs to be stopped, as the files will be in use.

Regards,
Charles.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: AutoUpdate + Service

Hi Charles,
How does Windows Installer know which service to stop?
You can specify this in the Services page by using a service control operation. This way the original package stops and removes the service when it's upgraded by a newer package. Note that this approach works only when using the automated upgrade feature (the new version of the MSI automatically uninstalls the old one).

Please note that the Updater simply downloads and launches installers, it doesn't manually overwrite the application files.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”