Wix 安装程序无法升级 InstallShield 东西

Wix installer can not upgrade InstallShield thingy

我有 InstallShield 产品 - setup.exe。这个 setup.exe 实际上是某种引导程序,它安装了一个名为 product.msi 的文件。我有这个 product.msiUpgradeCode 东西。所以我应该能够制作一个带有 MajorUpgrade 元素的 Wix 安装程序。但是,它不起作用 - 并非所有文件都已安装。这里是 link to the log.

以下是日志中的一些可疑行:

MSI (s) (2C:F4) [22:47:19:663]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 2911 
DEBUG: Error 2911:  Could not remove the folder C:\Config.Msi\.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2911. The arguments are: C:\Config.Msi\, , 
MSI (s) (2C:F4) [22:47:19:667]: Note: 1: 2318 2:  

以下是 wxs 文件的相关部分:

<Product Id="*" Codepage="1252" Language="1033" Manufacturer="Intel Corporation"
           Name="TenLira" UpgradeCode="$(var.UpgradeCode)" Version="$(var.Version)">

    <Package Comments="Contact: Refael Sheinker, refael.sheinker@intel.com." Description="TenLira"
             InstallerVersion="500"
             Compressed="yes"
             InstallPrivileges="elevated"
             InstallScope="perMachine"
             Keywords="Installer,MSI,Database" Languages="1033" Manufacturer="Intel Corporation" Platform="x64" />

    <Property Id="REINSTALLMODE" Value="amos" />
    <Property Id="REBOOT" Value="ReallySuppress" />

    <Media Id="1" Cabinet="my_application.cab" EmbedCab="yes" />

    <MajorUpgrade AllowDowngrades="no"
                  AllowSameVersionUpgrades="yes"
                  Disallow="no"
                  IgnoreRemoveFailure="no"
                  MigrateFeatures="yes"
                  Schedule="afterInstallFinalize"
                  DowngradeErrorMessage="A later version of [ProductName] is already installed" />

请指教。谢谢。雷法尔.

好的,嗯...我不知道为什么,但将 MajorUpgrade 元素更改为以下内容:

<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed" />

解决问题。

使用默认的 MajorUpgrade 元素配置 时,您将默认在主要升级期间安装新版本之前完全卸载旧产品版本。 在技术术语中RemoveExistingProduct 的位置在 InstallExecuteSequence 中发生了变化(它从 InstallFinalize 之后移动到 InstallInitialize 之前)- 我证实当您更改 MajorUpgrade element 到它的默认和最简单的格式 - 就像你做的那样)。

在主要升级过程中尽早卸载将有助于消除因两个设置中错误的组件引用而导致的任何错误。这种错误的组件引用通常会导致文件在升级后丢失,或者文件没有​​按预期被覆盖(后者是一个更大的问题,与影响文件版本控制规则的危险 REINSTALLMODE 设置有关)。明天我会更新更多细节 - 我写了一个很长的答案,现在 post 太乱了。

郑重声明,REINSTALLMODE (amos) 的值似乎不是 REINSTALLMODE 的有效参数。有些人使用 amus 强制覆盖文件,但 amos 只是不正确的参数(字母 ao 有冲突 - 它们为同一事物定义不同的行为)。使用 amus 会导致一些非常不受欢迎的 side-effects ,如果我有时间,我会在明天尝试解释。