First post, by swit
Hi,
I'm trying to create universal batch files for my games that will work in both windows and dos (inside dosbox). To run games from windows via batch files without adding DOSBox folder into each game I've decided to copy external batch file (AUTOEXEC.BAT) which is called after running dosbox. Sample batch file looks like this:
@echo offcd ..\DOSBoxcopy ..\GAMES\DUKE3D\!EXTRAS\AUTOEXEC.BAT /yclsdosbox -nogui -noconsole -conf dosbox.play.confexit
It works as intended in windows.
I'd like to use the same file also for dos. Here is my attempt in writing a proper batch file:
@echo offtasklist /FI "IMAGENAME eq dosbox.exe" 2>NUL | find /I /N "dosbox.exe">NULif "%ERRORLEVEL%"=="0" GOTO:DOSif "%ERRORLEVEL%"=="1" GOTO:WIN:WINcd ..\DOSBoxcopy ..\GAMES\DSJ210\!EXTRAS\AUTOEXEC.BAT /yclsdosbox -nogui -noconsole -conf dosbox.play.confexitGOTO:EOF:DOScd GAMES\DSJ210clsset DOS4G=quietDSJ.EXEexitGOTO:EOF
I will be grateful if someone could help me bugfixing it, because this one don't work neither in windows nor inside dosbox. Or maybe there is a simpler way to achieve it? The concept is simple: check if dosbox is running, if no - execute the normal commands like in the first batch; if yes - run the game.
Thanks in advance.