I have a game that uses this file structure:
GAME FOLDER
->data
->data->run.bat
I want to put a shortcut to run.bat
i
After making the shortcut as you have, set the following in Properties:
Target:
%comspec% /k "data\run.bat"
- Drop the
/k
if you don't want the prompt to stay open after you've run it.Start In:
%cd%\data
According to Microsoft, if you leave the 'Start In'
box empty, the script will run in the current working directory. I've tried this in Windows 7 and it appears to work just fine.
Source: http://support.microsoft.com/kb/283065
The method that proposed by 'leoj' does not allow passing parameters with spaces. Us it:
cmd.exe /v /c %CD:~0,2%"%CD:~2%\bat\bat\run.bat" "Par1-1 Par1-2" Par2
Which will be similar double quote written as in path
C:"\Program Files\anyProgram.exe" "Par1-1 Par1-2" Par2