简体   繁体   中英

WiX Bundle: Patches for 1.0.0 are not removed from Programs & Features when bundle 2.0.0 is installed

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.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM