Thanks but this did not help. Here is my complete Script:
!include "MUI2.nsh"
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
Name "NoName"
OutFile "Setup.exe"
InstallDir "$EXEDIR"
Section "A"
GetDlgItem $4 $HWNDPARENT 2 /* 1 = Next, 2 = Cancel, 3 = Back */
SendMessage $4 ${WM_SETTEXT} "STR:Close" "STR:Close"
MessageBox MB_OK|MB_ICONSTOP "Installation failed"
/* SendMessage $4 ${WM_SETTEXT} "STR:Close" "STR:Close" */
Abort 'Error message'
/* SendMessage $4 ${WM_SETTEXT} "STR:Close" "STR:Close" */
SectionEnd
While the message box is active I can see a gray "Close" button at the main window. But as soon as I close the message box the button text goes back to "cancel". I also tried the SendMessage comand at the uncommented positions but it did not solve the problem.
I am using NSIS v2.46 advanced logging build.