Be aware that during an upgrade the first Sequence Steps are from the new version. At a certain point, the sequence is transferred to the old version MSI for the uninstall. After that the sequence is transferred back to the new version for the install.
Predefined Execution Condition: Test if it is the first installation: Not Installed
- At the CostFinalize step of the new version during an upgrade, the Installed property is empty.
So your action could unexpectedly run during an upgrade.
- When you uninstall by double clicking the MSI, choosing "Remove", the REMOVE property has the value "MainFeature" at the "Begin" step of the Install Sequence.
Your action could fail to run, even when an uninstall is in progress. This happens because the value of the property REMOVE is set to "ALL" after the standard action "InstallValidate" and not from the first moment you start the MSI.
- When you uninstall by double clicking the MSI, choosing "Remove", the REMOVE property has the value "MainFeature" at the "Begin" step of the Install Sequence.
Your action could fail to run if the application is uninstalled when you attach your Custom Action to an Install Sequence step too early in the sequence. This happens because the value of the property REMOVE is set to "ALL" after the standard action "InstallValidate" and not from the first moment you start the MSI.
Edited after support made things more clear.
Thanks Bogdan and Cosmin for your support in this complex matter.
FOLLOW US
Get the latest news in Application Packaging