Archive: Custom Page after abort ?


Custom Page after abort ?
Could someone please tell me if it's posible (if so how ?) to call a custom page after an abort message box. I'd like to have a page that basically says Setup aborted, nothing was installed and no changes were made to the system. While the below code appears to work I'm fairly certain that it is not the correct way to go about it.

Function .onUserAbort

MessageBox MB_YESNO "The program is not completely installed on your computer.$\r$\nDo you want to abort setup ?" IDYES NoCancelAbort
Abort
NoCancelAbort:
!insertmacro MUI_HEADER_TEXT "Setup Aborted" " "
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "abort.ini"
Pop $R0
GetDlgItem $R1 $R0 1200
CreateFont $R2 "MS Sans Serif" 8 700
!insertmacro MUI_INSTALLOPTIONS_SHOW
Quit

FunctionEnd


That is the only way.

-Stu


Give me more details, when you click YES in that MessageBox, what occurs?


After pressing Yes the custom page is displayed, however after pressing the OK button (to exit the custom page)an error message box quickly appears saying something about a corrupted installer. I don't know what the error box says exactly because it closes too quickly.


This is probably because the abort flag is set after the user clicks the cancel button.

Therefore you can't use this at all, unless someone adds code to allow for this.

-Stu


InstallOptions can not be called outside of a page creator function. Afrow, you should know that already ;)

The best way I can think of right would be not to use Abort, skip the rest of the installation and change the finish page to show the desired message.


bah :)


-Stu


And if you remove the Quit command of the code, what occurs?


Doesn't matter. InstallOptions should not be used outside of a page's creator function.


Thanks for the help. Kichik I'm not sure if I understand what you've suggested. If I change the Finish page won't that page (with the abort messages) be shown at the succesfull completion of the install as well ?


No, you only change it if the installation was aborted.