在nsis安装程序窗口的完成页面中添加复选框

时间:2012-09-06 16:17:52

标签: nsis

如何在nsis安装程序窗口的完成页面上添加复选框?

我想在nsis安装程序窗口的完成页面上添加一个复选框。如果用户选中该复选框,则应启动另一个.exe

2 个答案:

答案 0 :(得分:3)

NSIS已经支持:MUI_FINISHPAGE_RUN

您甚至可以强迫MUI_FINISHPAGE_SHOWREADME look and do whatever you want ...

答案 1 :(得分:-2)

!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