Custom Actions Page
Add custom actions to the installation process.
The 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.
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 button.
Install Execution Stage
Corresponds to the sequence that follows the
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.
For 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
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 Standard Actions after which you can move the selected standard action. This operation is available only in MSI projects.
button reveals the actions groups with their correspondingMoving 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 - 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.
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
Creating a new custom action using a wizard - Use the
toolbar button, to quickly and easily create a new custom action, following step-by-step directions.Adding a custom action to be run from a file attached to the installation - Use 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.
toolbar button, add it from the Add Custom Action Tab or press theAdding a custom action to be run from an installed file - Use 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.
toolbar button, add it from the Add Custom Action Tab or press theAdding a Windows Installer custom action - To create a new Windows Installer custom action select an installation stage by clicking on it, then use the
toolbar button or add it from the Add Custom Action Tab.Showing Standard Actions - To show a standard action select an installation stage by clicking on it, then use the
toolbar button or context menu item. This operation is recommended only to advanced users so that they can condition or organize standard actions.Removing a custom action - Use the Delete key while the “Install Sequence” panel is focused.
toolbar button, the “Delete” context menu item or press theCustom 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
- Custom Action Properties
Setting a Custom Action's properties in Advanced Installer. - Custom Actions List
Description of all predefined custom actions available in Advanced Installer.