Determining Whether an Installation Was Successful
InstallAnywhere 2024 R2
You can use InstallAnywhere’s built-in variable $INSTALL_SUCCESS$ to receive confirmation that an installation was successful. There are four possible values for the $INSTALL_SUCCESS$ variable:
• | SUCCESS—Installation was successful. |
• | WARNING—An error that doesn't prevent installation from happening but might not be the desired behavior. If an action is trying to perform an activity and, due to restrictions or incorrect input parameters, the action is unable to perform successfully, a WARNING results. For example, if an action is trying to delete a protected file, or if the Expand Archive action is provided with an archive of an unknown format, shortcuts or an alias may be created because of existing ones of the same name or are named to be the same as the directory name. These actions report WARNING in the log files as a way of providing additional information. |
• | NONFATAL_ERROR—A non-fatal error that prevents some part of the installation from completing, but does not make the entire installation fail. In particular, a non-fatal error deals with specific actions that failed to perform due to some critical errors originating during execution. Examples of non-fatal errors include: an execute script action failure, a create shortcut action failing on a different OS, or, in case of a RUNSQL script action, the server type or a missing delimiter causes the action to fail. In such cases, the offending actions log the ERROR in log entries. |
• | FATAL_ERROR—An error that causes the entire installation to fail. This state represents the abort status of the installers. For example, if upgrades fail, a severe thread exception causes the installer to shut down or initiates cancellation of the installers. The rollback feature is tied to this error type per the settings available in the designer. The custom code allows the user to set the FATAL_ERROR using the FatalInstallationException class available in the API. |
Similarly, you can use the variable $UNINSTALL_SUCCESS$ to determine the success of the uninstaller.
See Also