问题
There are 3 bundles, code is listed below. 1.0.0, 1.0.0.1, and 2.0.0.
If 1.0.0, 1.0.0.1, and 2.0.0 are installed, View Installed Updates will still have 1.0.0.1 listed as installed. It will remain there until the last Version is uninstalled.
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Burn Installer" Version="1.0.0" Manufacturer="LANSA" UpgradeCode="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" Copyright="..." AboutUrl="...">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<MsiPackage Id="MainPackage" SourceFile="TESTLIST_v1.0.0_en-us.msi" Vital="yes" DisplayInternalUI="yes" />
</Chain>
</Bundle>
</Wix>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Patch 1.0.0.1" ParentName="Burn Installer" Version="1.0.0.1" Manufacturer="LANSA" UpgradeCode="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" Copyright="..." AboutUrl="...">
<RelatedBundle Id="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" Action="Patch"/>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<MspPackage Id="Patch" SourceFile="TESTLIST_v1.0.0.1_en-us.msp" Vital="yes" DisplayInternalUI="no" PerMachine="yes" Permanent="no"/>
</Chain>
</Bundle>
</Wix>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Burn Installer" Version="2.0.0" Manufacturer="LANSA" UpgradeCode="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" Copyright="..." AboutUrl="...">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<MsiPackage Id="MainPackage" SourceFile="TESTLIST_v2.0.0_en-us.msi" Vital="yes" DisplayInternalUI="yes" />
</Chain>
</Bundle>
</Wix>
When an Upgrade is applied, all prior Versions and Patches should be delisted from Programs and Features and/or View Installed Updates. Exactly the same as does occur when the MSI/MSP are directly installed rather than through the Bundler.
回答1:
The answer for WiX 3.9 and later is as follows...
In Major Upgrade bundles the UpgradeCode must match. "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" in the example below.
In Patch Bundles the Upgrade Code must be unique, unrelated to any other GUID used in any bundle. "CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC" in the example.
In the Major Upgrade bundles the RelatedBundle must be unique. This GUID is used in all the patches for that Major Upgrade. "BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB" in the example.
These settings also ensure that the Major Upgrades are listed in Programs and Features and the patches are listed in View Installed Updates.
<Bundle Version="1.0.0" UpgradeCode="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA">
<RelatedBundle Id="BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB" Action="Detect" />
</Bundle>
<Bundle Version="1.0.0.1" UpgradeCode="CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC">
<RelatedBundle Id="BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB" Action="Patch" />
</Bundle>
<Bundle Version="2.0.0" UpgradeCode="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA">
<RelatedBundle Id="DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD" Action="Detect" />
</Bundle>
来源:https://stackoverflow.com/questions/38840748/wix-bundle-patches-for-1-0-0-are-not-removed-from-programs-features-when-bund