Microsoft enables you to add flexibility to your installation that is not directly supported by Windows Installer. This additional functionality is achieved through the use of custom actions. InstallShield includes support for several kinds of custom actions:

Icon | Custom Action Behavior
--- | ---
| Run InstallScript code.
| Launch an executable file.
| Call a function in a standard DLL. This type of custom action is not available for merge module projects.
| Call a function in a DLL that was written specifically for Windows Installer. The entry point of the .dll file must have a predefined parameter and return value.
| Set a property in the Property table. This is useful if you need to get information from the end user and store it so that it can be used later in your installation.
| Set a directory in the Directory table at run time. For example, if you want to create a temp directory that is a subdirectory of the installation directory selected by the end user, you can use this option to set that new temp directory for use later in the installation.
| Launch another .msi package. This is also known as a nested installation. Nested installations is a deprecated feature of the Windows Installer. Applications installed with nested installations sometimes fail because they are difficult for end users to service correctly. Microsoft Corporation recommends that you avoid using nested installations and nested-installation custom actions to install products that are intended to be released to the public. To learn more, see Concurrent Installations on the MSDN Web site. This type of custom action is not available for merge module projects.
| Run VBScript code.
| Run 64-bit VBScript code.
| Run JScript code.
| Run 64-bit JScript code.
| Display a specified error message, return failure, and end the installation. For example, you may want to add an error custom action to your project to handle scenarios where an end user tries to install the current version of your product over a future major version. For more information, see "Preventing the Current Installation from Overwriting a Future Major Version of the Same Product" in the InstallShield Help Library.

## Creating a Custom Action

The recommended way to create a custom action is by using the Custom Action Wizard. To launch the Custom Action Wizard, right-click the Custom Actions explorer and click Custom Action Wizard.

You can also create a custom action directly from this view by right-clicking the Custom Actions explorer and clicking the appropriate type of custom action.

- To show all existing custom actions associated with your project in this view, including the built-in InstallShield custom actions that are added automatically to InstallShield projects to support different functionality, right-click the Custom Actions explorer and click Show All Custom Actions.
- Basic MSI projects include the custom action ISPrint, which is used by the LicenseAgreement dialog's Print button. To learn more, see "Adding a Print Button to a Dialog" in the InstallShield Help Library.