I have a WiX Burn custom installer using ManagedBootstrapperApplicationHost. After installing one of the prerequisite Microsoft Windows Installer 4.5 I forcefully reboot the PC (Windows XP) using:
<ExitCode Behavior="forceReboot"/>
The Bundle chain looks like this:
<Chain>
<PackageGroupRef Id="WindowsInstaller45"/>
<PackageGroupRef Id="Netfx2Full"/>
<PackageGroupRef Id="Netfx4Full"/>
<PackageGroupRef Id="CustomPkg"/>
<PackageGroupRef Id="SQLExpress"/>
</Chain>
After it reboots, I want my installation to continue after that, but it actually detects the installation and shows Uninstall option.
How can I detect an unfinished installation when reboot happens during installation?
When the Bundle is started again after a restart the
BOOTSTRAPPER_COMMAND
struct passed to yourBootstrapperApplicationCreate
function contains aresumeType
field that will be set toBOOTSTRAPPER_RESUME_TYPE_REBOOT
. In managed code, theBootstrapperApplication
class contains aCommand
property that contains theresume
field.For example in managed code, to tell that your
BootstrapperApplication
started after a restart, you can check: