Skip to main content

Custom Actions

The Custom Actions view displays all custom actions in the MSI package.

Custom actions let you run scripts or executables during installation and uninstallation when standard MSI tables are not enough.

Master Packager Advanced Editor - Custom Actions view

Action groups

Master Packager supports two groups of actions:

  • Custom Actions — actions you build for a specific automation scenario.
  • Predefined Actions — standardized actions created by the Master Packager team for common tasks that are not covered by standard MSI tables.

Core fields

FieldDescription
NameSets the custom action name. Use a unique, descriptive name so the purpose is easy to identify.
TypeSets the custom action type and where the action source is stored.
Execution OptionsDefines when the action runs and under which security context.
Return ProcessingDefines how the installer handles the action result.
Scheduling OptionsDetermines how often the action runs and where it fits in the sequence.

Supported custom action types

TypeAvailable sources or subtypes
JScriptIn Binary Table
In File Table
In CustomAction Table
In path of Property
VBScriptIn Binary Table
In File Table
In CustomAction Table
In path of Property
DLLIn Binary Table
In File Table
EXEIn Binary Table
In File Table
On Target PC
In path of Property
MSI InternalDisplay Error Message
Set Directory
Set Property

Execution options

OptionDescription
ImmediateRuns immediately when the installer processes the action.
Deferred UserRuns later during the execution phase under the user context.
Rollback UserRuns during rollback under the user context.
Commit UserRuns at the end of installation if everything succeeded, under the user context.
Deferred SystemRuns later during the execution phase under the system context with elevated privileges.
Rollback SystemRuns during rollback under the system context.
Commit SystemRuns at the end of installation if everything succeeded, under the system context.
Deferred TSAwareRuns during the execution phase as a Terminal Server-aware action.
Rollback TSAwareRuns during rollback as a Terminal Server-aware action.
Commit TSAwareRuns during the commit phase as a Terminal Server-aware action.

Return processing

OptionDescription
Synchronous, waits for exit codeRuns the action, waits for it to finish, and checks the exit code.
Synchronous, ignore exit codeRuns the action, waits for it to finish, and ignores the result.
Asynchronous, waits for exit codeStarts the action, continues processing, and later waits for completion and checks the result.
Asynchronous, ignore exit codeStarts the action and continues immediately without waiting or checking the result.
tip

For critical tasks, use a synchronous option so the installer can handle failures correctly.

Scheduling options

OptionDescription
AlwaysExecutes every time the action is encountered.
Execute first timeRuns only during the initial install, not during repairs or reinstalls.
Execute once per processRuns only once even if it is referenced multiple times in the sequence.
Execute only after UI sequenceDelays execution until after the user interface sequence is complete.
note

Proper scheduling helps custom actions run in the correct context and avoids unintended repeated execution.

Predefined actions

Standardized actions created by the Master Packager team for common tasks that cannot be performed by using standard MSI tables.

See the full list in the Predefined Custom Actions section.