我有一个
WiX bundle安装
MSI并检查是否安装了.NET.安装捆绑包(和安装程序)时,一切都按预期工作.
原文链接:/windows/364343.html我的问题是捆绑包升级.在升级中,捆绑包首先安装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(单独,不在捆绑包中),我将同时安装,因此不会执行升级.我究竟做错了什么?