[wix-users] PackageGroup tries to run both ExePackages on uninstall

Rob Mensching rob at firegiant.com
Sat Feb 2 09:06:47 PST 2019


DetectCondition should be it. Log file should show decision making.

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Jon Seanor via wix-users
Sent: Saturday, February 2, 2019 5:06 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Jon Seanor <jseanor at gmail.com>
Subject: [wix-users] PackageGroup tries to run both ExePackages on uninstall

Hi

I'm trying to author a package that performs new installations and also upgrade existing installations.

My bundle includes a 3rd party installer (referred to in the code below as "an_installer.exe").
The 3rd party installer has different cmd line parameters that must be specified when upgrading, and must not be used for new installations.

New installations are working as expected:
1) the "new_customer" PackageGroup runs.
2) the "existing_customer" PackageGroup does not run.

Upgrades are working as expected:
1) the "new_customer" PackageGroup does not run.
2) the "existing_customer" PackageGroup runs.

However, after upgrading, when you uninstall, BOTH PackageGroup are scheduled for uninstall
1) the "new_customer" PackageGroup runs, then
2) the "existing_customer" PackageGroup runs and throws an error.

I'm not sure how to author the code so that only one PackageGroup executes during uninstall.
I don't mind which one executes on uninstall, as long as exactly one does.


Does anyone have any insight into how to do this correctly?


<?xml version="1.0"?>
<?include GlobalDef.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:depends="
http://schemas.microsoft.com/wix/DependencyExtension">
    <Fragment>
        <PackageGroup Id="new_customer">
            <ExePackage
                        Id="new_customer"
                        Permanent="no"
                        PerMachine="yes"
                        SourceFile="an_installer.exe"
                        InstallCommand=''
                        UninstallCommand="/uninstall"
                        DetectCondition="AncestorFound=2"
                        InstallCondition="Install=1" >
                <ExitCode Value ="3010" Behavior="scheduleReboot" />

            </ExePackage>
        </PackageGroup>

        <PackageGroup Id="existing_customer">
            <ExePackage
                Id="existing_customer_upgrade"
                Permanent="no"
                PerMachine="yes"
                SourceFile="an_installer.exe"
                InstallCommand='/upgrade /other_upgrade_parameters_here'
                UninstallCommand="/uninstall"
                DetectCondition="AncestorFound=5"
                InstallCondition="Install=1">
                <ExitCode Value ="3010" Behavior="forceReboot" />
            </ExePackage>
        </PackageGroup>
    </Fragment>
</Wix>

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



More information about the wix-users mailing list