I have 2 msi in wix bundle I am using custom bootstrapper of wix 3.7. My Install,uninstall, and cancel command works perfectly. When I am trying to give functionality of add/remove msi from bundle using:
this.ModifyCommand = new DelegateCommand(() => this.model.PlanAction(LaunchAction.Modify), () => this.state == InstallState.Present);
It's not working as expected. I am using below code to detect package
protected void DetectPackageComplete(object sender,DetectPackageCompleteEventArgs e)
{
//System.Diagnostics.Debugger.Launch();
if (e.PackageId.Equals("Setup1.msi", StringComparison.Ordinal))
{
this.State = e.State == PackageState.Present ? InstallState.Present : InstallState.NotPresent;
this.model.LogMessage("Setup1.msi"+this.State.ToString());
}
if (e.PackageId.Equals("Setup2.msi", StringComparison.Ordinal))
{
this.State = e.State == PackageState.Present ? InstallState.Present : InstallState.NotPresent;
this.model.LogMessage("Setup2.msi" + this.State.ToString());
}
}
After fresh install my UI shows options of Add/remove, remove, repair, reinstall for next installation by using I can uninstall single msi from my bundle but next time it not detect remaining package.
If I unstall setup2.msi it shows add/remove screen but modify button is disable and If I uninstall setup1.msi it ask for fresh installation.