Within the 'Upgrades' page of my project I set the order to "Uninstall old version first and then install new version".
I have a custom action that runs only when uninstalling but its actions depend on whether we're dealing with a "regular uninstall" or "replaced by a new version".
I could of course create 2 different custom actions: The first one runs only during a regular uninstall and the second one only during an uninstall of an old version being replaced by a new one. This however would create partial duplication of code that makes the maintenance more complicated.
My question is: is there a property whose value I can read within the custom action in order to be able to distinguish the mode of the uninstall?
FYI: My custom action runs AFTER the "Finish Execution" step within the "Install Execution Stage"