Skip to content
⌘ NSIS Forum Archive

undef "MUI_ABORTWARNING" at runtime?

5 posts

Jnuw#

undef "MUI_ABORTWARNING" at runtime?

Hello all.

What I'm trying to accomplish is to have the "Finish" button on my custom finish page be the only button the user sees, and have it be in the very bottom right hand corner.

I can do this by using a dummy custom page after my custom finish page (so the "Cancel" button is enabled), then by hiding the Back and Close buttons, and renaming the Cancel button to "Finish".

The only problem is that my installer has, "!define MUI_ABORTWARNING" set, so a popup warning appears for the end user if they try to cancel before the end of the installer. On my SetFinishPage function I would like to un-define that warning if I could, but I'm guessing since this define was at compile time, I can't just use undef now. Is there a way I can turn off the MUI_ABORTWARNING at runtime? Thanks all for looking.

Jnuw
Afrow UK#
Just create your own function with MUI_CUSTOMFUNCTION_ABORT. Skip your MessageBox if a variable is set to a certain value.

For the MB_YESNO MessageBox, IDNO should call Abort to go back to the page and IDYES should skip over the Abort call.

-Stu
Jnuw#
Perfect! Didn't see that function, but that's exactly what I needed. Thanks so much Stu, you are always very helpful.

Jnuw
Afrow UK#
Also if you want to use the original abort warning text (for multiple languages) use ${MUI_ABORTWARNING_TEXT} as the message box text.

-Stu