View Single Post
Old 19th February 2020, 19:18   #2
Nutzzz
Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 69
The examples in the NSIS install folder are very helpful. Maybe look at
code:
C:\Program Files (x86)\NSIS\Examples\Modern UI\StartMenu.nsi


The commands you want are: SetOutPath and File

For your desktop icon, you could make an optional section using Section (with /o) containing a call to CreateShortCut

Alternatively, if you don't need the Readme checkbox on the Finish page, you could re-use it for your desktop icon, e.g.:
code:
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_TEXT "Create Desktop shortcut"
!define MUI_FINISHPAGE_RUN_FUNCTION "DoDesktopShortcut"

Function DoDesktopShortcut
CreateShortCut "$DESKTOP\YourShortcut.lnk" "$INSTDIR\YourProgram.exe"
FunctionEnd


Last edited by Nutzzz; 19th February 2020 at 20:29.
Nutzzz is offline   Reply With Quote