How to Add a Desktop Shortcut Option on Finish Page in NSIS installer?

后端 未结 2 2063
深忆病人
深忆病人 2020-12-05 14:39

I\'m trying to create an installer using NSIS Modern User Interface for the first time. I would like to know how I can add an option (checkbox) for users to select to have

2条回答
  •  一整个雨季
    2020-12-05 15:20

    If you are not using readme checkbox on the finish page, you can use it to perform whatever action you want:

    Function finishpageaction
    CreateShortcut "$desktop\foo.lnk" "$instdir\foo.exe"
    FunctionEnd
    
    !define MUI_FINISHPAGE_SHOWREADME ""
    !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
    !define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"
    !define MUI_FINISHPAGE_SHOWREADME_FUNCTION finishpageaction
    

提交回复
热议问题