Wix Managed Bootstrapper:安装 Net 框架并在添加-删除程序中添加条目,即使我们取消产品安装

Wix Managed Bootstrapper: Installing Net framework and adding entry in add-remove program even if we cancel product installation(Wix Managed Bootstrapper:安装 Net 框架并在添加-删除程序中添加条目,即使我们取消产品安装)

本文介绍了Wix Managed Bootstrapper:安装 Net 框架并在添加-删除程序中添加条目,即使我们取消产品安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的托管引导程序中,我正在打包 Net framework 4.5.1 和 VC Redistributable,如下所示:

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"                            
   >

在不存在 Net FW 4.5.1 的 Windows 7 x64 上,通过安装,这将显示 wixstdba 安装 .Net 框架的基本屏幕,它还会在完成 Net Framework 并启动之前在添加-删除程序中添加一个条目我的 msi 包安装.

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.

问题:现在在完成 Net Framework 4.5.1 安装并启动我的产品包(托管引导程序)后,如果我取消它的安装,或者它可能由于任何错误/问题而终止,它离开添加删除程序中的条目.如果我尝试从 Add-Remove programs 卸载/更改它,它会再次启动托管引导程序安装界面并启用安装按钮,就好像它是全新安装一样,但总是以错误结束.

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.

如果我从托管界面取消安装或由于任何错误/问题而终止安装,我想从 Add-Remove 程序中删除其条目.

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.

我的 Bundle 或 Managed Code 是否遗漏了某些内容...???

Am I missing something from my Bundle or Managed Code...???

推荐答案

一旦安装了包的任何部分,Burn 引擎就会在添加/删除程序中注册包..NET 必备包是捆绑包的一部分,因此当 MBAPrereq BootstrapperApplication 安装 .NET 时,捆绑包会在添加/删除程序中注册.无法在 Bundle 或 BA 中修改 Burn 引擎的这种行为.一个潜在的功能请求可能是让 Burn 仅在安装非永久包后注册捆绑包.功能请求应提交到 http://wixtoolset.org/issues.

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.

今天,您可以尝试通过将逻辑放入您的 BA 中来解决此问题,如果检测到这种情况,它会在调用 Engine::Exit 之前自动卸载自己.

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.

这篇关于Wix Managed Bootstrapper:安装 Net 框架并在添加-删除程序中添加条目,即使我们取消产品安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Wix Managed Bootstrapper:安装 Net 框架并在添加-删除程序中添加条目,即使我们取消产品安装

基础教程推荐