Archive: MUI_FINISHPAGE in modern.exe ?


MUI_FINISHPAGE in modern.exe ?
I want to customize the MUI_FINISHPAGE with Resource Hacker, but I can't find the right resource for that dialog. How can I find out where it is, except comparing the dialog-previews in Resource Hacker with my running setup?
Thx


The finish page is an InstallOptions page, not a normal page found in modern.exe. You can edit ioSpecial.ini in $PLUGINSDIR in the pre function of the welcome and finish page.


hmmm....pre function means?
i can't manage to show that label nor the header_text.
maybe you can tell me what i'm doing wrong.
- first i added a label to the ioSpecial.ini:
[Field 4]
Type=Label
Left=50
Right=86
Top=134
Bottom=142
- then i have to extract the ioSpecial.ini in .onInit-Function?
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioSpecial.ini" doesn't work:
"!insertmacro: macro named "MUI_INSTALLOPTIONS_EXTRACT" not found!" ...no idea...
- page custom FinishpageEdit
!insertmacro MUI_PAGE_FINISH

- Function FinishpageEdit

!insertmacro MUI_HEADER_TEXT "Test" "TestSub"

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioSpecial.ini"

FunctionEnd

...first edit header_text....if that works own label will follow...

anything missing? !include headerfile?


pre function means MUI_PAGE_CUSTOMFUNCTION_PRE in this case. See the MUI readme for more information about using it.


can somebody describe the function (not the content) of the ioSpecial.ini detailed? or can i read it somewhere?

instead of adding a new label, now i just try to enlarge the checkbox in the finishpage, so i can set a longer text (in mui languagefile). But where can i set the width and height of it? There are only two labels and one bitmap defined in the ioSpecial.ini . Where comes that checkbox from? In "Local Settings\Temp\" i can find another ioSpecial.ini with the settings of the finishpage (checkbox included), but changes are not decisive.


if i could set the postition of the checkbox it would help me, too, because then i could add the text to the label above the checkbox (why is the label hidden by the checkbox, if it's text gets longer?). strange thing, that checkbox. no own component in modern.exe? integrated into the label? I ain't that hard to add a little text to the finishpage, is it?


The MUI edits the INI on runtime according to the defines you add in the script. Take a look at the MUI_FUNCTION_FINISHPAGE macro in Contrib\Modern UI\System.nsh. Notice especially the following line which is called after the MUI finished writing into ioSpecial.ini:

!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
That line calls your PRE function in which you can change ioSpecial.ini.

There's probably other ways to do this, but here's a trick you can use help eliminate some of the guesswork in editing the ioSpecial.ini file while keeping the same general look to the page:

The ioSpecial.ini file gets created in the plugins directory at runtime. If you were to temporarily insert the following code into your .onInit function, you'd know which folder was the PLUGINS folder:


InitPluginsDir
MessageBox MB_OK "PluginsDir: $PLUGINSDIR"


Once this is in place, execute your installer. Make a note of this path and the click OK. (the path will change each time time you run the install). Continue with the install until you get to the finish page. Then, open the plugins folder. You should see the ioSpecial.ini. Make a copy of this file and store it somewhere. This can then be a "template" you can use to tweak your own page. (I prefer to use the built-in InstallOptions editor from HM NIS EDIT.) Once you know what you need to change, then it's just matter of inserting the proper WriteIniStr commands in your PRE function.

Enjoy!:cool:

thanks. i finished customizing my finishpage now. didn't really understand the MUI_INSTALLOPTIONS_WRITE line. now everything looks like it shoud.