In order to achieve this you can add your custom action after the "Install Execution Stage -> Remove Resources" action group and set the "OLDPRODUCTS" condition for it. The [OLDPRODUCTS] property is set only if an older version of the product is already installed on the machine.
FOLLOW US
Get the latest news in Application Packaging