Archive: change directorypage with installoptions?


change directorypage with installoptions?
Hi!
Hope i don't get onto your nerves, but i got another question on installoptions.
I would like to change the text of the label in the directorypage on runtime, depending on a "bool"-variable. If the variable is true, i want to change the whole text of that label. If it is false, the label should be filled with the text from the (nlf-)language-file.
I did this for the welcomepage with installoptions, but for the directorypage it doesn't seem to be so easy.

!define MUI_PAGE_CUSTOMFUNCTION_PRE "DirectoryPagePre"
!insertmacro MUI_PAGE_DIRECTORY
...

Function DirectoryPagePre
StrCmp $BoolInstalled "true" Change Nothing
Change:
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Text" "Test"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Text" "Test"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Text" "Test"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "Test"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Text" "Test"
Nothing:
FunctionEnd

Can't the directorypage get it's settings from ioSpecial.ini?


The directory page is not an InstallOptions dialog, but a built-in dialog.

You need to change the dialog text with SendMessage in the page's Show function.

!include WinMessages.nsh

!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryPageShow
!insertmacro MUI_PAGE_DIRECTORY

!insertmacro MUI_LANGUAGE English

Function DirectoryPageShow
StrCmp $BoolInstalled "true" 0 +4
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R0 $R0 1006
SendMessage $R0 ${WM_SETTEXT} 0 "STR:blah"
FunctionEnd


-Stu