cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Ken_Alverson
Level 4

How to condition a custom action to run if a feature is selected for install

After much searching on the internet I found someone said this would work
&featurename=3 Or (!featurename=3 And Not &featurename=2 AND NOT REMOVE="ALL" )

I put the following on my condition line, but it does not run. I am using an execute custom action in deferred system context. I don't get any install errors, but the custom action does not appear to run. ID_STRING3 is the string name of my feature - should be specified some other way?

&ID_STRING3=3 Or (!ID_STRING3=3 And Not &ID_STRING3=2 AND NOT REMOVE="ALL" )

How should I be setting up the condition to get a custom executable to run if a feature is selected on install?
Labels (1)
0 Kudos
(3) Replies
hidenori
Level 17

Make sure that you use the key name of your feature in the conditional statement, instead of the display name.

[ATTACH=CONFIG]11242[/ATTACH]
0 Kudos
JSClark
Level 6

Also, check the install log to make sure the Custom Action is indeed not running. Look for:

Doing action: xxxCustomActionName
Skipping action: xxxCustomActionName (condition is false)
0 Kudos
Ken_Alverson
Level 4

hidenori wrote:
Make sure that you use the key name of your feature in the conditional statement, instead of the display name.

[ATTACH=CONFIG]11242[/ATTACH]


Thanks, this worked for me. The action is now being called or not called based on the selection.:)
0 Kudos