【问题标题】:Add checkbox in finish page of nsis installer window在 nsis 安装程序窗口的完成页面中添加复选框
【发布时间】:2012-09-06 16:17:51
【问题描述】:

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

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

【问题讨论】:

    标签: nsis


    【解决方案1】:

    NSIS 已经支持这个:MUI_FINISHPAGE_RUN

    您甚至可以强制 MUI_FINISHPAGE_SHOWREADME 也为 look and do whatever you want...

    【讨论】:

    • 你能告诉一步一步在 nsis 安装程序窗口的完成页面上添加复选框吗?
    • @PauloCarvalho:你在说什么?我链接到 MUI 文档。点击我回答中的第一个链接,点击“全部展开”并搜索“_RUN”。
    【解决方案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
    

    【讨论】:

    • 您能花一些时间来正确格式化您的代码吗?
    猜你喜欢
    • 2010-12-03
    • 2012-10-05
    • 1970-01-01
    • 1970-01-01
    • 2013-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多