Hello Rene,
This custom action is mostly used for the following scenario: you have a feature that is installed based on a condition (e.g. a property has a specific value) and that property is set after the features have been evaluated.
In this case, we need to update the features' states so that it can reflect the new condition, e.g.:
feature_A requires PROP_A to have a value of "true"
PROP_A is not set just yet and feature_A has its' state set to "do not install" because the condition is false
we then execute a custom action that sets PROP_A to "true"
but in the above case, the feature_A will still not be installed due to the fact that it was previously set so. So we use the UpdateFeatureState custom action so that the condition is evaluated again.
In your case, there is no condition to evaluate here, so that custom action will set your features to always install.
You've set APP1 to not install "correctly" (well, not quite correctly - I'll elaborate later) via the REMOVE property. So when the custom action is executed, the feature condition for APP1 will be evaluated once again and since it has no condition attached to it, it will always think that it should be installed.
Now, why I said it's not quite correct - the
REMOVE property is mostly used for uninstall. As per MSFT documentation:
The value of the REMOVE property is a list of features delimited by commas that are to be removed.
So, instead of that, you could just use
ADDLOCAL with the features that you want installed, e.g.:
Code: Select all
setup.exe ADDLOCAL=APP2,CORE1,CORE2
Now, comming back to your "issue", that's not quite an "issue" but rather how the custom actions works.
I understand that your scenario is more complex than the sample project, but if you give me some more details I will perhaps be able to help you more here.
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging