[wix-users] Modify Mode

Vanniekerk, Tyrel (GE Healthcare) tyrel.vanniekerk at ge.com
Mon Mar 5 13:23:00 PST 2018


Hi,

Just checking to be sure I am not missing something.  To get a custom bootstrapper to call my non-UI MSI again, the only way to do that is change it to be repair mode.  Is that correct?


        private void OnPlanPackageBegin(object sender, PlanPackageBeginEventArgs e)
        {
            if (Bootstrapper.Model.Engine.StringVariables.Contains("MbaNetfxPackageId") && e.PackageId.Equals(Bootstrapper.Model.Engine.StringVariables["MbaNetfxPackageId"], StringComparison.Ordinal))
            {
                e.State = RequestState.None;
            }
            else if (e.PackageId == "MuseSetup.msi")
            {
               if (Bootstrapper.Model.PlannedAction == LaunchAction.Modify)
                {
                    e.State = RequestState.Repair;
                }
            }
        }

If I leave the state as Present, then the bootstrapper just sees it as present and does not run it, ie it does not run the MSI in modify mode.

Thanks,
Tyrel



More information about the wix-users mailing list