I came across the following bug when using MUI and the messagebox plugin: When I define my own MUI_CUSTOMFUNCTION_ABORT function and use messagebox::show in it, then an additional (undesired) button is shown when "Cancel" is pressed for the first time.
I have stripped down the error to the following small example. I found that...
a) When you press "Cancel" for the first time, an undesired third button is shown.
b) All subsequent uses of the Cancel button show only the "Yes" and "No" buttons (as desired).
c) When I use msssagebox:show in the "Section" instead of the custom function, the bug does not show up.
Is this a known bug or am I doing something wrong? What can I do to resolve the issue?
Jens
Name "Test"
OutFile "Test.exe"
!include MUI.nsh
!define MUI_CUSTOMFUNCTION_ABORT MUI.onUserAbort
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English
Section
SectionEnd
Function MUI.onUserAbort
messagebox::show MB_DEFBUTTON2 "" "" "Really cancel?" "Yes" "No"
pop $0
StrCmp $0 "1" +2
Abort
FunctionEnd