[wix-users] Patch uninstall causing Repair

Bob Arnson bob at firegiant.com
Thu Aug 4 17:07:44 PDT 2016


If your patch bundle contains major-upgrade MSI packages, you need to repair the patch-target bundle to get the old versions back.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of robert_yang at agilent.com
Sent: Thursday, 4 August, 2016 19:58
To: wix-users at lists.wixtoolset.org
Subject: Re: [wix-users] Patch uninstall causing Repair

I decided to go hunting through the 3.10.3 source, and noticed this little snippet in src\burn\engine\plan.cpp, function PlanRelatedBundlesBegin  :
(I have a feeling the list won't preserve the Outlook formatting, sorry)

        case BOOTSTRAPPER_RELATION_DEPENDENT:
            // Automatically repair dependent bundles to restore missing
            // packages after uninstall unless we're being upgraded with the
            // assumption that upgrades are cumulative (as intended).
            if (BOOTSTRAPPER_RELATION_UPGRADE != relationType && BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action)
            {
                pRelatedBundle->package.requested = BOOTSTRAPPER_REQUEST_STATE_REPAIR;
            }
            break;

My scenario is simply installing a bundle, installing a patch to that bundle, then uninstalling the patch.  This seems to cause a repair of the original bundle, and all its packages.  Which isn't really what I want.  It works the way I want in 3.8, but not in 3.10 (see below).

The patch bundle has a RelatedBundle element which specifies the upgrade code of the original bundle, with action of "Patch".

Can someone kindly explain the logic behind doing a repair of the original bundle in this situation ?  It seems unnecessary.

Otherwise, I'm pretty psyched about 3.10.3.  Our next products are going out with this version.  I'd feel a little strange having to patch them with the 3.8 BA.

--
From: YANG,ROBERT (A-SantaClara,ex1)
Sent: Monday, August 01, 2016 4:25 PM
To: 'wix-users at lists.wixtoolset.org' <wix-users at lists.wixtoolset.org>
Subject: RE[2]: Patch uninstall causing Repair

Lastly, I decided to try building only the patch bootstrapper using Wix 3.8 and the patch itself in 10.3.2.  The patch uninstall behavior is back to what I was expecting.

So the issue (whatever it is) seems to be related to the standard BA in Wix 3.9 and later.  I hope this helps someone, somewhere.
---
From: YANG,ROBERT (A-SantaClara,ex1)
Sent: Monday, August 01, 2016 3:29 PM
To: 'wix-users at lists.wixtoolset.org' <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Subject: RE: Patch uninstall causing Repair

BTW A link to my previous post on the subject (re: Wix 3.9) :

http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Patching-bundle-with-MSP-td7598156.html#a7598183

---
From: YANG,ROBERT (A-SantaClara,ex1)
Sent: Monday, August 01, 2016 3:09 PM
To: 'wix-users at lists.wixtoolset.org' <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Subject: Patch uninstall causing Repair

Hi all - we have a released product which was built using Wix 3.10.2.  I am working on a minor update: purely Wix patching with an .MSP and an enclosing bundle .EXE.  We have done these kinds of patches before, most recently with Wix 3.8.

I noticed an odd thing after building the patch with Wix 3.10.2: when uninstalling the patch a repair of the product is triggered.  This is a little strange, and I wasn't expecting it.  Since the original bundle contains .Net, SQL Server Compact, MongoDB and some other things in addition to our MSI the repair takes a while.

With Wix 3.8 this didn't happen: uninstalling the patch just uninstalled the MSP and that's it.  Did this behavior change in Wix 3.9 or later ?  Did I do something wrong ?  Do I need to do something extra ?  Any hints on where to look ?

Thanks for any assistance !
-Rob


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



More information about the wix-users mailing list