Skip to content
⌘ NSIS Forum Archive

Desktop Shortcut with icon

6 posts

tux_85#

Desktop Shortcut with icon

Hello,

I want to create a shortcut with a personal icon on the desktop. I create the shortcut with these code:

CreateShortCut "$DESKTOP\name.lnk" "$INSTDIR\path"
But how can I decide the icon of the shortcut???


Thanks for helping!
Red Wine#
Nobody wants to read the docs nowadays?

pospec#
Originally posted by Red Wine
Nobody wants to read the docs nowadays?
IMHO doesn't 🙁 Forum is full of repeating posts. Maybe some cleanup would be helpful...
tux_85#
I read the manuel but it does not work. I think I made any mistakes with the parameters.

Can you give me an expamle who I must use the parameters to create a shortcut with an icon/symbol???
LoRd_MuldeR#
This was copied from the docs:

CreateShortCut "$SMPROGRAMS\My Company\My Program.lnk" "$INSTDIR\My Program.exe" "some command line parameters" "$INSTDIR\My Program.exe" 2
The 4th argument is the icon file, the 5th argument is the index of the icon.
If you don't need the 3rd argument, use a "", but you cannot leave it out!

Yes, it seems people neither read NSIS.chm nor use the "Examples" folder 😢