Abort: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(minor updates) |
m (corrected misspelling) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
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. | |||
== | {| cellpadding="4" border="1" class="table_descrowdesccol sortable" | ||
! style="text-align: left" | Function | |||
! style="text-align: left" | Triggered by | |||
! style="text-align: left" | 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. | |||
|} | |||
[[Category:Scripting FAQ]] | |||
Latest revision as of 15:54, 23 August 2023
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. |