Skip to content
⌘ NSIS Forum Archive

Change setting in finish page

8 posts

deroel#

Change setting in finish page

I have this code

!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT CheckValues

!insertmacro MUI_PAGE_FINISH

Inside checkvalues function I have these next lines:

!define MUI_FINISHPAGE_SHOWREADME ""
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Here is the text"

So, I want to add checkbox and its text if the user select specific values, but define intruction doesn't work.

How can i do it?

Thanks...
scully13#
I don't believe those settings will work from within the function. The function wouldn't be executed until run time. You need them read in during the compile. Move those 3 defines up above the !insertmacro MUI_PAGE_FINISH and then you can remove the INIT define and CheckValues function completely if it doesn't do anything else.
deroel#
But i want to change that settings in run time, so i cannot do it.

How can i change the settings for finish page at run time?

Thanks for the reply
scully13#
What exactly do you want to change? The text, which readme to show or possibly not show anything in certain cases?
scully13#
I put together an example for you using the Basic.nsi example script. You will need to change some things around but it will give you the idea. You'll also need to use $2 or another variable that will get set at some point so that it knows if it show show or hide. You could also change the text that shows if you modify the INI file from that function.
scully13#
Sure, after checking the documentation I found out that I really needed to add a PRE function to change the text. Here's the same example with the text change added.