Turning off updater.exe UI - Advanced Installer Community
BillD
Posts: 18
Joined: Thu Apr 24, 2014 9:10 pm

Turning off updater.exe UI

I have integrated code into my application (which is installed via an AI installer with a corresponding Updater project) to launch updater.exe with the /checknow parameter as a process. If no updates are available, updater.exe pops up a message box indicating that the software is up to date. Often the pop-up appears behind the main form of the application so the user does not see it. If updates are available, the update process is invoked stepping the user through the upgrade with Welcome, Progress, and Exit dialogs. Works fine. However, because the updater.exe popup (indicating that the software is up to date) is often hidden behind the main form, I am thinking of using the return codes from updater.exe to inform the user.

Is there a way to invoke updater.exe in such a way that: 1) its UI is turned off allowing the calling program to handle version status information AND 2) allowing updater.exe to do it's normal thing (take control) if updates are available?

Basically I would like to place the "Your software is up to date" on the main form in a label so I don't get the popup from updater.exe, but allow update.exe to do its thing if updates are available.

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

Re: Turning off updater.exe UI

Hello,

In order to achieve what you want you can call the Updater using a silent command line. For example you can use a command line like this:

Code: Select all

/silentall -nofreqcheck
and, then check the Updater return code (e.g. 0xE0000011 - no updates are available for the application, or 0 - found updates for application).

If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BillD
Posts: 18
Joined: Thu Apr 24, 2014 9:10 pm

Re: Turning off updater.exe UI

Thanks, I'll give it a try.

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

Re: Turning off updater.exe UI

You're welcome Bill. If you have any questions let us know.

All the bets,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BillD
Posts: 18
Joined: Thu Apr 24, 2014 9:10 pm

Re: Turning off updater.exe UI

I added code to my project to run the updater.exe in a background thread using the /silentall option with the -nofreqcheck switch. updater.exe returns 0xE0000011 if no updates are available and 0 if updates are available as described. I can now inform the user of either case in a text control on the main form of the installed application; however, if updates are available, updater does not install them.

Do I have to call updater.exe again with a different option to install the update (after the first instance returns 0)?

What does a return code of hex 32 from updater.exe mean? On subsequent runs from the first I am now getting this return code (not documented in the on-line help). Actually, I think this happened because there was an "older" updater.exe process still running for some reason in addition to the new one launched by the program. I killed all of them and tried again, and did not get the hex32 error code, yet, the update process is not fired if the return code is 0.

I take that back: even with a "clean" start up, I still get a return code of hex 32 from updater.exe invoked with /silentall -nofreqcheck. Hmmm. Guess this is not going to work.

All right, I think I see my problem. Disposing the updater.exe process after closing it cleared up most of the issues. Now I see the dialog that shows the changes available, but the "Next" button (to proceed with the install) is disabled. Getting closer.

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

Re: Turning off updater.exe UI

Hello Bill,
All right, I think I see my problem. Disposing the updater.exe process after closing it cleared up most of the issues. Now I see the dialog that shows the changes available, but the "Next" button (to proceed with the install) is disabled. Getting closer.
I'm not sure why this happens. Can you please attach a screenshot of the related dialog? Also, it would be useful if you could isolate the behavior in a sample which replicates the behavior and send it us to support at advancedinstaller dot com so we can investigate.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BillD
Posts: 18
Joined: Thu Apr 24, 2014 9:10 pm

Re: Turning off updater.exe UI

Hi Daniel,

The "Next" button was disabled since the updater process could not find the specified installer because one letter in the name of the target installer was wrong. Makes sense, but is not readily apparent - when updating the version number in the name of the installer in the Updates project, I entered the wrong character .

Anyway, I forgot to mention that instead of the /silentall -nofreqcheck options I used /justcheck in the background process that checks for updates, and, if there are updates, I run a separate background process that calls updater with the /checknow option. Works fine now.

The dispose of the updater process explicitly kills it and unloads any attached resources. Before adding the dispose calls, the first updater process, which is used to check for updates, likely locked some resources required by the second update process which tried to start the install steps. I could see both processes in the task manager. So, disposing after closing the processes resolved that issue. After the first process completes it goes way and the second one does its thing just fine.

If it would be beneficial for others, I'd be happy to post my project somewhere.

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

Re: Turning off updater.exe UI

Hello Bill,

I'm glad you sorted things out. Certainly this info will help future users facing with the same situation. If you want to post your projects so they can be available to future users you can attach them to this thread. Also, if the projects contain private info you can try to stripe them down to a sample which implements your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BillD
Posts: 18
Joined: Thu Apr 24, 2014 9:10 pm

Re: Turning off updater.exe UI

Is it possible to attach a zip file of the project, or do you prefer blocks of code in the message thread?

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

Re: Turning off updater.exe UI

Hello Bill,

Yes you can do both. You can upload a zipped file of your project, you can post relevant sections from your code (with a basic comment) or you can even do both of them. This is entirely your choice.

Thank you for contributing to our forums.

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

Return to “Building Installers”