Archive: cancel a custom page


cancel a custom page
  Hello,

I have a custom page where it is reported the data from the server validation if the data was entered.

StrCmp $ 3 "" stop2 play2

stop2: Pop $ (TEMP)
MessageBox MB_OK | MB_ICONSTOP "$ (TEXT_PORTA_SUBTITLE)"
Abort

play2: Pop $ (TEMP)
Return

On this screen when pressed the Cancel button, it first shows the MessageBox to enter the values and while it does not insert the values to display is not canceled.

I tried to enter the function

Function. OnUserAbort
MessageBox MB_YESNO "Abort install?" IDYES NoCancelAbort
Abort causes; installer to not quit.
NoCancelAbort:
FunctionEnd

But he returns
Function named ". OnUserAbort" already exists

Anyone know a way to cancel a custom page, do not enter the script messagebox


From what you have posted (which also has invalid syntax) I am guessing you aren't using a leave function?

Stu


Hi Afrow,
I use when I create a page like this
Page custom SetPageTerminal Void

And I have a function without return
Void Function
FunctionEnd

I believe this would return null when used aborted the installation. That is correct?
Thanks


you're probably using MUI (or a MUI-derivative), and need to specify a custom user abort function.. e.g.


define MUI_CUSTOMFUNCTION_ABORT myAbortFunction 

>
not entirely sure what you're trying to achieve, though.. do you want the installer to exit immediately when canceling that custom page, skipping the "Abort install?" message?

Originally posted by execao
Hi Afrow,
I use when I create a page like this
Page custom SetPageTerminal Void

And I have a function without return
Void Function
FunctionEnd

I believe this would return null when used aborted the installation. That is correct?
No, this is not correct. Please look up the syntax for declaring functions in NSIS, in the manual.