Custom Actions Page

Add custom actions to the installation process.

ImportantThe information presented in this article can be applied in a similar fashion to Custom Actions Page from Merge Module Project.

Installation Stages

In the "Installation Sequence" pane are the installation stages. Each stage contains several standard actions and user defined custom actions.

Filters

You can filter actions depending on their execution condition by using the filters at the top: Install, Uninstall or Maintenance.

Caution!Applying filters does not guarantee the remaining visible custom actions will be executed in the selected scenario (Install, Uninstall or Maintenance). This happens because the custom action condition may evaluate to false at install-time.

Wizard Dialogs Stage

Contains the actions that are executed when displaying the user interface (if the user interface is set to full). The actions in this sequence are executed only if you haven't selected the basic type of interface (in the Install Parameters).

The action groups from this stage are:

  • Searches - Searches from the Search Page are performed.
  • Paths Resolution - Directories paths, Features and Components states are resolved. Amount of required space is computed.
  • User Selection - The installer dialogs interaction before pressing the [ Install ] button.

Install Execution Stage

Corresponds to the sequence that follows the [ Install ] button's pressing.

The action groups from this stage are:

  • Searches - Searches from the Search Page are performed.
  • Paths Resolution - Directories paths, Features and Components states are resolved. Amount of required space is computed.
  • Preparing - Verifies all volumes for sufficient space for the installation. Checks and notifies the user if any installation files are in use. You can set the deferred, rollback or commit flag for actions after this group. These are executed by Finish Execution action group. You can run them elevated by using the "with no impersonation" flags.
  • Remove Resources - All resources are removed from the target machine.
  • Add Resources - All resources are installed on the target machine.
  • Finish Execution - Executes all deferred, rollback, commit actions.

Finish Dialogs Stage

Actions from this stage are executed last in the installation after the Install Execution Stage once the progress is complete.

TipFor more related information you can follow Windows Installer Custom Actions.

Operations

Organizing Custom Actions - The custom actions from a stage will be executed in the order they appear in the list. You can drag and drop a custom action or use its right-side [ Move ] button to change the order in a stage or even move it from one stage to another.

Sharing Custom Actions - You can also share a custom action between two standard actions, provided one it is located in the Wizards Dialogs Stage and the other in the Install Execution Stage. Simply drag a custom action from one stage to the other, while pressing the Shift key. This is useful to ensure the custom action gets executed during a silent installation.

Renaming Custom Actions - You can rename a custom action by selecting the “Rename” context menu option or by pressing the F2 key, while an element from that stage is selected.

Organizing Standard Actions - The [ Move ] button reveals the actions groups with their corresponding Standard Actions after which you can move the selected standard action. This operation is available only in MSI projects.

Caution! Moving a standard action into a wrong place can break your installation. Organizing standard actions is reserved for advanced users with deep Windows Installer knowledge.

Add Custom Actions Tab

In this tab from the bottom left pane you can filter using keywords to search among available custom actions. See the selected custom action's description in the bottom text area.

Operations

Add custom action with sequence Add custom action with sequence - The sequence will be placed in a default location appropriate for the type of custom action you are inserting. You can then move it to a more refined location.

Cog Add custom action without sequence - This is useful if you wish to launch this custom action through an Execute custom action event in Dialogs page. Without any event as trigger, the custom action will never be executed.

Existing Custom Actions Tab

This tab lists all custom actions added to the project (with and without sequence). Custom actions that are executed from other custom actions already added to the project are also added here.

Set Custom Action Properties

In the right-side pane you can see all the Custom Action Properties for the one selected in the installation stage.

Toolbar Operations

New Custom Action WizardCreating a new custom action using a wizard - Use the [ New Custom Action Wizard ] toolbar button, to quickly and easily create a new custom action, following step-by-step directions.

New Attached Custom ActionAdding a custom action to be run from a file attached to the installation - Use the [ Launch attached file ] toolbar button, add it from the Add Custom Action Tab or press the Insert key while the “Installation Stages” panel is focused. An "Open File" dialog will appear and you can choose the custom action file from your disk.

New Installed Custom ActionAdding a custom action to be run from an installed file - Use the [ Launch installed file ] toolbar button, add it from the Add Custom Action Tab or press the + key while the “Installation Stages” panel is focused. An File Picker Dialog dialog will appear and it will allow you to select a file only from your project.

New Custom ActionAdding a Windows Installer custom action - To create a new Windows Installer custom action select an installation stage by clicking on it, then use the [ New Custom Action ] toolbar button or add it from the Add Custom Action Tab.

Show Standard ActionShowing Standard Actions - To show a standard action select an installation stage by clicking on it, then use the [ Show Standard Action ] toolbar button or context menu item. This operation is recommended only to advanced users so that they can condition or organize standard actions.

RemoveRemoving a custom action - Use the [ Delete ] toolbar button, the “Delete” context menu item or press the Delete key while the “Install Sequence” panel is focused.

Custom Action Return Code

A custom action's return code depends on the type of source file. Therefore, the return code of a function called from a VBScript is not the same as the one returned by an .exe or .dll file.

For more information regarding custom action return codes please see: Custom Action Return Values.

For more information regarding JScript or VBScript return codes please see: Return Values of JScript and VBScript Custom Actions.

Topics