Configure an existing NSIS MUI2 page

I successfully added a flag to the nsis program installation completion page, which defines the functions for MUI_PAGE_CUSTOMFUNCTION_PRE and MUI_PAGE_CUSTOMFUNCTION_SHOW on the completion page using MUI .

But if I MUI2 instead of MUI , this checkbox is not displayed. I believe that in MUI2 there is something different than MUI . I could not find documentation on this subject, if anyone knows this, can I please know ???

thanks

+1
source share
1 answer

MUI1 uses InstallOptions for the welcome and completion pages, and MUI2 uses nsDialogs.

This is described in the MUI2 readme :

Welcome and end the page. longer use of InstallOptions. Instead, the new nsDialogs plug-in is used. nsDialogs allows you to create custom pages or customize existing pages directly from a script.

Edit: Customize the page using the nsDialogs commands in the show callback:

 var Checkbox Function MyFinishShow ${NSD_CreateCheckbox} 120u 110u 100% 10u "&Something" Pop $Checkbox SetCtlColors $Checkbox "" "ffffff" FunctionEnd Function MyFinishLeave ${NSD_GetState} $Checkbox $0 ${If} $0 <> 0 MessageBox mb_ok "Custom checkbox was checked..." ${EndIf} FunctionEnd !define MUI_FINISHPAGE_RUN "calc.exe" ;See note after the code... !define MUI_PAGE_CUSTOMFUNCTION_SHOW MyFinishShow !define MUI_PAGE_CUSTOMFUNCTION_LEAVE MyFinishLeave !insertmacro MUI_PAGE_FINISH 

Or, if you don’t use the checkboxes of your existing homepage, you can use them for custom content without using the show callback ...

+7
source

All Articles