|
|
#1 |
|
Junior Member
Join Date: Mar 2007
Posts: 6
|
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" |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Use SetOutPath to set the working directory before using CreateShortcut. The working directory is used for the "start in" directory of the shortcut.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2007
Posts: 6
|
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" |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
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.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2007
Posts: 6
|
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? |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
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.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2007
Posts: 6
|
Oh I see, thanks a lot. That helped.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|