Uninstall package while installing an other
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?
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
Answers (4)
Please log in to answer
Posted by:
rpfenninger
17 years ago
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
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
Posted by:
MARIN
17 years ago
Posted by:
nheim
17 years ago
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
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
Posted by:
YRKUMAR
17 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.