rbalhorn
15th September 2005 17:31 UTC
parameter
Ok I am trying to make a short cut. I can pass any shortcut parameter with a + or - in front of it but I cannot have any spaces with the parameter.
Ie:
CreateShortCut "$DESKTOP\BF2C.lnk" "$INSTDIR\..\..BF2.exe" +modPath mods/BF2C "$INSTDIR\BF2C.ico"
does not compile
but
CreateShortCut "$DESKTOP\BF2C.lnk" "$INSTDIR\..\..BF2.exe" +fullscreen +menu +modpath "$INSTDIR\BF2C.ico"
works just fine.
Anyway to add in the mods/BF2C section? Is the a character to add for spaces like a % or something?
Thanks for any help.
Yathosho
15th September 2005 17:39 UTC
use quotes
Afrow UK
15th September 2005 18:21 UTC
Put quotes around +fullscreen +menu +modpath
-Stu
rbalhorn
15th September 2005 19:04 UTC
lol I knew it would be something simple (and make me look dumb).
Thanks for your help.
rbalhorn
16th September 2005 20:41 UTC
Ok another related question. I can create the link the target and parameters work but it needs the correct "Start in" to be different from the $INSTDIR. Is there a way to do that?
The other option was to have a lnk file in the installer copy to the $DESKTOP the shortcut works but it doesnt use the ico file.
Thanks again for any help.
kichik
17th September 2005 09:04 UTC
SetOutPath sets the "Start in" directory for shortcuts.
rbalhorn
29th September 2005 17:44 UTC
Got around to another version and a time to fix this bug. The problem I am getting is that I still cant set a proper "Starts In" path.
SetOutPath "$INSTDIR\..\..\"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\BF2C.lnk" "$INSTDIR\..\..\BF2.exe" "+menu 1 +fullscreen 1 +modPath mods/BF2C" "$INSTDIR\BF2C.ico"
CreateShortCut "$DESKTOP\BF2C.lnk" "$INSTDIR\..\..\BF2.exe" "+menu 1 +fullscreen 1 +modPath mods/BF2C" "$INSTDIR\BF2C.ico"
This will give me
Starts In:
"C:\Program Files\EA GAMES\Battlefield 2\mods\BF2C\..\.."
Any way to fix this?
Thanks.
Takhir
29th September 2005 17:54 UTC
I used something like this (long ago :) )
SetOutPath "$INSTDIR"
SetOutPath ".."
SetOutPath ".."
rbalhorn
29th September 2005 17:56 UTC
na that doesnt work either. It just makes the "Starts In" just ".."
Thanks for helping though.
Takhir
30th September 2005 06:48 UTC
wiki page Repair path names with ../
rbalhorn
7th October 2005 23:38 UTC
that completely lost me :(. Sorry, Is there one in english?
Afrow UK
8th October 2005 10:27 UTC
StrCpy $INSTDIR $EXEDIR
DetailPrint $INSTDIR # C:\Program Files\NSIS\Projects\Testing
GetFullPathName $R0 "$INSTDIR\..\.."
DetailPrint $R0 # C:\Program Files\NSIS
SetOutPath $R0
-Stu