Wise Installation Studio/Express Getting Started Guide
41
Advanced Tutorial: Using MSI Script in a Windows Installer Installation
9. In Processing, select Asynch, No wait, which makes the installation continue
after opening Notepad.
10. Click OK on the Execute Program From Destination dialog box.
The action is added to the sequence immediately after the InstallFiles statement. In
the next steps, you enclose the action in an If Statement, which sets a condition on
the action—the action runs only if the condition is true.
11. Above the Execute Program From Destination action, add an If Statement action. In
If Condition, enter: NOT Installed.
12. Click OK.
13. Below the Execute Program From Destination action, add an End Statement.
The If Statement, custom action, and End Statement, which are located between
InstallFiles and PatchFiles, should look like the image below. If not, double-click the
actions to edit their settings or use
to rearrange the lines.
To test the custom action:
1. Save the installation.
2. Compile the installation by clicking Compile at the lower right of the main window.
3. To run the installation, click the Run button, select Uninstall ---> Install from the
button menu, and when prompted, select QuickFacts.msi.
4. In the installation wizard, click Next until the installation of files begins.
Because of the custom action you added earlier in this tutorial, a dialog box displays
the value of INSTALLDIR during installation.
After the installation of files, Notepad should appear and display the readme.txt file.
If this does not work, check the order of the custom action. It must occur after the
InstallFiles action, or it will not work. Also make sure it is in the Execute Deferred
sequence and that all fields are entered correctly.
This completes the tutorial. The next section describes some of the advanced tasks you
can perform in Setup Editor.
Performing Advanced Tasks
As you learned from the Basic and Advanced Tutorials, you can easily build complete
Windows Installer installations without using Setup Editor. If you are developing
complex installations, however, you might need to perform fine-tuning or advanced
tasks in Setup Editor.
To access Setup Editor, click Setup Editor at the lower left of the window. In Setup Editor,
you can: