[wix-users] RelatedBundle Action for Patch

Nick Elmer nelmer at awarenesstech.com
Fri Feb 25 10:30:01 PST 2022


Thanks for the reply Rob! One further question.

During the uninstall of the release bundle from ARP is successful. The patch bundle is also uninstalled successfully. However, I am seeing the MSP's left behind in the package cache. The relative section from the patch bundle uninstall logs are below. As you can see from the logs, the plan does not schedule the uncache of the dependent packages, but it does for the bundle. I looked at the source for src\burn\engine\plan.cpp::PlanCleanPackage() and the last if condition seems like it should be triggering removal of the dependent packages. I am using 3.14.0 of Wix but looking at source 3.11.2 source, so that logic may have changed. Is this possibly a bug in 3.14 or am I missing something?

Plan begin, 2 packages, action: Uninstall
Plan skipped related bundle: { GUID_F }, type: Dependent, because it was previously scheduled.
OnPlanPackageBegin PackageId: PatchA, State:None. Result:None
OnPlanPackageComplete: Status:0.
OnPlanPackageBegin PackageId:PatchB, State:None. Result:None
OnPlanPackageComplete: Status:0.
Planned related bundle: {OUR_BUNDLE_GUID}, type: Dependent, default requested: None, ba requested: None, execute: None, rollback: None, dependency: None
Planned package: PatchA, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: Unregister
Planned package: PatchB, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: Unregister
Plan complete, result: 0x0
...
OnRegisterBegin: Result:None.
Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID_E}, resume: Active, restart initiated: No, disable resume: Yes
OnRegisterComplete: Status:0.
OnExecuteBegin: Result:None.
Removed dependency: { GUID_E } on package provider: { GUID_D }, package PatchA
package dependency provider: { GUID_D }, package: PatchA
Removed dependency: { GUID_E } on package provider: { GUID_2 }, package PatchB
Removed package dependency provider: { GUID_2 }, package: PatchB
OnExecuteComplete: Status:0.
OnUnregisterBegin.
Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ GUID_E }, resume: None, restart: None, disable resume: Yes
Removed bundle dependency provider: { GUID_E }
Removing cached bundle: { GUID_E }, from path: C:\ProgramData\Package Cache\{ GUID_E }\
Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ GUID_E }, resume: None, restart initiated: No, disable resume: Yes
OnUnregisterComplete.

-----Original Message-----
From: Rob Mensching <rob at firegiant.com> 
Sent: Wednesday, February 23, 2022 11:58 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Nick Elmer <nelmer at awarenesstech.com>
Subject: RE: RelatedBundle Action for Patch

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.

Patch bundles do not replace the original bundle. They are "appended" to it. To replace the original bundle, you upgrade it.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Nick Elmer via wix-users
Sent: Wednesday, February 23, 2022 8:07 AM
To: wix-users at lists.wixtoolset.org
Cc: Nick Elmer <nelmer at awarenesstech.com>
Subject: [wix-users] RelatedBundle Action for Patch

Hi All,
I am trying to deliver a patch bundle to update an install of a release build. I'm trying to understand the difference between the RelatedBundle actions. Specifically "Patch" and "Upgrade". I found this thread <http://lists.wixtoolset.org/pipermail/wix-users-wixtoolset.org/2018-June/007073.html> where Jacob discusses the upgrade action, but it doesn't give me the whole picture with respect to patching. Nick's "WiX 3.6 - A Developer's Guide to Windows Installer XML" also documents upgrades, but nothing regarding patch bundles.

As described below, I need the patch bundle to have the behavior he describes where the new bundle UI with bug fixes takes priority over the old bundle after a patch install. However that does not seem to happen when "Patch" is defined. When running the patch bundle I see the MSP's get applied as patches, however the ARP uninstall will run the Gold bundle from the cache and not the Patch bundle after install. Seems like "Upgrade" is for major upgrades, and "Patch" is for applying patches.  What am I missing?

Here is what I have:
Bundle (Gold)
-Custom UI
-RelatedBundleRTM=Detect
-- ProductA.msi
-- ProductB.msi

Bundle (Patch)
-Custom UI
-RelatedBundleRTM=Patch
-RelatedBundlePatchA=Detect
-- ProductA.msp
-- ProductB.msp


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list