Skip to content
⌘ NSIS Forum Archive

Custompage vanishing text problem

6 posts

cheryll#

Custompage vanishing text problem

I have some problem with my custompage.
The text for the custom page is displayed correctly as the page comes up.
But as I click "install" and a message box pops up, the text just vanishes (the title and subtitle stay) and doesn't show up even after the message box is gone.

Here's the code:

Function Framework
;disable "cancel" button
GetDlgItem $0 $HWNDPARENT 2
EnableWindow $0 0
;set Text
!insertmacro MUI_HEADER_TEXT $(Frame_TITLE) $(Frame_SUBTITLE)
!insertmacro MUI_INSTALLOPTIONS_WRITE "Framework" "Field 2" "Text" $(Field1)
!insertmacro MUI_INSTALLOPTIONS_WRITE "Framework" "Field 5" "Text" $(Field2)

;checks if Framework is installed
ReadRegStr $R0 HKLM "Software\Microsoft\NET Framework Setup\NDP\v2.0.50727" "Install"

${If} $R0 != ""
!insertmacro INSTALLOPTIONS_WRITE "Framework" "Field 2" "Text" "$(FRAME_TEXT)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "Framework"
Messagebox MB_OKCANCEL "$(CANCELUPDATE)" IDOK weiter IDCANCEL abbruch

${Else}
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "Framework"
Messagebox MB_OKCANCEL "$(CANCELFRAME)" IDOK weiter IDCANCEL abbruch

abbruch:
Messagebox MB_OK "$(ABBRUCH)"
quit
${EndIf}

I don't know if this is a bug, or if I'm simply missing something, but I'm grateful for all help.
kichik#
You probably have some overlapping controls. Make sure all the figures match what you really want and that no control overlaps another.
cheryll#
No, that does not seem to be it. The whole behavior of the custom- install page is a bit strange. If I use Installoptions_show to display the text again, then I have to click "install" again to resume installation...
I worked around it by simply using the banner plugin.
kichik#
Ah, that's the problem. You can't call MUI_INSTALLOPTIONS_DISPLAY twice. That'd cause all kinds of trouble, including this. You must have a separate page for each MUI_INSTALLOPTIONS_DISPLAY call.
cheryll#
Display is the same as show? Well, no matter, cause that can't be the problem. I didn't work before I put it in, and it doesn't when I take it out.
Even if I take the display out of the conditional and put it somewhere else, the text still vanishes.
I assumed it's some peculiarity of installing pages. Like showing different text before, during and after the installation, just that I couldn't find out how to put in other text then the before one.