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

后端 未结 2 2066
深忆病人
深忆病人 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:16

    An alternate, and the simplest way to allow the user to add a desktop icon is to create a custom Section that does it. The user can then choose to add the shortcut in the "features" page of the installer and you don't have to do heavy modifications of the UI.

    Section "Desktop Shortcut" SectionX
        SetShellVarContext current
        CreateShortCut "$DESKTOP\Your Program.lnk" "$INSTDIR\YourProgram.exe"
    SectionEnd
    

提交回复
热议问题