Adding Post-Install Actions

InstallAnywhere 2018

The Post-Install view specifies actions and panels to occur after the installation of files. Like the Pre-Install sequence, the Post-Install sequence is ordered with the top actions occurring first. By default, InstallAnywhere has added two actions to the InstallAnywhere project:

Panel: Install Complete—This panel appears when the installation has completed successfully. This action is determined by the status of the $INSTALL_SUCCESS$ variable. This panel displays only if $INSTALL_SUCCESS$ contains no error conditions.
Restart Windows—This action restarts a Windows-based system if the installer determines that it is necessary.

InstallAnywhere-generated installations are controlled primarily by InstallAnywhere rules. As an example of an InstallAnywhere rule, select the Restart Windows action in the Office Suite project. In the customizer at the bottom of the view, select the Rules tab. The Rules customizer opens.

The rules that are set for the Restart Windows action are set to compare InstallAnywhere variables. When a rule is added, the rule’s unique ID (which is based on a combination of the abbreviation of the name of the rule and a numeric identifier) is displayed in the Rule Expression setting. If you want to write complex rule expressions, you can edit the expression in the Rule Expression setting to use multiple logical operators—such as AND (&&), OR (||), and NOT (!)—and precedence operators (parentheses) to express the relationship between two or more rules. By default, rules are joined by the AND operator. For more information, see Building Complex Rule Expressions.

To add post-install actions:

1. Perform the steps in Adding a LaunchAnywhere Executable to the Install Sequence.
2. On the Sequence page, click Post-Install. The Post-Install view opens.
3. Click the Add Action button. The Choose an Action dialog box opens.
4. Click the General tab.
5. Click the Execute Target File action.

The Execute Target File action is used to execute files that are included as part of the installation, and consequently it is available only in the Install and Post-Install sequence of the installation. The Execute Target File action is not available in the Pre-Install view because files cannot be executed if are not installed.

6. Click the Add button. InstallAnywhere adds the Execute Target File action to the Post-Install Action List and displays its customizer at the bottom of the view.
7. If the Execute action panel was added at a location other than the bottom of the Post-Install view, move it now. Either use the up and down arrows, or drag the action to the bottom of the action list.
8. In Execute Target File customizer at the bottom of the view, click the Properties tab.
9. In the Name setting, enter a name for the action. Naming the action will help you identify the action when you looking at the visual tree.
10. To select the target, click the Choose Target button next to the Target setting. The Choose an Action dialog box opens and displays the file installation tree that is specified in the Install view.
11. You can add one or more files that you want to be launched in this stage. To execute the just installed Office Suite application, select the OfficeSuite icon under the User Install Folder (not the icon listed under the Shortcuts Destination Folder) and click OK.

You need to choose the actual OfficeSuite launcher, and not the shortcut, because shortcuts—especially on Windows and macOS or OS X systems—are pointers and are not inherently executable. InstallAnywhere-generated installers will not execute a shortcut.

Note • By using the Command Line setting, modifications can be made to the command line that the installer uses to execute the file, such as adding a handler, or an argument to the execution. Do not remove or modify the $EXECUTE_FILE_TARGET$ entry, as this represents the file to execute. To specify a handler, add an executable path to the begging of the entry; to specify an argument, append a file path. These paths must be absolute; however, the paths can include InstallAnywhere variables.

12. Continue with the steps in Building the Installer.

Note that to customize the user experience for the Execute Target File action, you can select Suspend the installation until the process completes check box on the Properties tab of the Execute Target File customizer. This option is particularly useful in cases where a later step in the installation is dependant on the execution. You can also select a suboption, the Show indeterminate dialog check box, to specify an indeterminate progress bar with a message. You can use this option if the execution may take some time (for example, launching a file that installs another product, or configures a database or other application).