I have a requirement to force system reboot after fresh install.
What I have tried:
Create custom action Set Installer Property:
Property: REBOOT
Value: Force
Execution stage Condition:
Install/ First time install checked
In install execution stage this custom action is placed right before Install > Finish Execution
Install Parameters > Reboot behavior is set to Prompt for Reboot when required.
I run fresh install and it completes without any prompts for reboot.
Also, please find attached a sample project. With the "Perform the reboot if required without showing any prompts" option enabled, the reboot will be automatically. If you disable this option, the restart prompt will appear.
If you still can't make it work, please forward to me your .AIP setup project (here or by email to support at advancedinstaller dot com) so I can review its settings.
I tried your project and saw the reboot happening after the install (with no prompt). Tried re-creating simple project with the settings that I'm using in my real project and the reboot does not happen and the prompt does not show up.
I emailed you my sample project where the prompt doesn't show up after the installation. Thank you.
I did more testing and found that once Enhanced User Interface setting is enabled (set to Only on Install or Always), the restart prompt stops showing up in your sample project. How are these two things related and what is the fix for it? I need to have Enhanced UI enabled as it properly renders dialog controls in our setup dialogs.
I have tested this and I can confirm that this indeed is a bug on our side.
I have forwarded this to our development team and hopefully this will be fixed in a future version of Advanced Installer.
Thank you for bringing this to our attention!
Until then, the good news is I was able to find a workaround for this.
Please schedule the "Set Property" custom action under "Wizard Dialogs Stage" instead of under "Install Execution Stage".
Now, the only problem left would be a silent installation scenario (since "Wizard Dialogs Stage" is skipped).
Note: This only applies if you intend to support silent installations (e.g. one of your users needs to silently install the setup). If this is not the case, you can skip the steps presented below.
It somehow looks like, during a silent installation, the "Set Property" custom action works as expected, even with the Enhanced User Interface option enabled.
Therefore, what we need to do here is:
- share the custom action between the two stages. To do so, simply hold the SHIFT button + drag and drop.
- uncheck "Uninstall" and "Maintenance" options so the custom action is only executed during install.
- click on the "Advanced Execution Scenarios..." hyperlink button (under "Execution Stage Condition") and select "Skip action in Install Execution Stage if executed in Dialogs Stage".
Attached you can find my previous sample project with these changes.