NBAA wrote:w1lla wrote:
Code: Select all
SET CurrentDir=%~dp0
cd "E:\Program Files\ManiaPlanet"
"E:\Program Files\ManiaPlanet\ManiaPlanet.exe" /LmQuality=Fast
pause
This is based on my own system

What directory is "%~dp0" ?
In what directory do i have to be when i run this .bat file? ..\My Documents\ManiaPlanet\Maps ?
You should read some information about writing batches.
Open command line or enter cmd in the execute application field or in the explorer's folder bar.
Then e.g. do
help if
help for
help cmd
%0 is the path the batch is executed, %1 would be the first argument, %2 the second etc.
with the ~ operator you can do operations on the path.
%~d0 is the drive
%~p0 is the path
%~n0 is the filename
so %~dp0 would be drive and path of the batch.
You can place a shortcut to that batch anywhere and therefore run it from anywhere if you add the execution path in the shortcut.
But in the above batch, the set current dir is useless since it is not used anymore
Code: Select all
@echo off
cd "E:\Program Files\ManiaPlanet"
"E:\Program Files\ManiaPlanet\ManiaPlanet.exe" /LmQuality=Fast
pause
this would be enough.
and as soon as it runs fine, the pause also is redundant
