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

Uninstalling another product prior to installation

I need to install product X, but before I do so, I need to check if product Y is installed. If so, I must uninstall Y before installing X.

I try to do this by having a custom action in the InstallExecuteSequence. Here I test for the existence of product Y, and if found, I call msiexec /x {Y's product code}.

The problem is that, as far as I can see, I cannot execute msiexec while another installation is running. But I cannot postpone the unistallation, because it is important that Y be uninstalled before any files from X are installed.

How can I do this?

--
Claus
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Uninstalling another product prior to installation

Hello,

You can try placing the upgrade code of your product on the Upgrades Page in Advanced Installer. This will automatically uninstall the old product before installing the new one. Alternatively you could place your custom action under InstallUISequence instead of InstallExecuteSequence.

Please let me know if you need further help.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
oz1cz
Posts: 17
Joined: Thu Oct 01, 2009 10:49 am

Re: Uninstalling another product prior to installation

I never thought about using the upgrade code of another product. That works very nicely!

Thank you, Gabriel.

--
Claus

Return to “Common Problems”