When installing a MSI package it needs to uninstall an other package.

I created a custom action for uninstalling the package and while running the msi it shows me the message it wants to remove the software, but shortly after that it returns the error another applicatio is already running.

how can i uninstall a package while installing another?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hi Marin,

Use the Upgrade table for those tasks.
It is the best if you have the same UpgradeCode within the two packages. Then you can use the VersionMin and VersionMax columns to let Windows Installer detect and remove older packages.

However, if it is a completely different package you want to uninstall during install of a new package, put the UpgradeCode of the application you want to have uninstalled, in the UpgradeCode column of the new package. Fill the ProductCode of the old application in the ActionProperty column and set Attributes to 4, this ignores errors during uninstallation.

Of course this method only works if the old application has been installed as an .msi as well.

Hope this helps

Cheers

Roland
Answered 10/18/2006 by: rpfenninger
Second Degree Green Belt

Please log in to comment
0
Hi Roland,

The 2 packages have to same productcode and upgrade code.
Any idea how to set this into the tables?
Answered 10/18/2006 by: MARIN
Orange Senior Belt

Please log in to comment
0
Hi Dennis,
this should work too. It's intended to work in such a case.
There are 2 other things to get an eye on:
1. You need to add the property you choose in the 'ActionProperty' column, to the property 'SecureCustomProperties' in the property table.
2. Make sure 'RemoveExistingProducts' is called in the 'InstallExecuteSequence' table, before the MSI-Script is executed. A safe way would be to place it right before 'InstallValidate'.

To Roland,
if i read the documentation of the ActionProperty on SDK right, your suggestion with the "ProductCode of the old application in the ActionProperty" is not going to work.
From the SDK:
-------------------
ActionProperty
When the FindRelatedProducts action detects a related product installed on the system, it appends the product code to the property specified in this field. The property specified in this column must be a public property and the package author must add the property to the SecureCustomProperties property. Each row in the Upgrade table must have a unique ActionProperty value. After FindRelatedProducts, the value of this property is a list product codes, separated by semicolons (;), detected on the system.
------------------------

Regards, Nick
Answered 10/18/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Thanks to "nheim". The below advise worked perfectly for me.

Make sure 'RemoveExistingProducts' is called in the 'InstallExecuteSequence' table, before the MSI-Script is executed. A safe way would be to place it right before 'InstallValidate'.

Thanks
Answered 10/27/2006 by: YRKUMAR
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity