Archive: 3 run checkboxes on the same finish page


3 run checkboxes on the same finish page
Hello,
I would want to have 2 or 3 checkboxes in the finish page to run respective executables installed; I would not want to have multiple finish pages or MUI_FINISHPAGE_RUN_FUNCTION define: how to write the code ?


Hello.

The basic idea is you are going to use a pre function of the finish page, check out the "Page Custom Functions" section of the C:\Program Files\NSIS\Contrib\Modern UI\Readme.html. The pre function will allow you to edit the ioSpecial.ini file which controls how the Finish page looks.

Use:

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" "Field #" "Name" "Value"

to add your check boxes, see the "Using InstallOptions for custom pages" section of the same readme.txt.

Then your finish page appears, the user does what ever, and then you can read the "State" of the controls (check boxes) you added using a MUI_PAGE_CUSTOMFUNCTION_LEAVE function.

This should get you started. Check out the readme above, as well as "C:\Program Files\NSIS\Contrib\InstallOptions\Readme.html" for more information on how pages are constructed. Good luck.


It is ok.
But the checkboxes and labels have different background color (grey, same as the bottom rectangle with buttons: Windows default I suppose) than the page (white: Windows default I suppose). How to have the checkboxes and labels bakground color equal to the page main window (white, default) ?
I have tried with the following code but the window is all grey not white:
...
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
!insertmacro MUI_INSTALLOPTIONS_READ $0 "ioSpecial.ini" "Field 4" "hwnd"
!insertmacro MUI_INSTALLOPTIONS_READ $1 "ioSpecial.ini" "Field 5" "hwnd"
SendMessage $0 ${WM_CTLCOLOR} 000000 0
SendMessage $1 ${WM_CTLCOLOR} 000000 0


Use SetCtlColors

-Stu