![](/img/trans.png)
[英]WiX upgrade question - file's major version was incremented, but revision is lower, now old file removed, yet new file is not copied during upgrade
[英]WiX Bundle upgrade: a new version of MSI is installed before the old version is removed
我有一個安裝MSI的WiX軟件包 ,還檢查是否安裝了.NET。 安裝捆綁包(和安裝程序)時,一切都按預期工作。
我的問題是捆綁包升級。 在升級中,捆綁包首先安裝MSI的v_Next,然后取消安裝v_revious的MSI。
我該如何更改此訂單? 我希望在升級中,在安裝v_Next之前卸載MS_的v_Previous。
以下是我的包:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="MyProductName"
Version="1.0.0.0"
Manufacturer="MyCompanyName"
UpgradeCode="4abf3f67-1234-35b1-b2c1-dd7649b60e1d">
<BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
SuppressOptionsUI="yes"
LicenseFile="License.rtf"
ThemeFile="Theme.xml"
LogoFile="MyProductName.png"
/>
<Payload
Name="BootstrapperCore.config"
SourceFile="BootstrapperCore.config"/>
<Payload
SourceFile="NetfxLicense.rtf"/>
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef
Id="Netfx4Full"/>
<MsiPackage
Compressed="yes"
SourceFile="$(var.SolutionDir)\Setup\MyProductName.msi"
Vital="yes">
</MsiPackage>
</Chain>
</Bundle>
<Fragment>
<WixVariable
Id="WixMbaPrereqPackageId"
Value="Netfx4Full" />
<WixVariable
Id="WixMbaPrereqLicenseUrl"
Value="NetfxLicense.rtf" />
<util:RegistrySearch
Root="HKLM"
Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
Value="Version"
Variable="Netfx4FullVersion" />
<util:RegistrySearch
Root="HKLM"
Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
Value="Version"
Variable="Netfx4x64FullVersion"
Win64="yes" />
<PackageGroup
Id="Netfx4Full">
<ExePackage
Id="Netfx4Full"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="$(var.SolutionDir)\packages\dotNetFx40_Full_x86_x64.exe"
DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=164193"
DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)"/>
</PackageGroup>
</Fragment>
</Wix>
謝謝Rob的回答。 我試圖這樣做,但它不起作用(我肯定遺漏了一些東西)......這就是我在MSI中所擁有的:
<Product Id="*"
Name="MyProductName"
Language="1033"
Version="1.0.0.0"
Manufacturer="MyCompanyName"
UpgradeCode="aa027fd0-5111-1236-9af6-55581a588123">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of MyProductName is already installed."
AllowDowngrades="no"/>
<MediaTemplate />
<Feature Id="ProductFeature"
Title="MyProductName"
Level="1">
<ComponentRef Id="ApplicationShortcut" />
<ComponentGroupRef Id="AllFiles" />
</Feature>
</Product>
如果我運行v_previous MSI然后運行v_Next MSI(單獨,不在捆綁包中),我將同時安裝,因此不會執行升級。 我究竟做錯了什么?
沒關系,MajorUpgrade正在運作。 我的版本編號在vNext MSI中是錯誤的。 我現在還需要添加次要的升級支持。
升級捆綁包總是在今天卸載**。 要在v_Previous.msi
之前刪除v_Previous.msi
, v_Next.msi
v_Next.msi
主要升級(請參閱MajorUpgrade元素 ) v_Previous.msi
。
**我認為有一個功能請求允許其他展示位置,但還沒有人實現。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.