How to conditionally install a file or a registry

ImportantThe following article uses options that are available starting with the Enterprise edition and project type.

Sometimes you may need to install a file or a registry only when a condition is met. This can be easily done by simply adding the condition on the file/registry associated component.

Let's suppose you need to install a file/registry when a check box control is checked. Hereinafter it will be exposed a step by step procedure to achieve this.

1. Conditionally install a file

To conditionally install a file you can follow these steps:

  1. Go to "Files and Folders" page, select your file and from its context menu choose "Go To Component" option or press the [F8] shortcut key.
  2. The file associated component will be automatically selected in "Organization" page. Set the "Condition" field from "Component Properties" right pane to CHECKBOX_PROP.

2. Conditionally install a registry

To conditionally install a registry value you can follow these steps:

  1. Go to "Registry" page, select your registry value and from its context menu choose "Go To Component" option or press the [F8] shortcut key.
  2. The registry associated component will be automatically selected in "Organization" page. Set the "Condition" field from "Component Properties" right pane to CHECKBOX_PROP.