[wix-users] How to upgrade with Custom Bootstrapper

Harinatha Narisetty harinatha.narisetty at us.abb.com
Wed Feb 22 09:51:42 PST 2017


Hi,
How do I upgrade for build and patch versions. I have the below code on 

private void Bootstrapper_PlanRelatedBundle(object sender, PlanRelatedBundleEventArgs e)
{
            if (_MainViewModel.InstallationMode == InstallationMode.Upgrade)
            {
                e.State = RequestState.Absent;
                _MainViewModel.Model.CopyConfigFiles = true;
                var version = _MainViewModel.SelectedBundleVersion.Version;
                _MainViewModel.Model.PreviousVerionNumber = string.Format("{0}.{1}", version.Major, version.Minor);
            }
            else if (_MainViewModel.InstallationMode == InstallationMode.SideBySide)
            {
                e.State = RequestState.Present;
                _MainViewModel.Model.CopyConfigFiles = false;
                _MainViewModel.Model.PreviousVerionNumber = string.Empty;
            }
            else if (e.State == RequestState.Absent)
            {
                _MainViewModel.Model.CopyConfigFiles = true;
                var version = EnerpriseBootstrapperApplication.Model.Version;
                _MainViewModel.Model.PreviousVerionNumber = string.Format("{0}.{1}", version.Major, version.Minor);
            }
            
}

Let us say I have 17.1.0.2130 is installed and when I install 17.1.0.2131, it comes to last block ... should I set that absent or anything else?


Thanks
Hari


More information about the wix-users mailing list