cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to uninstall MSI during install of another MSI ?

Hi,

I'd like to know if it's possible to create a CA which uninstall a MSI from a target computer before installing the first MSI.
It's not a nested installation but I want my first MSI to uninstall a second MSI on a target computer.
I have tried everything, but I have differents error messages:
Error, ... another install is already running
or
Error 1722, there is a problem with the package ...

Is there someone who can help me ?


Thanks
(6) Replies
Take a look at the help entry for the Upgrade table. This can be easily implemented using the by adding an entry with the upgrade code of the other MSI in the Upgrade table.
Also in the help, there is one FAQ on Using Msiexec.exe to Launch a Second Windows Installer Setup. That will point you in the right direction.
Thank you for your replies

I think that the best solution for my issue is to use upgrade code to uninstall MSI.
I tried to use Upgrade Code to uninstall another MSI but it doesn't work.
Uninstalling MSI with upgrade works if both MSI are the same ProductName, same UpgradeCode, different version ???
I d'ont know how to do
I don't remember major upgrade has anything to do with ProductName property. Major upgrade will be able to upgrade MSIs with different UpgradeCode property.

I remember seeing KB articles on major upgrade in Support. If you have not, you may want to search there.
For major upgrades:

ProductName may change.
ProductCode must change.
PackageCode must change.
UpgradeCode may change, only affects future major upgrades.

Major upgrades will always work, as long as the uninstaller for the previous version works. (And the RemoveExistingProducts and related action are in the InstallExecute sequence of the new version).