Skip to content
⌘ NSIS Forum Archive

Desktop Shotcuts

3 posts

bkolt#

Desktop Shotcuts

Please forgive my ignorance, especially if this is a really stupid question.

How do I conditionally create desktop shortcuts for an installed application?


Thanks,
Ben
kichik#
Hi!

To create a shortcut on the desktop you should use:
CreateShortCut "$DESKTOP\myApp.lnk" "$INSTDIR\myApp.exe"
If you want it to be conditional write:
StrCmp $1 "create shortcut" 0 dontCreate
CreateShortCut "$DESKTOP\myApp.lnk" "$INSTDIR\myApp.exe"
dontCreate:
You could have understood all of the above from the documentation.

KiCHiK
bkolt#
Thanks, I was looking for the right thing, but the syntax I was using to look was wrong.
This is exactly what I needed.

Ben