[wix-users] Advice on an upgrade... [P]

Phill Hogland phill.hogland at rimage.com
Wed Nov 18 13:02:02 PST 2015


How about a semi-CA that adds entries to the Update table if the configurations of concern are detected, and scheduled prior to RemoveExistingProducts?  (I have not do this but I did use a semi-CA for another purpose and it worked slick).   I found that searching the wix source for WcaAddTempRecord was the most helpful implementation examples.  There is also a Joy-of-Setup blog but the function prototype has changed from those details.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: Wednesday, November 18, 2015 2:43 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Advice on an upgrade... [P]

Classification: Public
Hi Phil and all,

Sigh, okay I had to scrap the Upgrade code :(

I have two apps (call them X and Y apps) that have already been released that are using the same MSI (Plugins installer) as part of their install

In version A of my newer app (call it Z)  it was installing this MSI (Plugins installer) as well
In Version B which we will be releasing soon, I have moved the DLL's that that other MSI (Plugins installer) was installing into our app MSI

The issue is that I can install either X or Y and my newer app Version A (call it Z) and they can coexist because I set " SharedDllRefCount "with the components of the MSI (plugins installer) so if you install X (or Y) then install Z (version A) then uninstall either of them, the other will continue to work...

We realized this was not going to work with version B of app Z so I moved the DLL's from the Plugins installer to my app Z

So my delima is that on Upgrade of Z (to version B) I don't want to remove the Plugins installer if apps X or Y is installed

So I have created a custom action that checks for apps X and Y and if they exist I don't uninstall the Plugins MSI

If X or Y does not exist I run MSIEXEC.exe /X <plugins GUID> using ProcessStartInfo and Process.Start(info)

However the installer is failing:
Failed to grab execution mutex. System error 258.
MainEngineThread is returning 1618

I have the custom action set up as:

<!-- On upgrade we want to remove the 4.4 RTM Core plug ins only if Client or Admin 4.4 RTM are not installed -->
    <CustomAction Id="CA_Set_RemovePluginsOnUpgrade" Property="CA_REMOVEPLUGINS_ONUPGRADE" Value="[ADMIN_GUID]|[CLIENT_GUID]|[CLIENT_MSI_GUID]|[PLUGIN_GUID]" HideTarget="yes"/>
    <CustomAction Id="CA_REMOVEPLUGINS_ONUPGRADE" BinaryKey="BIN_CustomAction" DllEntry="RemovePluginsOnUpgrade" Impersonate="no" Execute="commit" Return="asyncWait"/>

Then in InstallExecuteSequence I set the sequence to:

<Custom Action="CA_Set_RemovePluginsOnUpgrade" Before="InstallFinalize">WIX_UPGRADE_DETECTED</Custom>
<Custom Action="CA_REMOVEPLUGINS_ONUPGRADE" After="CA_Set_RemovePluginsOnUpgrade">WIX_UPGRADE_DETECTED</Custom>

My custom action code RemovePluginsOnUpgrade works great detecting if X or Y is installed and based on that whether or not to run the uninstall of the Plugins installer...

The issue is that of course the uninstall fails because another install is running (the calling MSI)

Any advice how to proceed???

Thanks,

Steve

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: November-17-15 2:07 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Advice on an upgrade...
Excellent, I just tried that and it works :)

<!-- On in place upgrade we want to remove the Core Plug-ins from 4.4 RTM -->
    <Upgrade Id="THE-UPGRADE-GUID-OF-OLD-INSTALL">
      <UpgradeVersion Property="REMOVEPLUGINS" IncludeMaximum="yes" IncludeMinimum="yes" Minimum="15.4.10.19"  Maximum="15.4.10.19" />
    </Upgrade>

Steve

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phil Wilson
Sent: November-17-15 2:03 PM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Advice on an upgrade...

You should be able to add an Upgrade element naming the UpgradeCode of that Plugins MSI. There's nothing about major upgrades that requires only one older product to be upgraded/uninstalled. 
Phil  

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steve Ogilvie
Sent: Tuesday, November 17, 2015 10:13 AM
To: WiX User List
Subject: [wix-users] Advice on an upgrade...

Hi folks,
Version 1 of our product (which has gone out the door) installs a MSI for a bunch of plugins, as well as our product MSI (so 2 MSI's).
Version 2 of our product (which hasn't been released yet) had merged the files from that MSI, into our product MSI.i.e. the 12 files from the plugin MSI are now in our product MSI.
I tested an in place upgrade of Version 2 overtop of Version 1, all works well EXCEPT that the Plugins MSI does not get uninstalled and remains behind.
Any idea on how to safely uninstall the Plugins MSI on upgrade with version 2?
Thanks,
Steve 		 	   		  

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



 
This message has been marked as Public by Steven Ogilvie on November-18-15 3:43:29 PM.

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

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



More information about the wix-users mailing list