Set restart required flag if feature (un)installed - Advanced Installer Community
jhebbel
Posts: 9
Joined: Tue Mar 15, 2016 1:49 pm

Set restart required flag if feature (un)installed

I am running a custom PS script to install some drivers as part of an optional feature and would like the installer to require or at least prompt for restart when the feature is added or removed.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Set restart required flag if feature (un)installed

Hello,

To achieve what you need you can set the REBOOT property depending on your feature action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jhebbel
Posts: 9
Joined: Tue Mar 15, 2016 1:49 pm

Re: Set restart required flag if feature (un)installed

How do I set the reboot property depending on the feature though.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Set restart required flag if feature (un)installed

Hello,

Just go to "Custom Actions" page and add a "Set installer property" custom action with sequence, scheduled after the "Install Execution Stage -> Preparing" action group, like this:
  • Property: REBOOT
    Value: Force
    Condition: &Feature = 3
The above action will set the REBOOT property to prompt for restart after the installation only when the "Feature" is currently installed.

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

Return to “Common Problems”