This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to condition a custom action to run if a feature is selected for install
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2016
09:45 AM
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?
&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?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 17, 2016
08:37 AM
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)
Doing action: xxxCustomActionName
Skipping action: xxxCustomActionName (condition is false)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 17, 2016
10:28 AM
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.:)