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

查看:131
本文介绍了Wix托管引导程序:即使我们取消产品安装,也要安装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"                            
   >

在Windows 7 x64(不存在Net FW 4.5.1)上,通过安装,将显示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的安装并启动我的产品包(托管的引导程序),如果我取消了其安装,或者由于任何错误/问题而可能终止,则它将其保留在添加-删除程序中。如果我尝试从添加-删除程序中进行卸载/更改,它将再次启动启用了安装按钮的托管引导程序安装界面,就好像它是全新安装,但始终以错误结尾。

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

推荐答案

Burn引擎将在其中注册捆绑包安装捆绑软件的任何部分后,立即添加/删除程序。 .NET必备软件包是捆绑软件的一部分,因此,当MBAPrereq BootstrapperApplication安装.NET时,捆绑软件将在添加/删除程序中注册。无法在捆绑软件或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托管引导程序:即使我们取消产品安装,也要安装Net框架并在添加删除程序中添加条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆