Custom Action Types
Project:This information applies to the following project types:
• | Basic MSI |
• | DIM |
• | InstallScript MSI |
• | Merge Module |
• | MSI Database |
• | MSM Database |
• | Transform |
Note that some custom action types are not available in some project types. Project-specific differences are noted where appropriate.
InstallShield includes support for several kinds of custom actions:
Icon |
Action Type |
Project Type |
Custom Action Behavior |
|
InstallScript |
Basic MSI, InstallScript MSI, Merge Module |
Run InstallScript code. |
|
EXE |
Basic MSI, DIM, InstallScript MSI, Merge Module, MSI Database, MSM Database, Transform |
Launch an executable file. |
|
Standard DLL |
Basic MSI, InstallScript MSI |
Call a function in a standard DLL. |
|
MSI DLL |
Basic MSI, DIM, InstallScript MSI, Merge Module, MSI Database, MSM Database, Transform |
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. |
|
Managed Code |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Call a public method in a managed assembly that is written in managed code such as Visual Basic .NET or C#. For more information, see Calling a Public Method in a Managed Assembly. |
|
Set Property |
Basic MSI, DIM, InstallScript MSI, Merge Module, MSI Database, MSM Database, Transform |
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 Directory |
Basic MSI, DIM, InstallScript MSI, Merge Module, MSI Database, MSM Database, Transform |
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. |
|
Nested MSI |
Basic MSI, InstallScript MSI, MSI Database, Transform |
Launch another .msi package. This is also known as a nested installation. Important: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 in the Windows Installer Help Library. |
|
VBScript |
Basic MSI, DIM, InstallScript MSI, Merge Module, MSI Database, MSM Database, Transform |
Run 32-bit or 64-bit VBScript code. |
|
JScript |
Basic MSI, DIM, InstallScript MSI, Merge Module, MSI Database, MSM Database, Transform |
Run 32-bit or 64-bit JScript code. |
|
Error |
Basic MSI, DIM, InstallScript MSI, Merge Module, MSI Database, MSM Database, Transform |
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. |
|
Kill Process |
Basic MSI, InstallScript MSI, Transform |
Terminate a process at run time. For more information, see Calling a Kill-Process Custom Action. |
|
PowerShell |
Basic MSI, InstallScript MSI |
Run a PowerShell script to perform system configuration tasks at installation run time. For target , as well as other information about this type of custom action, see Calling a PowerShell Custom Action. |
|
WiseScript |
Basic MSI |
Edition:This custom action type is available in the version of InstallShield that is included in certain editions of AdminStudio. Runs a WiseScript executable file. This type of action includes a wrapper MSI DLL that gets and sets Windows Installer properties and evaluates Windows Installer conditions. |
To help you differentiate between immediate, deferred, commit, and rollback custom actions in your project, InstallShield adds color-coded dots to some of the action’s icons. The dots are displayed on the icons for actions that are listed under the Custom Actions explorer in the Custom Actions and Sequences view or the Custom Actions view. The following table shows the icon for the executable file custom action.
Icon |
Description |
|||||||||
|
If a custom action does not have a dot, it indicates that the In-Script Execution setting is not applicable to that type of custom action, or one of the following values is selected:
|
|||||||||
|
If a custom action has a blue dot, one of the following values is selected for the action’s In-Script Execution setting:
|
|||||||||
|
If a custom action has a green dot, one of the following values is selected for the action’s In-Script Execution setting:
|
|||||||||
|
If a custom action has a red dot, one of the following values is selected for the action’s In-Script Execution setting:
|
For details about each of the InstallShield custom actions that are added automatically to InstallShield projects to support different functionality, see InstallShield Custom Action Reference.
Windows Logo Guideline:If you are applying for the Windows logo, any custom actions in your installation must follow best practices guidelines for custom action creation. You can use the InstallShield validation suites and the Full MSI Validation Suite to verify whether your installation package meets most of the custom action–related logo requirements. However, some of the requirements cannot be verified through the validation suite. To learn more, see Guidelines for Creating Custom Actions that Meet Requirements of the Windows Logo Program.