我正在努力啓用WiX的主要升級功能。如何讓WiX主要升級工作?
我想安裝的每一個新版本是一個重大升級(完全卸載,然後安裝新的),因爲我們不想讓不同的升級和全新安裝的版本。
我開始嘗試使用該標籤的東西做了,但我一直得到「安裝了另一個版本。」我運行安裝程序時出現錯誤消息。
因此,我實施了V3.5中添加的新標籤,以便升級。我仍然收到錯誤消息。
然後我讀的地方,你需要更改ID GUID爲每個新版本。所以我設置了Id =「*」來讓WiX生成它們。
現在,當我安裝它不卸載舊版本的新版本,而你最終有兩個安裝到同一個文件夾中。我解決了這個問題,因爲運行MSI(新的或舊的)會啓動修復/刪除屏幕。
此外,程序沒有被新版本覆蓋。
這裏是我的WiX的腳本的開頭:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="Foo"
Language="1033"
Codepage="1252"
Version="!(bind.FileVersion.Foo.exe)"
Manufacturer="Foo Bar Ltd."
UpgradeCode="dac2fab2-7d76-4e47-b25f-0748380dab81">
<Package
Description="Foo"
Comments="This installer database contains the logic and data required to install Foo."
InstallerVersion="300"
Languages="1033"
SummaryCodepage="1252"
Platform="x86"
Compressed="yes" />
<!-- Remove older versions -->
<!-- Important note: MSI ignores the last version digit 1.0.0.? when comparing versions, so always change at least the 3rd digit for new external releases-->
<MajorUpgrade DowngradeErrorMessage="The version currently installed is newer than the version you are attempting to install."/>