[wix-users] How to downgrade a file to an older version in a patch?

Carlos Sosa carlos.sosa.us at outlook.com
Wed Nov 16 15:39:21 PST 2016


---------
<Bundle>
---------
<Chain>
      <!--Delete-->
      <PackageGroupRef Id='DELETE' />
      <!--Install-->
      <PackageGroupRef Id='INSTALL' />
  </Chain>
  </Bundle>

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Edwin Castro
Sent: Wednesday, November 16, 2016 3:39 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to downgrade a file to an older version in a
patch?

I think you need Schedule="afterInstallInitialize" in your MajorUpgrade
element. This will uninstall the old version first, then install the new
version.

With Schedul="afterInstallExecute" you install the new version, then
uninstall the old version.

--
Edwin G. Castro


On Wed, Nov 16, 2016 at 2:29 PM, Patterson, Brent <bcpatterson at xactware.com>
wrote:
> The issue is that the patches are uninstallable, so we can't ask them to
do that.
>
> I tried the major update approach (changed Product ID value to a new GUID,
and incremented the version for MSI, and tweaking the bootstrapper to allow
installation if "Obsolete" install is detected instead of showing uninstall
like before).  I created a new installer (not patch) that contains the
correct files, but when I install it, the newer version of third party DLL
is still there, while everything else is up to date to correct version.
What am I missing?  Why isn't it removing the entire install before
reinstalling, which is what major updates are supposed to do?
>
> This is what I have for MajorUpdate element in MSI:
>
> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] 
> is already installed." Schedule="afterInstallExecute" 
> AllowDowngrades="no" />
>
> I thought "AllowDowngrades" prevents an older MSI from removing a newer
MSI's install.  Is this interfering with components as well?
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of robert_yang at agilent.com
> Sent: Wednesday, November 16, 2016 2:42 PM
> To: wix-users at lists.wixtoolset.org
> Subject: Re: [wix-users] How to downgrade a file to an older version in a
patch?
>
> "We've ran into a problem with a third-party dll that requires us to
downgrade to an older version (i.e. 5.0 to 4.0).  The patch that upgrades it
is already released, so we can't just undo the change.  So this patch needs
to remove the newer version and put in the older version in its place."
>
>
>
> We would probably just ask users to uninstall patch A, and then install
patch B in its place -- I'm assuming here that patch B contains updates to
other files.  Uninstalling patch A should restore the DLL to version 4.0.
Then patch B simply leaves the DLL at version 4.0 and makes whatever other
changes are needed.
>
>
>
> I wonder if there is a way to bundle these two actions together ...
>
> -Rob
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
>
> ________________________________
>
> Xactware's opt-in mailing list allows you to receive Xactware News that is
of interest to you. Visit my.xactware.com today to join or to update your
email preferences!
>
> ________________________________
>
> This email is intended solely for the recipient. It may contain
privileged, proprietary or confidential information or material. If you are
not the intended recipient, please delete this email and any attachments and
notify the sender of the error.
>
>
> ____________________________________________________________________
> 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