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

Uninstall previous versions custom action

Wed Dec 03, 2008 10:23 pm

Hi,

I just downloaded AI 6.7. I see there is an uninstall previous versions custom action, UninstallPreviousVersions. This is just what we need; the new installation of our product should uninstall the previous version. I can create the custom action, but I don’t see how to call the custom action. It needs to be called at the very start, before it is decided to modify/remove the previous version. How do you call UninstallPreviousVersions? The PrepareDlg does not allow adding actions. If I right click on “InstallExecuteSequence” the “uninstall previous versions is grayed out. What’s the trick?

Thanks
Bob

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

Re: Uninstall previous versions custom action

Thu Dec 04, 2008 12:28 pm

Hi Bob,
It needs to be called at the very start, before it is decided to modify/remove the previous version. How do you call UninstallPreviousVersions?
In order to run this custom action you simply add it in the Custom Actions page. You can schedule it under "InstallUISequence" -> "Begin" to make sure that it runs at the beginning of the installation. Please note that you can show the "Begin" standard action by using the "Show Standard Action" button on the toolbar of the "Custom Actions" page.

This standard action was designed to uninstall the previous versions of a product which used a different installation type (per-user or per-machine). Therefore, it uses the UpgradeCode property to find the old versions (it will uninstall the versions which have the same UpgradeCode as your package). Please note that this custom action cannot uninstall older versions which use different Upgrade Codes.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

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

Re: Uninstall previous versions custom action

Thu Dec 04, 2008 6:24 pm

It works great, thanks Cosmin.

I always forget about the "Show Standard Action"!

Thank You,
Bob

Return to “Common Problems”