[wix-users] Related Bundles - Order of Execution

Todor Todorov todor at scientia.dk
Wed Feb 28 11:13:20 PST 2018


Since I am not an expert, I would like to verify that I get it correctly. In MSI_B we will have:
	<Product Id="*" UpgradeCode="{MSI_B_UPGRADE_ID}" Version="2.0.1" ... >
		<Upgrade Id="{MSI_B_UPGRADE_ID}">
			<UpgradeVersion Minimum="2.0.1" OnlyDetext="yes" Property="NEWVERSIONDETECTED" />
			<UpgradeVersion Minimum="0.0.0" Maximum="2.0.1" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDVERSIONBEINGUPGRADED" />
		<Upgrade Id="{MSI_A_UPGRADE_ID}">
			<UpgradeVersion Minimum="0.0.0" Maximum="99.99.99" IncludeMinimum="yes" IncludeMaximum="yes" IgnoreRemoveFailure="yes" />
		<FindRelatedProducts Before="LaunchConditions" />
		<RemoveExistingProducts After="InstallValidate" />
		<Custom After="CostFinalize" />
		<Custom After="InstallFiles" />

Is the above enough? In other words, does having an <UpgradeVersion> element without any property etc. unintall the MSI in question? Also, how do I set maximum version to infinity? 


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob via wix-users
Sent: Wednesday, 28 February, 2018 19:50
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Hoover, Jacob <Jacob.Hoover at greenheck.com>
Subject: Re: [wix-users] Related Bundles - Order of Execution

You'll need to include MSI A's UpgradeCode in the Upgrade table for MSI B, such that installing the new B will remove the old A first (assuming an early schedule of RemoveExistingProduct).

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Todor Todorov via wix-users
Sent: Wednesday, February 28, 2018 12:46 PM
To: wix-users at lists.wixtoolset.org
Cc: Todor Todorov <todor at scientia.dk>
Subject: [wix-users] Related Bundles - Order of Execution

I will try to keep the question as short as possible.

We have a bundle that contains two MSI packages, MSI_A and MSI_B. MSI_A executes some custom actions to modify the target system and has a reverse action to undo the changes upon uninstall.

This split of the MSI packages gave us some headaches, so I merged everything from MSI_A into MSI_B and dropped MSI_A from the bundle. In other words, MSI_A is gone and only MSI_B should be installed by the installer. I did not change any product id or upgrade id.

This mostly works, except when an older version is updated by the bundle. Some debugging shows that the bundle schedules the new MSI_B for install and then it schedules an uninstall of the old version of the bundle (with MSI_A and MSI_B) as *related bundle - uninstall*.

This is all good, except that MSI_B is installed first, which now runs the above mentioned custom actions. Moments later, the *related bundle - uninstall* runs, which uninstalls MSI_A (which is no longer needed, because its contents were merged into MSI_B) thus running the custom actions for cleanup and de-facto undoing the work that MSI_B just did.

Is it possible to force the *related bundle - uninstall* to happen *before* the new MSI packages are installed? We do have a custom BA and can control many aspects of the bundle process. Alternatively, are there any other ways to fix this issue? One thing I cannot do is modify the currently installed old version containing MSI_A and MSI_B.


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

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

More information about the wix-users mailing list