Uninstall app with the same version number - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Uninstall app with the same version number

Hi Gurus

We install an .msi program, with “Limit to basic user interface” checked. Custom Actions has the UninstallPreviousVersions under "InstallUISequence" -> "Begin" sequence. There are times when we have two installs with the same version number but the actual programs being installed are different. We would like the old version to always be uninstalled. It does not matter what the version number is, we would like to uninstall any/all versions. Everything works fine except in the case where the version number is the same. If there is a new product code the old version is not uninstalled. If you look in add/remove programs it shows two versions of our application. If the version is the same and the product code is the same, there is a dialog, “Another version of this product is already installed. Installation of this version cannot continue…..” We would like to uninstall the application even if the version number is the same. How can we always uninstall the currently installed version?

Thanks
Bob


Advanced Installer 7.3.1
Windows XP Professional
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Uninstall app with the same version number

Hi Bob,

I strongly advise against two versions of your product having the same version number. It prevents the proper functioning of the update process.

However, should you need to have two equal version numbers yet enable them to remove each other, you can do the following:
- go to the Upgrades page
- check "Customize Advanced Installer upgrade rules"
- from the list, find the line with "OLDPRODUCTS" in the Property and double click it
- tick the "Include maximum version in range" checkbox.
Make sure both your projects have this setting enabled, then rebuild them.
Note that they must have different Product Codes but the same Upgrade Code. You can make sure this is true by going to Project->Options->Project IDs.
They should now be able to remove each other.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”