Archive: ShortCut whith icon


ShortCut whith icon
I need a section which create a ShortCut with an icon.

My code is like this :

Section "Start Menu Shortcuts"
CreateShortCut "$DESKTOP\${NAME_LINK}.lnk" "${URL_LINK}" "" "icon.ico"
SectionEnd



If I give the .exe to another person, he don't see the icon because it isn't on his computer. (my file icon.ico is'nt include in the .exe)

How can I include the file icon.ico in my .exe ?

Thanks a lot !

SetOutPath $INSTDIR
File "icon.ico"
CreateShortcut "$DESKTOP\${NAME_LINK}.lnk" "${URL_LINK}" "" "$INSTDIR\icon.ico"


Thanks !!!


An other little question. In this instruction :

${If} ${URL} != ""
[....]
${EndIf}


I have this error :

!insertmacro: _If
!insertmacro: macro "_If" requires 4 parameter(s), passed 3!


How can I write the condition "If var URL is empty" ?
URL is always declare, but sometimes empty :

!define URL_APPLICATION ""


Thanks !

If URL is not defined, the precompiler will enumerate it to nothing, that's why If only got three parameters.

Either use (if you want compiletime enumeration):
!ifdef URL
[....]
!endif

Or use (if you want runtime enumeration):
${If} "${URL}" != ""
[....]
${EndIf}