How to detect if prevous version uninstall is triggered by RemoveExistingProducts

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to detect if prevous version uninstall is triggered by RemoveExistingProducts

TimM
I would like to know if there is a way to detect what triggered a product uninstall.

Issue: We have some custom actions that should NOT be triggered if the install is running in Upgrade mode. This is true for the upgrade install, but the custom actions in the previous version, that is being uninstalled by RemoveExistingProducts, do get triggered and therefore removes content that we do not removed on an upgrade install.

We have the custom actions conditioned on the property WIX_UPGRADE_DETECTED, the this property only gets set in the upgrade install, not the previous version that is being uninstalled.

So we need to know how the previous version is being triggered to uninstall, that it can detect, so that we can turn off the custom actions. We know if we get something that will work it would mean that it will not take affect until the current install project becomes the previous version, but at least if we get something built in now to detect this then it would work for future releases...

So if there is anything that we can detect to know that the previous version is being uninstalled by an upgrade install then this would greatly help us out...

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: How to detect if prevous version uninstall is triggered by RemoveExistingProducts

TimM
Okay I have been searching around and found the following property: UPGRADINGPRODUCTCODE

I totally forgot about this property and therefore this is the one that I should be setting my custom action conditions on.