I have a custom action that meant for maintenance of installation:
<Custom Action="caPostMaintenanceConfiguration" Before="InstallFinalize">Installed AND NOT WIX_UPGRADE_DETECTED</Custom>
But this action is being executed during upgrade from original MSI during its uninstall. Is it a bug in Wix infrastructure? Is there a way to have control over that?