I have a WiX 3.11-based installer with a managed bootstrapper application. One of the packages in the installer chain could trigger a restart. In my MBA, I handle the resume-from-restart behavior in the PlanPackageBegin event handler, inspired by the standard bootstrapper app:
private void Bootstrapper_PlanPackageBegin(object sender, PlanPackageBeginEventArgs e)
{
// _bootstrapper.Status.ForcedRestartPackage comes from the WixBundleForcedRestartPackage engine variable
if (_bootstrapper.Status.ForcedRestartPackage != null)
{
// Resuming after forced restart
// Skip packages until after the package that forced the restart
e.State = RequestState.None;
if (e.PackageId == _bootstrapper.Status.ForcedRestartPackage)
{
_bootstrapper.Status.ForcedRestartPackage = null;
}
}
else
{
...
}
}
My problem is, if the installer fails to install a package after the restart, it will only rollback the packages that were installed after the restart. If the install fails and starting rolling back, I want it to rollback all installed packages, even ones before the restart. Is there a way that I can configure my bundle or MBA to do this?