Archive: Conditional MUI_FINISHPAGE_TEXT


Conditional MUI_FINISHPAGE_TEXT
I know I can define the MUI_FINISHPAGE_TEXT prior to the language macro, but I would like to do a conditional change of the finish page text that is displayed at the end of my installation.

Has anyone done this before?

Thanks,

Squirre1


You can modify the text using SendMessage with SetText (or using the NSD_SetText macro) in the page's SHOW function. The variable containing the label's HWND is stored in a variable which is not documented, but you can find it if you look in the nsh file of that MUI page.


Just found this post...:

http://forums.winamp.com/showthread.php?t=192865

Worked like a charm...


I fixed it by settings MUI_FINISHPAGE_TEXT as a to a variable and just setting the variable in the section... I replied but I think since I put a URL in the reply it is being moderated. I would like to do the same thing on the uninstall, BUT there is no nsh for the uninstall settings or anything like a MUI_UNFINISHPAGE_TEXT.

Thanks,

Squirre1


Ok, I have the final solution now after many a trial and errors.

Once you define MUI_FINISHPAGE_TEXT and then it is processed by the MUI_PAGE_FINISH it appears that it gets undefined somehow. What you then have to do is redefine it yet again. Defining it the second time makes it available again to the processing of MUI_UNPAGE_FINISH.


; Installation
!define MUI_FINISHPAGE_TEXT "$FINISHPAGE_TEXT"
!insertmacro MUI_PAGE_WELCOME
# !insertmacro MUI_PAGE_COMPONENTS
# !insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH


; Uninstallation
!define MUI_FINISHPAGE_TEXT "$FINISHPAGE_TEXT"
!insertmacro MUI_UNPAGE_WELCOME
# !insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

!insertmacro MUI_LANGUAGE "English"



Hope this helps someone else other than just me..

The Modern UI manual clearly states under Page settings:

Page settings apply to a single page and should be set before inserting a page macro. The same settings can be used for installer and uninstaller pages. You have to repeat the setting if you want it to apply to multiple pages.
Stu

Ugh, Sorry afrow... Appreciate the information. would have been nice about 3-4 hours ago. but still appreciated none the less...

Have not read the docs word for word from tip to tail, although I was looking all over for it...


Not to worry you are definitely not the first to have missed it. I suppose the fact that to see that text you have to expand "Page settings" first. Perhaps an enhancement is due here.

Stu