Exit-Package

Exits the current installation package with the specified status and optional comment.


Settings:

  • How do you want to log this package?
    Defines the status with which the package is terminated.
    • Log as executed
      This option causes the status information for successful installation to be written to the registry. For packages with a user part, the entries for the Active Setup are created. The return code 0 is returned to the caller of the package.
    • Do not log
      This option causes status information about package execution to be written to the registry, but the IsInstalled value is set to 0 and the Status value is set to Undone to document that the package is not considered installed or executed. For packages with a user part, the entries for the Active Setup are not created. The return code 69000 is returned to the caller of the package.
    • Log as failed
      This option causes status information about package execution to be written to the registry, but the IsInstalled value is set to 0 and the Status value is set to Failed to document that the package is considered failed and not executed. For packages with a user part, the entries for the Active Setup are not created. The return code 69002 is returned to the caller of the package.
  • Last Comment
    Comment on the termination of the package, which is recorded in the log file and in the registry's StatusMessage value.


Example:

This example ends the script with the status failed and adds the comment to the log file.


Corresponds to DSM eScript commands:

  • ExitProc
  • ExitProcEx


See also: