MajinSephiroth
27th March 2007 23:21 UTC
Start Menu Shortcut
I'm having a problem with this but I cannot seem to find the solution. When I check the start menu .lnk file I can see that the target specified is correct, but not the "Start in" part.
What happens:
Target - "C:\Program Files\myCompany\gameFolder\myGame.exe"
Start in - "C:\Program Files\myCompany\"
What I need it to do:
Target - "C:\Program Files\myCompany\gameFolder\myGame.exe"
Start in - "C:\Program Files\myCompany\gameFolder\"
I'm assuming it's a parameter in the CreateShortCut command for NSIS, unfortunately I can't seem to find which one.
Currently I'm using a CreateShortCut like this:
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\myGame.lnk" "$INSTDIR\gameFolder\myGame.exe"
kichik
27th March 2007 23:27 UTC
Use SetOutPath to set the working directory before using CreateShortcut. The working directory is used for the "start in" directory of the shortcut.
MajinSephiroth
27th March 2007 23:34 UTC
Thought about that and tried that, but here's the funny part. It ended up creating "another" gameFolder. So now the directory structure is: "\myCompany\gameFolder\gameFolder\"
When I am choosing which file to compile in the installer I am using:
File /r "gameFolder"
kichik
27th March 2007 23:38 UTC
Then you haven't used SetOutPath correctly. Use it on the exact absolute path where you want "Start in" to be. Usually, it'd just be $INSTDIR.
MajinSephiroth
27th March 2007 23:43 UTC
I had it as:
SetOutPath "$INSTDIR\gameFolder"
when it added that extra folder in the directory structure, but I do have the setoutpath right before my file command. Is that why?
Should I put the SetOutPath after the File?
kichik
27th March 2007 23:50 UTC
Use File /r "gameFolder\*.*" instead and it'll extract all the files in gameFolder and won't create the folder itself. The folder is already created by your new SetOutPath command.
MajinSephiroth
28th March 2007 07:29 UTC
Oh I see, thanks a lot. That helped.