Windows Installer Editor Reference
513
Custom Action Reference
Usage
Double-click the custom action and complete the Details tab:
z
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
z
64-bit
Mark this if you are calling a 64-bit .DLL from a 64-bit installation.
z
Function Name
Type the name of the function within the .DLL file to call.
z
Parameter List
In the parameter list, specify the parameters to send to the .DLL.
z
Return Value Type
Select the data type of the return value that is returned from the .DLL.
z
Returned Property
Type or select a property name. The return value of the function call will be put into
this property.
In the Execute Immediate or User Interface sequences only, you can send Windows
Installer properties to the .DLL function as parameters.
See
Configuring .DLL Parameter Settings
on page 515.
See also:
Guidelines for Calling .DLLs
on page 508
Guidelines for Custom Action Location
on page 505
Using the Custom Action Properties Tab
on page 542
Using the Custom Action Location Tab
on page 539
Call Custom DLL From Installation
This custom action stores a .DLL file in the Binary table of this installation file and calls it
during installation. Use this to call a .DLL that does not reside on the destination
computer. During installation, the .DLL is extracted to a temporary directory, is called,
and is deleted. It is not registered.
Tips
z
You can send a variable parameter list to the .DLL.
z
Because .DLLs are processor-specific, the .DLL that you call must target the same
platform (32-bit, x64, or 64-bit Itanium) as the installation. In a mixed-target
project file (.WSI), condition each Call Custom .DLL custom action for the
appropriate platform. Example: Your .WSI contains a 32-bit release, an x64 release,
and an Itanium release. You add three Call Custom .DLL actions to the project: one