oz1cz
Posts: 17
Joined: Thu Oct 01, 2009 10:49 am

Uninstalling based on UpgradeCode

The AI How To's explain how to uninstall a package by passing its ProductCode to msiexec.

But what if I don't know which version of the other package is installed? I can easily search for another package based on its UpgradeCode rather than its ProductCode, but is there any way to convert the UpgradeCode to the current ProductCode so that I get the parameter to pass to msiexec?

--
Claus
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Uninstalling based on UpgradeCode

Hi Claus,

Do you need to uninstall another MSI when installing your package? If so, the User Guide contains the Upgrade an older version of the package how-to which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oz1cz
Posts: 17
Joined: Thu Oct 01, 2009 10:49 am

Re: Uninstalling based on UpgradeCode

No, I need to uninstall another package as part of unininstalling my package.

--
Claus
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Uninstalling based on UpgradeCode

Hi Claus,

I'm afraid that there isn't an easy way of getting the ProductCode when you have only the UpgradeCode. You can try using the Windows Installer API to enumerate the all MSI-based products and see which of them has the UpgradeCode you want.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oz1cz
Posts: 17
Joined: Thu Oct 01, 2009 10:49 am

Re: Uninstalling based on UpgradeCode

Okay. Thanks, Cosmin.

--
Claus
janisito
Posts: 86
Joined: Thu Apr 09, 2015 6:28 am

Re: Uninstalling based on UpgradeCode

Hi,

Has this feature been added to AI yet? I know Installshield has this functionality.

Regards
Jan
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstalling based on UpgradeCode

Hi Jan,

Can you please give us more details about what you want to achieve? If you want to uninstall a product based on its Upgrade Code, you can simply go to the "Upgrades" page, use the "New Upgrade" button and add the Upgrade Code to the dialog that appears.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janisito
Posts: 86
Joined: Thu Apr 09, 2015 6:28 am

Re: Uninstalling based on UpgradeCode

Hi,

I tried using this feature. It didn't work. Maybe I'm missing something? Nothing was removed.
1.png
1.png (48.99 KiB) Viewed 10849 times
My scenario is the following: In the past we used a different installer which installed 6 different msi packages. I want these all removed before my new installer installs everything. The new installer has a totally different upgrade code and only one, instead of 6 like in the past.

It seems the uninstall isn't triggered. Is there something more I need to do to force the uninstall?

Thank you,

Regards
Jan
janisito
Posts: 86
Joined: Thu Apr 09, 2015 6:28 am

Re: Uninstalling based on UpgradeCode

Actually, it removes all but one package. The last one however is an .exe so I wasn't able to add it using its msi-package to the list of upgrade codes in AI. Instead I manually entered its upgrade code. Should it be possible to remove a package if you only has its upgrade code but not the msi pacakge itself?
janisito
Posts: 86
Joined: Thu Apr 09, 2015 6:28 am

Re: Uninstalling based on UpgradeCode

Also, at what stage of the installation process will the uninstallation happen? Is it possible to select at what stage this happen?
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstalling based on UpgradeCode

Hi Jan,

If that EXE is just a wrapper over an MSI package and it has an Upgrade Code, it should be correctly uninstalled if you add its Upgrade Code manually into that list.

The uninstallation happens on the install stage and it is done by the "Preparing -> RemoveExistingProducts" standard action. I'm afraid that its sequence cannot be changed.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janisito
Posts: 86
Joined: Thu Apr 09, 2015 6:28 am

Re: Uninstalling based on UpgradeCode

Hi Eusebiu,

Yep, a wrapper. It eventually worked. I had to remove and reenter the upgrade code again. Not sure why. Thanks again for your help.

Regards
Jan
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstalling based on UpgradeCode

You're welcome Jan. I'm glad you got this working.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”