强制 WiX Burn 引导程序允许 MSI 文件使用 REINSTALLMODE=amus [英] Forcing WiX Burn bootstrapper to allow MSI files to use REINSTALLMODE=amus

查看:26
本文介绍了强制 WiX Burn 引导程序允许 MSI 文件使用 REINSTALLMODE=amus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为在我们设计和实施构建过程时我不是公司的一员(并且已经成功了好几年),所以我发现正在做的事情可能会被查看作为 MSI 的纯粹主义者"的黑客".但是,为了使用 Visual Studio 2012 获得可行的安装程序,我一直在做尽我所能模仿 中的 .vdproj 文件所做的事情Visual Studio 2010.在我遇到的许多障碍中,这似乎是我无法解决的最后一个.

Since I wasn't a part of my company when our build process was designed and implemented (and has been successful for quite a few years now), I found out that there were things that were being done that may be looked at as 'hacks' to MSI 'purists'. However, in order to get a workable installer with Visual Studio 2012, I've been doing the best I can to mimic what was being done with the .vdproj files in Visual Studio 2010. Of the many snags I've hit, this one seems to be the last one that I can't resolve.

作为使用 Visual Studio 2010 构建过程的一部分,我们构建了代码并在一台虚拟机上创建了框架 MSI.然后我们使用该框架 MSI 并将其安装在不同的 VM 上.安装框架后,我们构建了我们的产品代码并从中创建了一个产品 MSI.这创建了对我们框架的产品依赖.这意味着在客户端机器上安装时,引导程序需要先安装框架,然后是产品.在卸载我们的文档时,声明通过 ARP 或命令行 'msiexec/x {Product.msi/@ProductCode}' 然后是 'msiexec/x {Framework.msi/@ProductCode}'.

As part of our build process with Visual Studio 2010, we built our code and created a Framework MSI on one VM. Then we took that Framework MSI and installed it on a different VM. After the framework had been installed, we built our product code and created a Product MSI off of it. This created a Product dependence on our Framework. What this meant was that when installing on a client machine, the bootstrapper needed to install the Framework first followed by the Product. On uninstall our documentation stated to either have it handled through ARP or by command line 'msiexec /x {Product.msi/@ProductCode}' and then the 'msiexec /x {Framework.msi/@ProductCode}'.

当时,管理层确定 ProductCode 将是其他产品团队确定我们的产品是否已安装在机器上的最简单方法.这导致他们决定需要为框架和产品保留一个静态的 ProductCode.

At the time, management determined that the ProductCode would be the easiest way for other product teams to determine if our product had been installed on a machine. This lead them to the decision that they needed to keep a static ProductCode for both the Framework and the Product.

为了处理升级,他们必须创建一个 ProductTool.exe,它只不过是封装在一个可执行文件中的 msiexec,该可执行文件带有 /ProductCode={@ProductCode} 参数.

In order to handle upgrades, they had to create a ProductTool.exe that was nothing more than the msiexec wrapped in an executable that took a /ProductCode={@ProductCode} argument.

作为我们引导程序的一部分,他们调用了:

As part of our bootstrapper, they called:

  • 安装先决条件(Windows Installer 4.5、.NET 3.5 SP1、SQL Server 2008 R2Express,同步 2.1)
  • ProductTool.exe (Product.msi -- 卸载 Product.msi)
  • ProductTool.exe (Framework.msi -- 卸载 Framework.msi)
  • 安装Framework.msi
  • 安装Product.msi
  • Install prerequisites (Windows Installer 4.5, .NET 3.5 SP1, SQL Server 2008 R2 Express, Sync 2.1)
  • ProductTool.exe (Product.msi -- to uninstall the Product.msi)
  • ProductTool.exe (Framework.msi -- to uninstall the Framework.msi)
  • Install Framework.msi
  • Install Product.msi

然而,直到最近我才发现 Burn 引导程序没有允许 REINSTALLMODE=amus.在安装日志中,它说将其更改为 REINSTALLMODE=vomus.显然,为了使上述过程能够用于升级,他们必须设置 REINSTALLMODE=amus.

However, I didn't discover until just recently that the Burn bootstrapper does not allow REINSTALLMODE=amus. In the install logs, it says that it changes it to REINSTALLMODE=vomus. Apparently in order to get that aforementioned process to work on upgrades, they had to set REINSTALLMODE=amus.

更新:我终于与安装程序的原始开发人员交谈,发现故意使用 REINSTALLMODE=amus 来还原所有版本化文件(程序集、DLL 文件等)和非版本化文件(.config、SQL 脚本等)作为风险最小化和稳健性/自我修复"策略.

UPDATE: I finally got to talk to the original developer of the installer and found out that REINSTALLMODE=amus was used intentionally to revert all of the versioned files (assemblies, DLL files, etc.) and non-versioned files (.config, SQL script, etc.) as a risk minimization and robustness/"self-healing" strategy.

说了这么多,是否有可能使用标准的刻录引导程序 (BA) 设置 REINSTALLMODE=amus 以便我可以使升级工作?MSI 文件设置了属性,但 Burn 似乎覆盖了它.

Having said all of that, is it even possible with a standard burn bootstrap application (BA) to set REINSTALLMODE=amus so that I can get the upgrades working? The MSI files have the Property's set, but Burn seems to override it.

推荐答案

不,目前的 Burn 引擎不支持此功能.Burn 非常小心地控制 REINSTALLMODE 以正确处理升级和维修.在 REINSTALLMODE 中使用 a 远非最佳实践,因此不受支持.此外,不清楚为什么在您描述的场景中需要 a.

No, this is not supported by the Burn engine today. Burn controls the REINSTALLMODE very carefully to correctly handle upgrades and repairs. Using a in REINSTALLMODE is far from a best practice and thus is not supported. Also, it isn't clear why a is necessary in the scenario you described.

这篇关于强制 WiX Burn 引导程序允许 MSI 文件使用 REINSTALLMODE=amus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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