In my managed bootstrapper, I'm packing Net framework 4.5.1 and VC Redistributable as follows:
<PackageGroupRef Id = "NetFx451Redist" />
<PackageGroupRef Id = "VC_ReDist_120" After="NetFx451Redist" />
<RollbackBoundary />
<MsiPackage Id = "MainProduct"
DisplayName = "$(var.ProductName)"
DisplayInternalUI = "no"
Visible = "no"
Compressed = "yes"
SourceFile = "$(var.MainProduct)"
Vital = "yes"
After = "NetFx451Redist"
>
On Windows 7 x64, where Net FW 4.5.1 is not present, by installing, this would display wixstdba's basic screen to install .Net framework and it also adds an entry in Add-Remove programs, before finishing Net Framework and launching my msi package installation.
Problem: Now upon finishing Net Framework 4.5.1 installation and launching my product package(managed bootstrapper), if I cancel its installation, or it may get terminated due to any error/issue, it left the entry in Add-Remove programs. If I try to uninstall/change it from Add-Remove programs , it again launches the managed bootstrapper installation interface with Install button enabled, as if it is fresh installation, but always ending with errors.
I want to remove its entry from Add-Remove program if I cancel the installation or it is terminated due to any error/issue, from managed interface.
Am I missing something from my Bundle or Managed Code...???
The Burn engine will register the bundle in Add/Remove Programs as soon as any part of the bundle is installed. The .NET prerequisite package is part of the bundle, so when the MBAPrereq BootstrapperApplication installs .NET, the bundle is registered in Add/Remove Programs. There is no way to modify this behavior of the Burn engine in your Bundle or BA. A potential feature request could be for Burn to only register the bundle after a non-Permanent package has been installed. Feature requests should be filed at http://wixtoolset.org/issues.
Today, you could try to workaround this issue by putting logic in your BA where it automatically uninstalls itself before calling Engine::Exit if it detects this scenario.
来源:https://stackoverflow.com/questions/32559837/wix-managed-bootstrapper-installing-net-framework-and-adding-entry-in-add-remov