User Guide

507
Chapter 23
Custom Action Reference
While Windows Installer provides standard actions that perform most functionality you
need in an installation, occasionally you might need additional functionality not available
in standard actions. In that case, Windows Installer supports a variety of custom
actions, which let you call code from other development environments, display a
message, download a file from a Web site, launch a Web page, post information over the
Internet to your organization’s server, run another installation, set directories, set a
feature state, set properties, and more. These custom actions let you add extensive
functionality to an installation without having to write the code yourself.
This section outlines each custom action and gives hints on using it effectively. For
technical details on custom actions, see Custom Actions in the Windows Installer SDK
Help. For help using the interface, see Using MSI Script on page 486.
Call Custom DLL From Destination
This custom action calls a .DLL file that already resides on the destination computer.
Tips
! You can send a variable parameter list to the .DLL.
! The .DLL should be common to all Windows computers, such as user32.dll.
A tutorial demonstrates this custom action in the Wise for Windows Installer Getting
Started Guide.
Note
Before being passed to Windows Installer, calls you make with Call Custom DLL actions are
passed through a Wise-created .DLL, which facilitates the passing of parameters.
Usage
Double-click the custom action and complete the Details tab:
! Custom Action Name
Enter a unique name that begins with a letter or underscore. It can contain numbers
and periods. It must not match the name of any Windows Installer standard action.
See Standard Actions Reference in the Windows Installer SDK Help.
! DLL File
Specify a .DLL file that exists on the destination computer to call during installation.
Type the path to the .DLL as it will be on the destination computer, but use a
Windows Installer directory property (enclosed in brackets) to specify the beginning
of the path. You can use a predefined directory property, or a property representing a
directory you created in this installation. To see directories defined in this installation,
go to Setup Editor > Tables tab and click the Directories table.
Example: this specifies a .DLL in the System32 directory:
[SystemFolder]user32.dll