Archive: Finish Page - addition checkbox not showing (MUI2)


Finish Page - addition checkbox not showing (MUI2)
  Apologies for asking this question again. I have looked on all the forum posting on this topic that I could find, but to no avail.

I am trying to add a third checkbox to the finish page in addition to the usual two that are present there (README and RUN ones). The 2 standard ones are being used and I need an extra checkbox to open the install folder if the user selects it. I am using MUI 2.

I have the following code (snipped to make it more clear):

!insertmacro MUI_PAGE_WELCOME

>!insertmacro MUI_PAGE_LICENSE "EULA.txt"
>PageEx directory
DirVerify leave
PageCallbacks"" "" leaveDirPage
PageExEnd
>!insertmacro MUI_PAGE_INSTFILES
>!define MUI_FINISHPAGE_RUN
>!define MUI_FINISHPAGE_SHOWREADME
>!define MUI_FINISHPAGE_SHOWREADME_FUNCTION createDesktopIcon
>!define MUI_FINISHPAGE_SHOWREADME_TEXT "&Create Desktop Icon"
>!define MUI_FINISHPAGE_RUN_FUNCTION startApplicationNow
>!define MUI_FINISHPAGE_RUN_TEXT "&Start GWAT Demo now"
>!define MUI_PAGE_CUSTOMFUNCTION_PRE InitFinishPage
>!define MUI_PAGE_CUSTOMFUNCTION_SHOW ShowFinishPage
>!define MUI_PAGE_CUSTOMFUNCTION_LEAVE LeaveFinishPage
>!insertmacro MUI_PAGE_FINISH

>!insertmacro MUI_UNPAGE_WELCOME
>!insertmacro MUI_UNPAGE_CONFIRM
>!insertmacro MUI_UNPAGE_INSTFILES
>!insertmacro MUI_UNPAGE_FINISH
>
the pre finish page code is:

InitFinishPage

WriteINIStr "$PLUGINSDIR\iospecial.ini" "Settings" "NumFields" "6"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Type" "CheckBox"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Text" "&Show Install Folder"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Left" "120"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Right" "315"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Top" "80"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "Bottom" "140"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 6" "State" "0"
>FunctionEnd
>
I have a function that deals with whether this additional checkbox is pressed or not and that works fine.

When the finish page is displayed, only the two checkboxes appear. The third one does not but when ticked it works as normal. I set the state to 0 and 1 of the checkbox in code and it works. Only problem is checkbox not displayed.

Afrow mentioned to use SetWindowPos function call (win32 API) to resize and the checkbox should show, but I cannot get it to work. I tried using:


System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) i ($mui.FinishPage, 0, 0, 0, 510, 230, ${SWP_NOZORDER}|${SWP_NOMOVE})" 

But I cannot see which handle to use for resizing.

Any code would be helpful and useful.
Thanks.
Rizwan

If you are using MUI 2 then you cannot modify iospecial.ini to add an extra checkbox to the FINISH page because MUI 2 does not use an ini file for the FINISH page.

The MUI 2 ReadMe explains this in the "Modern UI 2.0" section:

The welcome and finish page are no longer implemented using InstallOptions. Instead, the new nsDialogs plug-in is used. nsDialogs allows you to create custom pages or customize existing pages directly from the script.
...
Rewrite customization code for the Modern UI 1.8 welcome and finish pages in which the InstallOptions INI file is used. nsDialogs commands should be used instead.
The old InstallOptions version of the MUI is included with NSIS and it has its own ReadMe file. Perhaps you looked at the wrong ReadMe?

thanks for your prompt reply.

I had a feeling I should not be using iospecial as that is for MUI, not MUI2.

How do I then add an additional checkbox to the end page. I can try using nsDialogs in the init section of the finish page?


I am still using the original version of MUI for my installers so I cannot answer that question. Sorry.


I would recommend reading through the following:

nsDialogs documentation: Docs\nsDialogs\Readme.html

Finish page (customized via nsDialogs)
forums.winamp.com/showthread.php?threadid=310323

[nsDialogs] How to create Checkbox with transparent background?
forums.winamp.com/showthread.php?threadid=311939