zeeh3
23rd June 2008 12:33 UTC
nsDialogs and quit
Please, I need some help here. How can I set the installer to quit with nsDialogs? This is not working:
...
${
NSD_CreateButton} 335 137 75 23 "Quit"
Pop $BUTTON
>${NSD_OnClick} $BUTTON LeaveInstaller
>...
Function LeaveInstaller
Pop$0
Quit
FunctionEnd
>
elllit
23rd June 2008 14:18 UTC
Hi,
"not working" as in "throws an error" or as in "does not quit the installer"?
Also did you try the following?
GetFunctionAddress $0 LeaveInstaller
nsDialogs::OnClick /NOUNLOAD $BUTTON $0
zeeh3
23rd June 2008 14:31 UTC
Sorry, I meant does not quit the installer. The macro NSD_OnClick already handles the code you supplied.
elllit
23rd June 2008 15:03 UTC
Originally posted by zeeh3
The macro NSD_OnClick already handles the code you supplied.
True, sorry.
Well, at least I can say that it's the same here. The installer wont quit.
As long as it remains unresolved: Can you think of a workaround using the leave callback of the page?
Anders
23rd June 2008 16:10 UTC
nsis only checks the quit flag at some point in its code i think, you could probably hack around it by sending the wm_close message to $hwndparent
Afrow UK
23rd June 2008 16:42 UTC
Another option is to use this instead:
http://nsis.sourceforge.net/Go_to_a_NSIS_page
You can supply X to initiate a cancel button click.
Another option, if Quit is handled say on page exit, you could try that function and just go to the next page after calling Quit.
Stu
zeeh3
23rd June 2008 18:20 UTC
Thanks for all the answers.
LeaveInstaller
Pop$0
SendMessage $HWNDPARENT${WM_CLOSE} 0 0
FunctionEnd
>
did the trick :)
Yathosho
27th February 2011 12:09 UTC
Originally posted by Anders
nsis only checks the quit flag at some point in its code i think, you could probably hack around it by sending the wm_close message to $hwndparent
the problem is, you will still get to see the abort message :(
Anders
27th February 2011 15:48 UTC
Originally posted by Yathosho
the problem is, you will still get to see the abort message :(
The abort message comes from Modern UI IIRC