Skip to content
⌘ NSIS Forum Archive

Dynamically show/hide finish-run checkbox

5 posts

Yurik#

Dynamically show/hide finish-run checkbox

Hi,

Is there any simple way to show/hide finish run checkbox except for doing it with call to EnableWindows?
Afrow UK#
See the code snippet on this page:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


That changes the font size of the header text on the Welcome and Finish pages, which are control ID 1201 of the InstallOptions page (or [Field 2] in the ioSpecial.ini file). The check box will be control ID 120#.

-Stu
Yurik#
Thanks, Stu. As far as I understand, you mention the same ShowWindow (I've mispelled it in the first post). Well, I've implemented this per your advise:


<skip>
!undef MUI_PAGE_CUSTOMFUNCTION_SHOW
!define MUI_PAGE_CUSTOMFUNCTION_SHOW FinishPageShow
!insertmacro MUI_PAGE_FINISH

Function FinishPageShow
${if} ${MODE} == "WITHOUT_FINISH_RUN"
GetDlgItem $DlgItem $MUI_HWND 1203 ; run checkbox, see MUI_FINISHPAGE_RUN_TEXT macro
ShowWindow $DlgItem SW_HIDE
${endif}
FunctionEnd
Afrow UK#
ShowWindow $DlgItem SW_HIDE
...should be...
ShowWindow $DlgItem ${SW_HIDE}

Should still work otherwise though because it would probably take the "SW_HID" string value as 0 (which is what ${SW_HIDE} is). You were lucky there 🙂

-Stu