Hello,
In this case, you may need to uninstall the old version manually before installing the upgraded version. For this, you can use the predefined
Uninstall previous versions custom action.
It is recommended to schedule this custom action before "Wizard Dialogs Stage" -> "Paths Resolution". This way it will run right before the installation starts.
Please let me know if that helped.
Best regards,
Dan