Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an icon shortcut with NSIS?

Tags:

jar

nsis

I'd like to create an icon-shortcut for my jar file with NSIS I've tried so, but after it doesn't display the icon I would to change.

; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
 CreateShortCut "$DESKTOP\Brio Gate.lnk" "$INSTDIR\BrioGate.jar" "..\..\Users\Foo\Desktop\ico.ico,0"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Where do I wrong? Thanks!

like image 566
user1197919 Avatar asked Feb 16 '12 18:02

user1197919


1 Answers

You should really provide the full path and the path and index are two separate parameters, also, skipped parameters must be empty, you cannot just leave them out:

CreateShortCut "$DESKTOP\Brio Gate.lnk" "$INSTDIR\BrioGate.jar" "" "$INSTDIR\myicon.ico" 0
like image 184
Anders Avatar answered Oct 19 '22 07:10

Anders