Custom Actions

Custom Actions view shows all Custom Actions that are in the MSI.

Custom Actions enables to add custom scripts or actions that can be launched during installation and uninstallations and allows expand you MSI functionality beyond built in MSI database functions.

Master Packager enables to work with two sets of Custom Actions:

Master Packager Advanced Editor - Custom Actions view

  • Custom Actions - users can build their own sets of custom actions
  • Predefined Actions - created by Master Packager Team empower packagers to use standardize actions for functionality that cannot be performed using MSI standard tables.

Custom Actions

  • Name
    Sets Custom Action name. It should be unique and descriptive to make it easy to identify the action’s purpose.

  • Type
    Sets Custom Action type. There are multiple Custom Action types that can be used for different cases and automation.

    • JScript:
      • In Binary Table
      • In File Table
      • In CustomAction Table
      • In path of Property
    • VBScript:
      • In Binary Table
      • In File Table
      • In CustomAction Table
      • In path of Property
    • DLL:
      • In Binary Table
      • In File Table
    • EXE:
      • In Binary Table
      • In File Table
      • On Target PC
      • In path of Property
    • MSI Internal:
      • Display Error Message
      • Set Directory
      • Set Property
  • Execution Options
    Sets Custom Action type. There are multiple Custom Action types that can be used for different cases and automation:

    • Immediate
      Runs instantly when the installer processes the action.
    • Deferred User
      Runs later during the install’s execution phase under the user’s context.
    • Rollback User
      Runs if the install is rolled back, under the user’s context.
    • Commit User
      Runs at the end of installation if everything succeeded, under the user’s context.
    • Deferred System
      Runs later during the install’s execution phase under the system context (elevated privileges).
    • Rollback System
      Runs during rollback under the system context.
    • Commit System
      Runs at the end of installation if everything succeeded, under the system context.
    • Deferred TSAware
      Runs as a Terminal Server–aware action during the execution phase.
    • Rollback TSAware
      Runs during rollback as a Terminal Server–aware action.
    • Commit TSAware
      Runs during the commit phase as a Terminal Server–aware action.
  • Return Processing
    Defines how the installer handles the result of the custom action:

    • Synchronous, waits for exit code
      Runs the action and waits for it to finish. Checks the exit code for success or failure.
    • Synchronous, ignore exit code
      Runs the action and waits for it to finish but ignores whether it succeeds or fails.
    • Asynchronous, waits for exit code
      Starts the action, continues other processing, and eventually waits for completion and checks the result.
    • Asynchronous, ignore exit code
      Starts the action and moves on immediately without waiting or checking the result.

Tip: For critical tasks, use synchronous options to ensure proper
error handling.

  • Scheduling Options
    Determines where in the install sequence the action runs:
    • Always
      Executes every time the action is encountered.
    • Execute first time
      Runs only during the initial install, not during repairs or reinstalls.
    • Execute once per process
      Runs only once, even if referenced multiple times in the install sequence.
    • Execute only after UI sequence
      Delays execution until after the User Interface sequence has completed.

Note: Proper scheduling ensures custom actions run in the correct context and avoids unintended repeated execution.

Predefined Actions

Created by Master Packager Team empower packagers to use standardize actions for functionality that cannot be performed using MSI standard tables.