Zsolt Kollarits
Posts: 366
Joined: Fri May 29, 2015 10:36 am

*urgent* How to detect if reboot is needed by a silent update

Dear Advanced Installer Support Team,

We would like to install an update silently by your Auto Updater feature and restart the PC if the installation requires a reboot. Is there any way of determining if an .exe or .msp requires a reboot? For example I can imagine we have to define a new command line param in the AIP project we are using to create our update config files and that command line flag will inform Auto Updater to perform a reboot after the installation if needed.

Our product seems to require a reboot, but Auto Updater does not do it for us currently.

Due to the fact we're about to release our next version, could you please handle this question as urgent? Thanks in advance!

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

Re: *urgent* How to detect if reboot is needed by a silent update

Hello Zsolt,

We do not have support in our Updater tool to detect reboots requested by the updates installation. However, as a workaround, you can include a custom action in your installation setup which will reboot the system. The custom action should be added with sequence after "Install Execution Stage -> Finish Execution" action group and should have the "Wait for custom action to finish before proceeding" and "Wait for return code at the end of the sequence" execution options disabled. Also the custom action execution should be conditioned using the REBOOT property.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 366
Joined: Fri May 29, 2015 10:36 am

Re: *urgent* How to detect if reboot is needed by a silent update

Hi Daniel,

First of all thank you for your quick response, the information you provided is really useful for us!

Secondly, after further testing this issue some more questions were come: I tried to play with the "Update Installer->Command line" and "Update Installer->No GUI command line switch" fields of our update config project and add some params/flags there to influence the update process:

1. Tried to tell the updater service to launch our .exe in full-UI or reduced UI mode. Is it possible in a way? Neither /qf nor /qr nor /qb nor /qn+ was working for me. I´d expect a full-UI installation, if I put /qf into one of your command line fields, at least this is why you have those fields in your update config projects, right? For some reason the updater service always installs our .exe in a silent way.

As a second test I also replaced the default "/exenoui /qn" params from the "No GUI command line switch" by "aiemptyfield", put "/qf" into the standard "Command Line" field, but this combination was also not working for me. No matter what I do, I´m not able to convince the updater service to start the update without elevation but in full-UI mode.

2. Tried to play with the "Update Installer->Attempt to suppress GUI or console" checkbox just to see if it has an effect or not. There was no difference, no matter what I set, the update was always installed silently, without UI.

3. Tried to use the "/promptrestart" flag to ask the user for a restart, this flag is also something which is not taken into account by the updater service. For me it seems you have a "Command Line" field, but the most of the params we could use based on your webpage are just simply ignored.

4. Finally I managed to find a flag which is taken into account: "/forcerestart". If I put this into the "Command Line" field, the PC will be restarted by the updater service when the update is ready. Unfortunately "/forcerestart" is not entirely the solution we are looking after. We´d like to do something similar to what the full-UI installation is doing: if the installer thinks a process needs to be killed for proper installation, it just shows a small dialog to the user asking his permission to kill it. Our product requires some processes - mostly the Windows Explorer - to be killed in order to get the update prorperly installed. In full-UI mode we used to get a dialog that shows us the list of the processes to be killed, I think there must be a way in silent mode too, to determine if a process is blocking the installation or not.

Could you please advise us something?

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

Re: *urgent* How to detect if reboot is needed by a silent update

Hello Zsolt,

You're welcome.

1. This may happen if your EXE setup is configured to run silently (see section 3). Can you please manually launch your EXE setup and make sure it launches with full UI?

2. This flag is intended to be used when you are delivering updates through a console application instead through a setup package. We have users that uses console application to deliver some of their updates.

3. The "/promptrestart" MSI switch can be used only for installation with UI. For silent installation this command line switch is ignored by Windows Installer.

4. Unfortunately I'm not aware of any command line solution you can use to display (with UI) a reboot prompt to the user when installing silently.

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

Return to “Common Problems”