I'm building an installer for a product that previously used an installer created by a Visual Studio Setup Project. I've made a brand new AI installer for a new major upgrade v2.1.0. The installer itself is working, but I'm struggling to get the correct upgrade behaviour when the previous version (v1.1.12) of my app is installed.
What I've tried:
Attempt 1
- Setting the UpgradeCode the same as the old installer's UpgradeCode in "Product Details"
- Setting a brand new ProductCode
Attempt 2
- Setting a brand new main UpgradeCode in "Product Details", but adding the old installer's UpgradeCode in "Upgrades"
- Setting a brand new ProductCode
In both these cases, the new app gets installed alongside the old app and uninstallation does not occur.
Attempt 3
- Setting the UpgradeCode the same as the old installer's UpgradeCode in "Product Details"
- Setting the ProductCode the same as the old installer's ProductCode in "Product Details"
Attempt 4
- Setting a brand new main UpgradeCode in "Product Details", but adding the old installer's UpgradeCode in "Upgrades"
- Setting the ProductCode the same as the old installer's UpgradeCode in "Product Details"
In both these cases, if I run the new installer from within AdvancedInstaller, the previous version gets uninstalled before the installer begins, leading me to believe it was correct behaviour! However, when I now run the build .exe from the SetupFiles directory directly, I get the error "Another version of this product is already installed.". I do not understand why the behaviour is different. I've also tried running the .exe as Administrator in case there was a difference in permissions, but this gives the same error.
From my understanding of ProductCodes, "Attempts 1/2" should be the correct approach, since different versions of the same app are identified by UpgradeCode and should have different ProductCodes. However, I've not been able to get this working at all. Is there something special I need to do to deal with the case where the previous version of the app was installed with a different installer?
Any pointers much appreciated!