netrustPS
Posts: 40
Joined: Tue Dec 20, 2016 4:40 am

Track Updater Silent Installation Progress

Is there any way to track the silent installation progress on the updater? Presently the application will make a /silentall call to the updater to install any patch/updates that are pending. Ideally I want to show a progress bar or a "Currently downloading" or even a "Installing Update xxx" message while it is running in the background. The -showaitdlg flag only shows the downloading stage and not the installation as far as I can tell.

Please advise! Thank you.
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Track Updater Silent Installation Progress

Hello,

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.

However, is there any reason why would you like to have this functionality? Note that our Updater already has this functionality.

Please let me know if you have any questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
netrustPS
Posts: 40
Joined: Tue Dec 20, 2016 4:40 am

Re: Track Updater Silent Installation Progress

Hi Dan,

Great, hopefully it will be released soon.

When you say the Updater has this functionality are you referring to the GUI version i.e. the /checknow flag? If so yes but I am referring to the silent installation version i.e. /silentall which to the best of my knowledge does not give me any visual cues beyond what the -showaitdlg flag can provide.

Reason why I want this is for user experience. Since the installation is completely silent I will not know if the installation process is working on a large file, or hung for that matter if it takes a long time. If I am able to track the progress I will be able to update the user on which update is being installed and the estimated time until completion.
netrustPS
Posts: 40
Joined: Tue Dec 20, 2016 4:40 am

Re: Track Updater Silent Installation Progress

Hi Dan,

One more use case for this request that hopefully will bump this up the priority list as this can be potentially blocking for me. Presently my application will start a small program, a agent of sorts that will make the necessary calls to the Updater before the main application terminates itself so that the update can proceed without any resources being locked. This agent makes 2 calls to the Updater. The first is a /silentall call so that all updates can be set to be installed. After this call terminates, it makes a second call to the Updater with a -restartapp flag to restart the app.

The problem is this, when the 1st call is triggered the updates start to be downloaded and installed only after the 1st call have ended instead of before the 1st call ends. This results in the observed event chronology below.

Observed Event Chronology - 1st Call Start -> 1st Call End -> Updates download and install in the background -> 2nd Call Start -> 2nd Call End -> Updates finish installing in the background
Expected Event Chronology - 1st Call Start -> Updates download and install in the background -> Updates finish installing in the background ->1st Call End -> 2nd Call Start -> 2nd Call End

Presently my agent has a mandatory wait time between the calls in order to allow the updates to finish installing but this wait time is static and cannot really cater for the difference between different machines nor for large updates. E.g. 10 seconds waiting time is sufficient for 2 small patches amounting to 48KB but insufficient for a 120MB~ full installer which is necessary for major updates.

One more problem is that if the application is restarted while updates are still installing it may result in resources being locked, which results in a force reboot without warning. See http://www.advancedinstaller.com/forums ... =5&t=33835

The reason why there are two calls is because the -restartapp flag only works if all updates have been installed which at the time of the first call is not the case. I want to confirm is whether all I have described above is the expected behavior and to ask for possible solutions if it is expected.

What I can think of are these 3 solutions.
1. Make the event chronology fit what is expected as above.
2. Make the -restartapp flag work in the first call such that I do not have to make a 2nd call. However I expect that in order for this to work the updates will have to finish installing before the 1st call terminates anyway, therefore I can safely make the 2nd call anyway in this scenario.
3. Implement reliable silent installation progress tracking such that my agent will be able to know when it can make the 2nd call safely. <-- The original point of this thread!
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Track Updater Silent Installation Progress

Hello,
When you say the Updater has this functionality are you referring to the GUI version i.e. the /checknow flag? If so yes but I am referring to the silent installation version i.e. /silentall which to the best of my knowledge does not give me any visual cues beyond what the -showaitdlg flag can provide.
When using the Auto-Updater with the /checknow command line option, the Updater is launched, pops up a dialog box, checks for updates and automatically informs the user that new updates are available. If no updates are available, the Updater will notify the user. Also, you can chose to silent install the updater. The Updater progress dialog will be updated, so the user will be notified.

EDIT:
When using the /silentall option the Updater is minimized in the taskbar and you can see the progress bar by clicking the task.
Reason why I want this is for user experience. Since the installation is completely silent I will not know if the installation process is working on a large file, or hung for that matter if it takes a long time. If I am able to track the progress I will be able to update the user on which update is being installed and the estimated time until completion.
For this you can show the Updater GUI, where the user is informed regarding the current operation that the Updater performs. ( downloading update, installing update etc).
One more use case for this request that hopefully will bump this up the priority list as this can be potentially blocking for me. Presently my application will start a small program, a agent of sorts that will make the necessary calls to the Updater before the main application terminates itself so that the update can proceed without any resources being locked. This agent makes 2 calls to the Updater. The first is a /silentall call so that all updates can be set to be installed. After this call terminates, it makes a second call to the Updater with a -restartapp flag to restart the app.
There is no need to call the Auto-Updater for a second time to launch your application using the -restartapp flag.

Note that you can use the return code of the updater ( return code 0 ) when the update has been successfully installed. Once the updater finished installing updates, you can launch your application from your agent, there is no need to call the Auto-Updater for a second time.

You can see the return codes for the Auto-Updater in the Auto Updater article, at the bottom of the page.

Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
netrustPS
Posts: 40
Joined: Tue Dec 20, 2016 4:40 am

Re: Track Updater Silent Installation Progress

Hi Dan,
When using the Auto-Updater with the /checknow command line option, the Updater is launched, pops up a dialog box, checks for updates and automatically informs the user that new updates are available. If no updates are available, the Updater will notify the user. Also, you can chose to silent install the updater. The Updater progress dialog will be updated, so the user will be notified.
For this you can show the Updater GUI, where the user is informed regarding the current operation that the Updater performs. ( downloading update, installing update etc).
I believe you are trying to tell me that even the /silentall flag has some UI that can be shown to the user. I have double checked and there are 2 UI that are shown to the user. The first is a small "Checking for updates" window that disappears rather quickly, I believe it disappears once the update config file is downloaded and parsed? The 2nd UI is the downloading and installation UI which is actually the UI shown in the /checknow flag. This UI is minimized to the notification area once it is started and that is why I have missed it until now.

So right now I have 2 points I would like to discuss.

1. Regarding the user experience what I really need is to be able to install all updates silently without human intervention but yet still be able to update them on the progress. The UI that is minimized to the notification area is precisely what I need. So to summarize, I need to run the Updater using /silentall but still show the download/installation process. Can this be done?
Observed Event Chronology - 1st Call Start -> 1st Call End -> Updates download and install in the background -> 2nd Call Start -> 2nd Call End -> Updates finish installing in the background
Expected Event Chronology - 1st Call Start -> Updates download and install in the background -> Updates finish installing in the background ->1st Call End -> 2nd Call Start -> 2nd Call End
2. My latest questions regarding the chronology of events still stand. Namely, the /silentall call to the Updater terminates before the actual download/installation of the updates are done. See the observed and expected event chronology above. While I say that the 1st call ends immediately, I can still see the Updater.exe in the Task Manager and the minimized UI processing. How does the Updater actually start the update process? Does it fork a thread within itself? Is this why my agent is unable to track the 'real' process?

Yes, you are absolutely right there is no need for me to call the Updater again when I can just start my application directly. Lastly to resolve point 2 I have tried a few things to resolve it. I can continuously make the same /silentall call to the Updater until I stop receiving a E0000027(Unable to start new Updater instance) return code and receive a E0000011(No updates found) return code which will indicate to the agent that the installation is complete. I could also continuously make a /justcheck call to the Updater until I stop receiving a 0(Updates present) return code and get a E0000011 return code. Both of these approaches have been POCed.

Any suggestions on which may be the better way? I would still prefer to track the original call as above rather than 'ping' the Updater to see if it is done though.
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Track Updater Silent Installation Progress

Hello,
1. Regarding the user experience what I really need is to be able to install all updates silently without human intervention but yet still be able to update them on the progress. The UI that is minimized to the notification area is precisely what I need. So to summarize, I need to run the Updater using /silentall but still show the download/installation process. Can this be done?
For this, you can use the -reducedgui flag for the Updater. The Updater is launched with basic user interface (simple progress and error handling). It can be used with the /silentall and /silentcritical command line options and it's incompatible with -nogui switch.

Indeed, when using the /silentall option the Updater is minimized in the taskbar and you can see the progress bar by clicking the task.
2. My latest questions regarding the chronology of events still stand. Namely, the /silentall call to the Updater terminates before the actual download/installation of the updates are done. See the observed and expected event chronology above. While I say that the 1st call ends immediately, I can still see the Updater.exe in the Task Manager and the minimized UI processing. How does the Updater actually start the update process? Does it fork a thread within itself? Is this why my agent is unable to track the 'real' process?
If new updates are found, the Updater copies itself to a temporary location and downloads and installs the updates running from there.

In order to make your application wait for the Updater, please take a look on the How to make my application wait for the Updater to finish? article with related information for hints and guidance.

Please let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
netrustPS
Posts: 40
Joined: Tue Dec 20, 2016 4:40 am

Re: Track Updater Silent Installation Progress

Hi Dan,
For this, you can use the -reducedgui flag for the Updater. The Updater is launched with basic user interface (simple progress and error handling). It can be used with the /silentall and /silentcritical command line options and it's incompatible with -nogui switch.
Noted, will try this out.
If new updates are found, the Updater copies itself to a temporary location and downloads and installs the updates running from there.

In order to make your application wait for the Updater, please take a look on the How to make my application wait for the Updater to finish? article with related information for hints and guidance.
I see that the code is in the C family? Do you have any Java sample code?
netrustPS
Posts: 40
Joined: Tue Dec 20, 2016 4:40 am

Re: Track Updater Silent Installation Progress

Hi Dan,

The -reducedgui flag suits my needs exactly. Please consider my first point closed. :D

Would still like Java sample code for the tracking of the temporary Updater.exe instance if you guys have it. Until then I will implement the /justcheck alternate solution. Thanks.
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Track Updater Silent Installation Progress

Hello,
Would still like Java sample code for the tracking of the temporary Updater.exe instance if you guys have it.
I'm afraid we do not have any Java sample code for this.

Please let me know if there is anything else I can help you with.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
netrustPS
Posts: 40
Joined: Tue Dec 20, 2016 4:40 am

Re: Track Updater Silent Installation Progress

Hi Dan,

Nope there is nothing more you can help me with on this. I have found a drawback for my alternate solution, that is, I cannot track if the Updater has terminated due to errors. (E.g. installation failed etc). No doubt I will not have this problem if I were to be able to track the temporary Updater but implementing a C program is out of the question for me right now.

So maybe this can be a point for your team to consider providing Java compatible support for the Updater? Thank you.

Return to “Building Installers”