我有InstallShield产品 - setup.exe
。这个setup.exe
实际上是一种安装名为product.msi
的文件的某种引导程序。我有UpgradeCode
这个p roduct.msi
的东西。所以我应该能够使用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" />
请指教。谢谢。 Refael。
答案 0 :(得分:1)
使用默认的MajorUpgrade元素配置时,您将默认在主要升级期间安装新版本之前完全卸载旧版产品。 在技术术语:InstallExecuteSequence中RemoveExistingProduct
更改的位置(从InstallFinalize之后移至InstallInitialize之前) - 我确认当您更改MajorUpgrade element
时确实会发生这种情况到它的默认和最简单的格式 - 就像你做的那样。)
在主要升级期间提前卸载将有助于消除由两个设置中的错误组件引用引起的任何错误。这种有缺陷的组件引用通常会导致文件在升级后丢失,或者文件未按预期被覆盖(后者是与影响文件版本控制规则的危险REINSTALLMODE设置有关的更大问题)。我将在明天更新这个更详细的信息 - 我写了一篇很长的答案,现在发帖太乱了。
对于记录,您的REINSTALLMODE(amos
)的值似乎不是REINSTALLMODE的有效参数。有些人使用amus
强制覆盖文件,但amos只是不正确的参数(字母a
和o
存在冲突 - 它们为同一事物定义了不同的行为)。使用amus
会导致一些非常不受欢迎的副作用,如果我有时间的话,明天我会尝试解释。
答案 1 :(得分:0)
好的,嗯......我不知道为什么,但将MajorUpgrade
元素更改为以下内容:
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed" />
解决问题。