Kaseya Community

Custom installer pre-procedure

This question is not answered

Can a custom installer's pre-procedure stop the installation of the custom installer? I'm trying to use a pre-procedure to ensure a target machine is capable of receiving the custom installer's package, however, I can't make it fail out and stop the installation. Even when errors are recorded, the installation moves forward. I read about #global:AbortKSDUInstall# somewhere, but I can't seem to get it to work as needed.

Verified Answer
  • Found it. help.kaseya.com/.../EN_ksduquickstart_R92.pdf, page #5.

    "Conditionally Canceling Installs and Uninstalls

    Installs and uninstalls can be conditionally canceled by a "pre-procedure". VSA users may wish to

    cancel a pending install or uninstall if a condition is not met. For example, the end-user may be using

    the machine. If a "pre-procedure" asks the end-user for permission to continue with the install or

    uninstall and the end-user says no, the "pre-procedure" can create one of the following global variables

    using the getVariable() command: #global:AbortKSDUInstall# or

    #global:AbortKSDUUninstall#, whichever is appropriate. Software Deployment and Update

    now includes a check for the appropriate global variable after the "pre-procedure" is run, and cancels

    the pending install or uninstall if the variable exists. An agent procedure is assigned to a

    "pre-procedure" for an install or uninstall when adding or editing the installer in the local software

    catalog of the Catalog page."

All Replies
  • When we need to check prerequisites in an install procedure, if there's a condition where we should not proceed, we "force" an error, which causes the procedure to stop at that point. There are several ways to force an error, but one of my favorites is to read "from C:\DoesNotExist.xyzzy" into a variable and have Halt on Fail set.

    You can also wrap things in if/else clauses, but this often gets messy. The above method is an immediate stop.

    Glenn

  • Found it. help.kaseya.com/.../EN_ksduquickstart_R92.pdf, page #5.

    "Conditionally Canceling Installs and Uninstalls

    Installs and uninstalls can be conditionally canceled by a "pre-procedure". VSA users may wish to

    cancel a pending install or uninstall if a condition is not met. For example, the end-user may be using

    the machine. If a "pre-procedure" asks the end-user for permission to continue with the install or

    uninstall and the end-user says no, the "pre-procedure" can create one of the following global variables

    using the getVariable() command: #global:AbortKSDUInstall# or

    #global:AbortKSDUUninstall#, whichever is appropriate. Software Deployment and Update

    now includes a check for the appropriate global variable after the "pre-procedure" is run, and cancels

    the pending install or uninstall if the variable exists. An agent procedure is assigned to a

    "pre-procedure" for an install or uninstall when adding or editing the installer in the local software

    catalog of the Catalog page."