[wix-users] [EXTERNAL] - Custom action only on product uninstall

Lewis Henderson henderso at opentext.com
Fri Jul 7 06:45:30 PDT 2017


Hi Oscar,

Have you tried writing the condition as <![CDATA[(NOT WIX_UPGRADE_DETECTED) AND REMOVE~="ALL"]]>?  The parentheses makes the logic unambiguous.  Also, should it be REMOVE~="ALL" or REMOVE="ALL"?

				Lewis

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Oscar Acosta
Sent: Friday, July 7, 2017 9:28 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [EXTERNAL] - [wix-users] Custom action only on product uninstall

Hello.
During installation, I have a custom action to add a new file to install directory. As this file is unknown to the installer, I have placed a custom action to delete it manually only on uninstall. But the custom action is running on upgrades too, deleting the file. Somehow is ignoring the condition to for not running on upgrades.
I have:
<MajorUpgrade Schedule="afterInstallFinalize" AllowDowngrades="no" DowngradeErrorMessage="Ya está instalada una versión más reciente de [ProductName] en el equipo. La instalación terminará ahora."/>

<CustomAction Id="CleanupConfigIni" Directory="INSTALLFOLDER" ExeCommand="cmd /C "del CONFIG.INI & exit"" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />

 <InstallExecuteSequence>      <Custom Action="CleanupConfigIni" After="RemoveFiles"><![CDATA[NOT WIX_UPGRADE_DETECTED AND REMOVE~="ALL"]]></Custom></InstallExecuteSequence>
Any help will be appreciated.
Kind regards.Oscar Acosta


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DwIGaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=Ak7LZh1hYT_MsoFWR-52fT3jh28GJe-TAGmH0cWDwpA&s=SLggDnMhYh2bIbpKMP7PJAlOAT0dvBQq6UvZkrk8P9U&e= 


More information about the wix-users mailing list