Skip to content
⌘ NSIS Forum Archive

problem with icon file in CreateShortcut

2 posts

jtweather#

problem with icon file in CreateShortcut

Hi,

I am having a problem with the icon file in the command CreateShortcut.


CreateShortCut "$SMPROGRAMS\JTDesktop\JTDesktop.lnk" "$OUTDIR\JTDesktop.exe" "JTICONS.dll" 1 SW_SHOWNORMAL "" "Start JTDesktop"


When I type the above line of code I get an error message in the NSIS compiler stating that the icon index cannot be interpreted. I think I could have fixed the problem on my own, however, I don't know what file types I can use as the icon file. So the big question is what are the valid file types that I can use as the icon file in the commad CreateShortcut? Any help on this issue would be greatly appreciated.

Thanks,

jtweather
iceman_k#
You can use any valid windows icon file, including dlls.
The problem with your command is the syntax.
It should be:
CreateShortCut "$SMPROGRAMS\JTDesktop\JTDesktop.lnk" "$OUTDIR\JTDesktop.exe" "" "JTICONS.dll" 1 SW_SHOWNORMAL "" "Start JTDesktop"


Also, unless JTICONS.dll is in the system path, you should provide its full path.