[wix-users] if an upgrade fails *after* the previous product is removed will rollback reinstall it? [P]

Phil Wilson phil.wilson at mvps.org
Fri Dec 4 11:34:45 PST 2015


The simplest way to look at is that if REP is between InstallInitialize and
InstallFinalize then it is part of the install transaction, so a roll back
of that uninstall will reinstall the older product, leaving the system
unchanged with the older product still installed. As I said before, it's a
test case that tends not to get covered as much as install or uninstall, and
there seem to be many potential failure points with custom actions and
conditions. 

Phil W  

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Phill Hogland
Sent: Friday, December 04, 2015 5:27 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it? [P]

Yes, I use essentially:
<MajorUpgrade DowngradeErrorMessage="A newer version of
$(var.PlatformProductName) is already installed. Setup will now exit."
Schedule="afterInstallInitialize"  />

But I have not really focused on the exact issue you are trying to address,
and I don't claim any expertise like Phil W or others who have advised you
certainly have.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Steven Ogilvie
Sent: Thursday, December 03, 2015 3:32 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it? [P]

Classification: Public
You mean:

From:

<MajorUpgrade DowngradeErrorMessage="A newer version of
$(var.PlatformProductName) is already installed. Setup will now exit."
Schedule="afterInstallValidate" AllowDowngrades="no"/>

To:

<MajorUpgrade DowngradeErrorMessage="A newer version of
$(var.PlatformProductName) is already installed. Setup will now exit."
Schedule="afterInstallInitialize" AllowDowngrades="no"/>

Steve




This message has been marked as Public by Steven Ogilvie on December-03-15
4:32:11 PM.

The above classification labels were added to the message by TITUS Message
Classification. 
For more information visit www.titus.com.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Phill Hogland
Sent: December-03-15 4:29 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it?

>> I cancel that MSI the plugin rolls back but the *old* version is not
reinstalled...
It sounds like you want to use afterInstallInitialize.

>From chm:
afterInstallValidate
(Default) Schedules RemoveExistingProducts after the InstallValidate
standard action. This scheduling removes the installed product entirely
before installing the upgrade product. It's slowest but gives the most
flexibility in changing components and features in the upgrade product. Note
that if the installation of the upgrade product fails, the machine will have
neither version installed.
afterInstallInitialize
Schedules RemoveExistingProducts after the InstallInitialize standard
action. This is similar to the afterInstallValidate scheduling, but if the
installation of the upgrade product fails, Windows Installer also rolls back
the removal of the installed product -- in other words, reinstalls it.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Steven Ogilvie
Sent: Thursday, December 03, 2015 3:01 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it?

Okay I have a bundle with 3 different MSI's
1 of them is a plugin in MSI

On upgrade it does a major upgrade of the Plugins and then continues to
upgrade the next MSI, I cancel that MSI the plugin rolls back but the *old*
version is not reinstalled...

Here is the plugin package in the bundle:
<MsiPackage Id="G_CorePluginsInstall_x64"
                  DisplayName="Plugins x64"
                  SourceFile="Core_Plugins_x64.msi"
                  Name=" Core_Plugins_x64.msi"
                  InstallCondition="VersionNT64"
                  DisplayInternalUI="no"
                  Visible="no"
                  Cache="no"
                  Compressed="no"
                  Permanent="no">
        <MsiProperty Name="MSI_RUN_FROM_EXE" Value="[MSI_RUN_FROM_EXE]"/>
      </MsiPackage>

Here is what is in the Plugin WXS for upgrades:
<MajorUpgrade DowngradeErrorMessage="A newer version of
$(var.PlatformProductName) is already installed. Setup will now exit."
Schedule="afterInstallValidate" AllowDowngrades="no"/>

<!-- Plug-ins Upgrade stuff -->
    <Upgrade Id="$(var.UpgradeCode)">
      <UpgradeVersion Property="OLDAPPFOUND" IncludeMinimum="yes"
OnlyDetect="no" Minimum="$(var.BaseVersion)" IncludeMaximum="no"
Maximum="$(var.Version)" />
      <UpgradeVersion Property="SAMEFOUND" IncludeMaximum="yes"
IncludeMinimum="yes" Minimum="$(var.Version)" Maximum="$(var.Version)"
OnlyDetect="yes"/>
    </Upgrade>

<CustomAction Id="SetMspReinstall" Property="REINSTALLMODE" Value="amus" />
    <UI>
      <ProgressText Action="SetMspReinstall">CA: Setting REINSTALLMODE to
amus</ProgressText>
    </UI>

<InstallExecuteSequence>
      <ResolveSource Before="CostFinalize"><![CDATA[Not Installed And Not
PATCH]]></ResolveSource>
      <Custom Action="SetMspReinstall"
After="FindRelatedProducts">Installed</Custom>
      <RemoveExistingProducts Overridable="yes" After="InstallInitialize"/>

Not sure what to look for in the log file to tell why it didn't reinstall
the old version...

Any help would be appreciated...

Steve

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Phil Wilson
Sent: December-03-15 12:51 PM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it?

I misspoke here. Your REP is between InstallInitialize and InstallFinalize
so a rollback will undo the REP and reinstall the original product.
Phil  

-----Original Message-----
From: Phil Wilson [mailto:phil.wilson at mvps.org]
Sent: Monday, November 30, 2015 3:16 PM
To: 'WiX Toolset Users Mailing List'
Subject: RE: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it?

That not in the transaction between InstallInitialize->InstallFinalize
transaction, so if it fails it will rollback and fail the upgrade. If you
sequence it after InstallInitialoze, inside the transaction, then a
rollbackl of the upgrade will reinstall the older product. It's often tricky
because it's an edge case that doesn't often get tested before the product
is shipped. 

If REP is after InstallFinalize, the upgrade product is installed, then the
older version is uninstalled, and if this uninstall fails then it will roll
back, so you'll end up with both old and new products installed. 

Phil 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Steven Ogilvie
Sent: Thursday, November 26, 2015 10:18 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it? 

I have this:

<MajorUpgrade DowngradeErrorMessage="A newer version of [SERVERPRODUCTNAME]
is already installed. Setup will now exit." Schedule="afterInstallValidate"
AllowDowngrades="no"/>

<ResolveSource Before="CostFinalize"><![CDATA[Not Installed And Not
PATCH]]></ResolveSource> <RemoveExistingProducts Overridable="yes"
After="InstallInitialize" />

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
John Cooper
Sent: November-26-15 1:11 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it?

That depends on the scheduling of RemoveExistingProducts.  It is not true in
most cases.
--
John Merryweather Cooper
Senior Software Engineer | Integration Development Group | Enterprise
Notification Service Jack Henry & Associates, Inc.(r) | Lenexa, KS  66214 |
Ext:  431050 | JoCooper at jackhenry.com


________________________________________
From: wix-users [wix-users-bounces at lists.wixtoolset.org] on behalf of Steve
Ogilvie [sogilvie at msn.com]
Sent: Thursday, November 26, 2015 7:49 AM
To: WiX User List
Subject: [wix-users] if an upgrade fails *after* the previous product is
removed will rollback reinstall it?

The e-mail below is from an external source.  Please do not open attachments
or click links from an unknown or suspicious origin.

Hi folks,
If while a major upgrade is running and the install fails and rollsback
(after the previous product was uninstalled) will the rollback attempt to
reinstall the previous version?
Thanks,
Steve



____________________________________________________________________
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