bambou51
17th January 2007 09:11 UTC
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"
Anders
17th January 2007 13:32 UTC
call SetOutPath with the path you want before CreateShortCut
bambou51
17th January 2007 13:56 UTC
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...
AlabamaPaul
17th January 2007 15:41 UTC
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"'
Red Wine
17th January 2007 16:10 UTC
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