0

I have a Wix Project and also a Bootstrapper. I want to prompt the user to restart after the last MSI is run. Here is the Bootstrapper-

<Chain>
<MsiPackage  SourceFile=".\Some.msi" Compressed="yes" />
<MsiPackage Id="MyMsi"
              Compressed="yes"
              Cache="no"
              DisplayInternalUI="yes"
              SourceFile="$(var.MyInstaller.TargetPath)"
              Visible="no"/>
</Chain>

In my MSI, I have - <Property Id="REBOOT" Value="Force"/> and

<InstallExecuteSequence>
    <ScheduleReboot After='InstallFinalize'>NOT REMOVE</ScheduleReboot>
</InstallExecuteSequence>

But the prompt doesn't show up. In the log I can find these lines-

Property(S): MsiRebootActionScheduled = 1

MSI (s) (40:64) [23:52:23:990]: Value of RebootAction property is 1

MSI (s) (40:64) [23:52:23:990]: Windows Installer requires a system restart. Product Name: XXX x64 Installer v3.0.0.0. Product Version: 3.0.0.0. Product Language: 1033. Manufacturer: XXX. Type of System Restart: 2. Reason for Restart: 2.

MSI (s) (40:64) [23:52:23:990]: Product: XXX x64 Installer v3.0.0.0. Restart required. The installation or update for the product required a restart for all changes to take effect. The restart was deferred to a later time.

Any suggestion on how to make this work?

Sanky
  • 193
  • 13

1 Answers1

0

I would remove the reboot code from your MSIs and just add the one into the bootstrapper. Adding reboot into bootstrapper was answered on this previous question.

Doc
  • 698
  • 3
  • 16
  • May you please elaborate on that bit more? – Sanky Mar 10 '21 at 17:41
  • If you're installing more than 1 MSI from a bootstrapper just remove the reboots from the MSI and then reboot from the setup.exe after all of the MSIs are installed. – Doc Mar 11 '21 at 04:22
  • Assuming that you are pointing to and ExitCode property in the Bootstrapper, I don't really have any exe in the chain of Bootstrapper. – Sanky Mar 11 '21 at 04:45