Archive: Change setting in finish page


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...


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.


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


What exactly do you want to change? The text, which readme to show or possibly not show anything in certain cases?


By default nothung, then in certain cases, add the checkbox with the text.


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.


Can you let us know how to change the text in the final page readme checkbox via the "ini"?


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.