Adding preinstallation and postinstallation commands

You can include extra custom commands before or after the installation command, which is used to install the selected software package on endpoints. All commands are run from the root folder of the software package.

About this task

You can specify custom commands for any of the following script types:
BigFix actionscript
The custom command is added to the actionscript and is run directly from the task.
Windows batch script
A batch file is created that contains the custom command. The file is then run from the actionscript of the installation task.
UNIX shell script
A shell file is created that contains the custom command. The file is then run from the actionscript of the installation task.

Use the correct command syntax for the selected script type and validate that the commands are working. The dashboard does not check for valid actionscript, batch script, or shell script commands.

Procedure

  1. From the Create Distribution Task window of the Manage Software Distribution Packages dashboard, click Next until you see the Show Advanced Options under the installation command.
  2. Click Show Advanced Options.
  3. Click Add custom preinstallation and postintallation commands, and click Next.
    Figure 1: Show Advanced Options

    Show Advanced Options
  4. Select the script type and enter the commands in the provided spaces, then click Next.
    Important: Use the correct command syntax for the selected script type. The Manage Software Distribution dashboard does not check for valid commands.
    Note: Ensure that Apply command is selected if you want your custom commands to be added to the script, otherwise clear these options.
    Tip: You can use the return code of the installation as a postinstallation command by using this command: parameter 'returnCode'.
    Figure 2: Add custom preinstallation and postinstallation commands

    Add custom preinstallation and postinstallation commands
  5. Follow the remaining instructions in the Create Distribution Task window.