[英]Add checkbox in finish page of nsis installer window
How can I add a checkbox on finish page of nsis installer window? 如何在nsis安装程序窗口的完成页面上添加复选框?
I want to add a checkbox on finish page of nsis installer window. 我想在nsis安装程序窗口的完成页面上添加一个复选框。 If the user check that checkbox then another
.exe
should start. 如果用户选中该复选框,则应启动另一个
.exe
。
NSIS already supports this: MUI_FINISHPAGE_RUN . NSIS已经支持此: MUI_FINISHPAGE_RUN 。
You can even force MUI_FINISHPAGE_SHOWREADME to also look and do whatever you want ... 您甚至可以强制MUI_FINISHPAGE_SHOWREADME进行外观和所需的操作 ...
!include nsDialogs.nsh
!include LogicLib.nsh
Name nsDialogs
OutFile nsDialogs.exe
XPStyle on
Var Dialog
Var Checkbox
Page custom nsDialogsPage
Page license
Page instfiles
Function nsDialogsPage
nsDialogs::Create 1018
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}
${NSD_CreateCheckbox} 0 30u 100% 10u "&Something"
Pop $Checkbox
${If} $Checkbox_State == ${BST_CHECKED}
${NSD_Check} $Checkbox
${EndIf}
# alternative for the above ${If}:
#${NSD_SetState} $Checkbox_State
nsDialogs::Show
FunctionEnd
Section
DetailPrint "hello world"
SectionEnd
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.