Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line /passive /promptrestart is not showing the restart dialog #4975

Closed
wixbot opened this issue Dec 1, 2015 · 10 comments · Fixed by wixtoolset/wix#21
Closed

Command line /passive /promptrestart is not showing the restart dialog #4975

wixbot opened this issue Dec 1, 2015 · 10 comments · Fixed by wixtoolset/wix#21

Comments

@wixbot
Copy link

wixbot commented Dec 1, 2015

Have a burn bundle that installs Dot.NET as prerequisite. Run the bootstrapped installer with "/passive /promptrestart"

Expected results:

  • After installing the Dot.NET, the WiX should as whether user wants to restart the computer

Actual results:

  • Computer is restarted silently

The Dot.NET prerequisite is defined as follows:

<WixVariable Id="WixMbaPrereqPackageId" Value="NetFx452Redist" />
...
<PackageGroup Id="NetFx452Redist">
  <ExePackage
      InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]""
      RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]""
      UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]""
      PerMachine="yes"
      DetectCondition="NETFRAMEWORK45 >= 379893"
      Id="NetFx452Redist"
      Vital="yes"
      Permanent="yes"
      Protocol="netfx4"
      SourceFile = "NDP452-KB2901907-x86-x64-AllOS-ENU.exe">
  </ExePackage>
</PackageGroup>

Originally opened by oldrich.dlouhy

@wixbot
Copy link
Author

wixbot commented Dec 1, 2015

The /passive switch requires that there be no modal prompts so /promptrestart can't cause a modal prompt.

Originally posted by barnson
Resolution set to bydesign
Status changed from Untriaged to Resolved

@wixbot
Copy link
Author

wixbot commented Dec 1, 2015

But then the WiX deviates from the command line used by the Dot.NET installer itself, see .NET Framework Deployment Guide for Developers on MSDN

Quote:

option description
/promptrestart Passive mode only, if the setup program requires a restart, it prompts the user. This option requires user interaction if a restart is required.
/showrmui Used only with the /passive option. Displays a message box that prompts users to close .NET Framework apps that are currently running. This message box behaves the same in passive and non-passive mode.

Originally posted by oldrich.dlouhy

@wixbot
Copy link
Author

wixbot commented Dec 2, 2015

Originally changed by barnson
Resolution changed from bydesign to
Statuschanged fromResolvedtoUntriaged
Typechanged fromBugtoFeature

@wixbot
Copy link
Author

wixbot commented Dec 4, 2015

MSI behavior is to essentially ignore /promptrestart: It has no effect when /passive is specified.

Release changed from v3.9 to v4.0

@wixbot
Copy link
Author

wixbot commented Dec 4, 2015

Resolution set to bydesign
Status changed from Untriaged to Resolved

@wixbot
Copy link
Author

wixbot commented Dec 4, 2015

In looking at the Burn code, if you order the arguments /promptrestart /passive you'll get the desired behavior. /promptrestart can also apply if before /silent, which seems wrong. Therefore, opening in v4.0 for investigation.

Resolution changed from bydesign to
Statuschanged fromResolvedtoOpen

@wixbot
Copy link
Author

wixbot commented Dec 7, 2015

Thanks for the response,

I have tested both "/promptrestart /passive" and "/passive /promptrestart" with burn from WiX 3.9 but both variants do restart without prompting the user.

Originally posted by oldrich.dlouhy

@wixbot wixbot added this to the v4.0 milestone Dec 20, 2015
@dotriz
Copy link

dotriz commented May 24, 2019

@wixbot Is this feature implemented?

@BMurri
Copy link

BMurri commented May 24, 2019

I would guess probably not. It's not assigned to anyone, and no one has touched it for nearly 3 years now.

But, it is marked v4.0 (rather then v4.x) so it is on the list to be addressed in some form before v4 ships.

@rseanhall rseanhall self-assigned this Jun 16, 2021
@rseanhall rseanhall added this to To do in wix.4.0-preview.1 via automation Jun 16, 2021
wix.4.0-preview.1 automation moved this from To do to Done Jul 2, 2021
@rseanhall
Copy link
Contributor

Since restart prompts are UI, the Burn engine in v4 is no longer responsible for parsing the restart prompt modes. It's up to the BA to decide when to prompt for a restart. This fixes the ordering issues.

The prereq BA still does not support prompting for restarts during /passive because then it wouldn't be passive. In fact, /promptrestart was removed since it didn't actually do anything. Theoretically there could be a new command line parameter for the prereq BA to support this "restart prompt only" UI mode but that should be a separate feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants