[wix-users] Custom action only on product uninstall

Joel Budreau joel.budreau at gmail.com
Sat Jul 8 11:37:36 PDT 2017


You might want to look into using the UPGRADINGPRODUCTCODE property instead
of WIX_UPGRADE_DETECTED.

On Fri, Jul 7, 2017 at 6:28 AM, Oscar Acosta <oscaracos at yahoo.com> wrote:

> 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
> http://www.firegiant.com/



More information about the wix-users mailing list