-
Hello, I have a situation where we allow the user to have different versions of our Product installed in the same computer. If the user tries to install a new msi selecting a path that is already being used, we need to uninstall the specific version that is there, before we install the new one. I have tried a Custom Action where I find the Product Code of the version that is already in that path and try to uninstall it, but I get an error because there is an installation in progress, the one I just started. Is there any other approach to this issue that you can suggest? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
MSI has a mutex that prevents one msi from calling another msi in certain circumstances. This is one of them. The best you could do author a major upgrade rule that doesn't find any then use the custom action to put the product code into the property the major upgrade is using. This way RemoveExistingProducts should do the uninstall for you. Have you just considered just blocking the install and saying path already in use please pick another location? |
Beta Was this translation helpful? Give feedback.
-
Hello, Note: |
Beta Was this translation helpful? Give feedback.
Hello,
An update on this issue.
I was finally able to get it to work. Using a C# DLL that read a file that contained the Product Code and assign it to the Property I used in the Upgrade. I ran the CA after the “FindRelatedProducts” and before the “RemoveExistingProducts”. Everything worked as expected.
Thank you.
Note:
I tried to do it first by using the RegistrySearch or FileSearch to update the property, but the order where the property is populated was never good. If someone reading this has a similar issue. Don't waste days like I did. Use the CA with a C# DLL. It is super easy to implement. The HeatWave C# Custom Action Project does 75% of the work for you.