I have following CustomAction:
<CustomAction Id="ActionName"
After="InstallFinalize">
<![CDATA[NOT Installed AND (VSTORUNTIME4="#1")]]>
</CustomAction>
The problem is that there is a case in CustomAction when I return ActionResult.Failure. In this case installer will show error message and say that installation failed, but application is still partially installed (files are already in Program Files and application shows up in Uninstall programs).
I want that if I return ActionResult.Failure then installation will be aborted and uninstalled. This is what happens if custom action fails in default Visual Studio installer and I think it makes more sense.
Does anybody know how to trigger uninstall if Custom Action failed? Do I need to add something extra to WiX XML?