[wix-users] Custom action only on product uninstall

Oscar Acosta oscaracos at yahoo.com
Fri Jul 7 06:28:11 PDT 2017


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



More information about the wix-users mailing list