Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
952 views
in Technique[技术] by (71.8m points)

.net - Wix Managed Bootstrapper: Installing Net framework and adding entry in add-remove program even if we cancel product installation

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. enter image description here

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...???

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...