ChoaticWhisper
4th November 2002 18:08 UTC
Comfirm MessageBox?
First I have to say this is one of the best installer programs Ive found.
Ok now, I have it set so the user can not change the instdir but I want to have a comfirm messagebox asking if they want to install.
I checked the messagebox thing but I cant understand just want I need to do. Im guessing I have to make it so that if the user clicks OK it will continue with the install and if Cancel is clicked it exits. But how do I get the OK button to continue and the cancel to exit? I read the Documentation file and it said something about 'GoTo' thats what I need, Right?
Could someone show me a example or something?
kichik
4th November 2002 18:11 UTC
What you need is the .onUserAbort function. This callback function will be called when the user clicks the cancel button. There you can prompt the user with a message box and ask him if he really wants to cancel. Have a look at the documents about this function for more information and for an example:
http://nsis.sourceforge.net/Docs/Chapter25.html#25.1.7
Joost Verburg
4th November 2002 22:44 UTC
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Do you want to install?" IDYES continue
Quit
continue:
ChoaticWhisper
4th November 2002 23:22 UTC
Thanks, I looked at the .onUserAbort. Thats not what I wanted I did find the .onInit Function, Which does just what I wanted.
Thanks for the help.