Wise Installation Studio/Express Getting Started Guide
32
Advanced Tutorial: Using MSI Script in a Windows Installer Installation
Note
The property INSTALLDIR stores the default installation directory. It defaults to the first
directory you create in the installation. You can see it in the Default Directory field in
Installation Expert > Product Details page. During installation, the end user can change
the value of INSTALLDIR on the Single Feature Destination dialog box.
To call a .DLL during installation
1. In Windows Installer Editor, open QuickFacts Installer.wsi, which you created during
the basic tutorial.
It may already be open if you are continuing from the basic tutorial.
2. Click MSI Script at the lower left of the Windows Installer Editor window.
MSI Script™ contains the sequences of actions that make up an installation.
3. Make sure Normal Installation is selected in the Installation Mode drop-down
list.
Normal Installation refers to a regular installation or uninstallation of the product.
4. Click the Execute Immediate tab at the bottom of the Installation Sequence pane.
You will add the action to the Execute Immediate sequence immediately before the
installation of files begins.
5. Locate the InstallFiles action in the Execute Immediate script:
a. Press Ctrl+F to open the Find dialog box.
b. In the Find dialog box, enter InstallFiles in the Find What field and make sure
Normal Installation is selected in the In What drop-down list.
c.
Click Find Next.
d. Click Cancel after the InstallFiles action is found.
6. Select the REM statement above the InstallFiles action.
When you add a new action, it always appears above the line that is selected in the
right pane.
7. In the Actions list, double-click Call Custom DLL from Destination.
Call Custom DLL actions let you send parameters while Call DLL actions do not.
The Call Custom DLL From Destination dialog box appears.
Note
Although this tutorial guides you through calling a particular Windows .DLL function,
it is not the purpose of this tutorial to teach you about .DLLs. Consult Windows
developer documentation or other documentation to learn more about calling
system .DLLs or the MessageBoxA API.
8. Click the Details tab and complete the dialog box:
Note
This tutorial does not explain all the options available on this dialog box. Press F1 on
the dialog box for details on all options.