I am using the recommended way to upgrade (Use Upgrade and UpgradeVersion to detect the old version of the product and use RemoveExistingProducts after InstallInitialize
The thing is, during uninstall of the existing product, I need to pass additional properties to installer for preserving existing database. Is there a way to do that?
All a product being removed via RemoveExistingProducts receives is a single extra property UPGRADINGPRODUCTCODE. This property is set to match the ProductCode of the installer which is removing this other product. If you had a condition against this in the installer being removed, it can act accordingly. If not, you will need to make your UpgradeVersion OnlyDetect and block until it’s gone, invoke its removal manually, or similar workarounds.