Skip to content
⌘ NSIS Forum Archive

Abort or Quit command required?

5 posts

bnicer#

Abort or Quit command required?

I'm using the '.onInstFailed' function in case something goes wrong with an installation.

I have two questions. First, what triggers the function? I've been trying, unsuccessfully until now, to trigger it myself with an error (the setup can't open a file) and by placing an Abort in my script when the error occurs. And second, does '.onInstFailed' require a Quit or an Abort or will the installation having failed abort on its own?
Afrow UK#
From NSIS manual on .onInstFailed:
This callback is called when the user hits the 'cancel' button after the install has failed (if it could not extract a file, or the install script used the Abort command).
If you don't have MUI_FINISHPAGE_NOAUTOCLOSE set, the InstFiles page will jump straight to the Finish page so the user won't be able to click Cancel.

-Stu
bnicer#
You are generally very helpful on this forum and I appreciate it. I guess my question is where in the install script would I put an Abort command in order to test the function?