Jon
Posts: 42
Joined: Tue Jan 14, 2014 4:26 pm

specify previous versions to uninstall?

Our installer allows side-by-side installation for different versions. I'm testing using the UpgradeDlg to let user select whether they want to uninstall previous versions or allow side-by-side installation. I'd like to know if it is possible to customize this feature to uninstall only the last version - NOT ALL previous versions of the software.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: specify previous versions to uninstall?

Hello,

I'm afraid you cannot achieve this using the "UpgradeDlg" predefined dialog. In order to achieve what you want you can create your own dialog which will get the user selection and, then based on the user selection you should write your own custom action which will iterate by UpgradeCode all ProductCodes of the previous versions of your product and will uninstall only a certain ProductCode. Please take a look on the "MsiEnumRelatedProducts function" and "Msiexec" articles which could be useful for you.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jon
Posts: 42
Joined: Tue Jan 14, 2014 4:26 pm

Re: specify previous versions to uninstall?

Thanks for the info! Since we know the Product Code of the version to uninstall, this can be easily done by creating a Custom Action.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: specify previous versions to uninstall?

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”