For future reference check these cheat sheets:
I have not had the time to go through all these conditions and test them, but the latter table looks reasonable at face value. However:
I believe REMOVE
can sometimes be set during installation for example (and change) - it is very complicated to deal with all permutations of possibilities since MSI's command line interface and property configuration is so flexible.
The Installshield cheat sheet I have never actively used or checked. Please check their suggestions for repair - there are different ones depending on how the repair is invoked.
Please remember to also check self-repair - just delete the main application EXE and trigger self-repair by then invoking the application's advertised shortcut (if any). It has been years since I checked, but self-repair may only run actions between InstallInitialize and InstallFinalize.