Archive: Problem using createShortcut


Problem using createShortcut
When I use the createShortcut command the shortcut that is created is not working because of a wrong initialisation of the field "Start in" (in french it is "Démarrer dans" - second field of the sortcut property dialog).
How to force this field content to a specific path ?

Here is how I create a shortcut :
SetOutPath "$my_inst_path"
CreateDirectory "$SMPROGRAMS\$SHORTCUT_FOLDER"
CreateShortCut "$SMPROGRAMS\$SHORTCUT_FOLDER\my_link.lnk" "$my_inst_path\my_exe.exe"


call SetOutPath with the path you want before CreateShortCut


that's already what I am doing in my code.
It is like I have the content of $INSTDIR in my "Start in" field even when using SetOutPath "$my_inst_path" just before...


Re: Problem using createShortcut
If the path has spaces, the problem might be that you need to enclose the executable with double quotes. Try something like this ...

CreateShortCut "$SMPROGRAMS\$SHORTCUT_FOLDER\my_link.lnk" '"$my_inst_path\my_exe.exe"'

I believe it might help you resolve this issue, if you try to debug it with shell link plugin,

http://nsis.sourceforge.net/ShellLink_plug-in