Wise Installation Studio/Express Getting Started Guide
38
Advanced Tutorial: Using MSI Script in a Windows Installer Installation
8. Click OK on the Set Directory dialog box.
The action is added to the sequence, immediately after the Welcome_Dialog If
block. In the next steps, you enclose this action in an If Statement, which sets a
condition on the action—the action runs only if the condition is true.
9. Make sure the Set Directory custom action you just created is selected. In the
Actions list, double click If Statement.
The If Settings dialog box appears.
10. In If Condition, specify two conditions joined by “AND”. Enter the following (case-
sensitive) and click OK:
COMMONDIR AND NOT Installed
The first condition checks the COMMONDIR property you attached to the Put
installation under the Common Files folder check box, which is true if the end
user marks it during installation. The second condition checks a built-in Windows
Installer property, named Installed, which is true only if this is the initial installation
of the product, not a reinstall or maintenance installation.
11. Place an End Statement below the Set Directory custom action.
The If Statement, custom action, and End Statement should look like the image
below. If not, double-click the actions to edit their settings or use
to
rearrange the lines.