How to create a condition that only executes an .exe if a certain component is installed?

Article:HOWTO5192  |  Created: 2006-09-26  |  Updated: 2007-09-18  |  Article URL
Article Type
How To

How do I create a condition that only executes an .exe if a certain component is installed?


The following steps will allow you to create a condition that only runs an .exe if a specific component is installed. From the MSI Script > Execute Immediate section (this may vary depending the location of your Custom Action):

  1. Add an IF Statement before the custom action that calls the .exe.
  2. The IF Statement Settings dialog appears. Click the Build button.
  3. The Condition Builder dialog appears. In the Fields column, select the Component folder under Objects.
  4. Select the Component Name that contains the .exe and Action under the State column. Then, click the Paste button for the component name to appear in the upper white field which is called the condition field.
  5. Click the equal sign button to add an = sign after the Component name in the Condition field.
  6. Then, click Local to appear after the equal sign in the Condition field.
  7. Click OK and the dialog returns to the If Settings Dialog. The results of the condition builder should be as follows= Result $<Name of Component>= 3.
  8. Click OK and then add an End Statement after the custom action.

Legacy ID


Article URL

Terms of use for this information are found in Legal Notices