[英]Wix installer can not upgrade InstallShield thingy
我有InstallShield產品setup.exe
。 這個setup.exe
實際上是某種引導程序,它會安裝一個名為product.msi
的文件。 我有這個UpgradeCode
的roduct.msi
。 因此,我應該能夠使用MajorUpgrade
元素制作一個Wix安裝程序。 但是,它不起作用-並非所有文件都已安裝。 這是日志的鏈接 。
以下是日志中的一些可疑行:
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。
使用默認的MajorUpgrade元素配置時,默認情況下將在大型升級期間完全卸載舊產品版本,然后再安裝新版本。 用技術術語來說 : RemoveExistingProduct
的位置在InstallExecuteSequence中更改(它從InstallFinalize之后移動到InstallInitialize之前)-我驗證了當您將MajorUpgrade element
更改為其默認和最簡單的格式時確實發生了這種情況(就像您所做的那樣)。
在重大升級過程中及早卸載將有助於消除由於兩種設置中錯誤的組件引用而導致的任何錯誤。 此類錯誤的組件引用通常會導致升級后丟失文件,或者未按預期覆蓋文件(后者是與影響文件版本控制規則的危險的REINSTALLMODE設置有關的較大問題)。 明天我將更新更多詳細信息-我寫了一個很長的答案,太亂了,無法立即發布。
作為記錄,您的REINSTALLMODE( amos
)值似乎不是REINSTALLMODE的有效參數。 有些人使用amus
強制覆蓋文件,但是amos只是不正確的參數(字母a
和o
沖突-他們為同一事物定義了不同的行為)。 使用amus
會導致許多非常不希望的副作用,如果有時間,我將在明天嘗試解釋。
好的,嗯...我不知道為什么,但是將MajorUpgrade
元素更改為以下內容:
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed" />
解決問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.