Abort

From NSIS Wiki
Jump to navigationJump to search

The Abort command has a different effect depending on where it is called. The full list of effects is not detailed in the Scripting Reference, so I've done some tests and documented the results here:

When calling Abort from any function, no further instructions in that function are executed and we either terminate the installer or jump to another page/function.

Function Triggered by Abort effect
.onInit Installer executing. Installer terminates. No further callback functions.
.onGUIInit Immediately after .onInit Jump to .onGUIEnd
Page 'pre' When entering the page (backwards or forwards). Skip the page (in the direction the user is navigating).
Page 'show' Immediately after 'pre' callback. None (other than skipping remaining instructions in the function).
Page 'leave' When leaving the page (backwards or forwards). Stay on the page.
Section Immediately after InstFiles page 'show' callback. Install stops. Only button enabled is Cancel.
.onInstFailed User clicking Cancel after Aborted install. Jump to .onGUIEnd
.onInstSuccess User clicking Close after completed install. Jump to .onGUIEnd
.onGUIEnd Immediately after .onInstFailed or .onInstSuccess Installer terminates. No further callback functions.
Custom Function Manual Call from other function/section. Abort command effect is as if it was executed by the calling function.