I have a game which, when launched through a command line like DOSBox.exe -c GAME.EXE -c exit will "eat" away the exit command that (DOSBox will not quit when the game is exited, same if I use -exit). It took me some time to track the cause to the start script of the game that is using an "@echo off" command. After this command execute, for some reasons passing -c exit on the DOSBox command line no longer works.
I’m pretty sure that this is also the cause of the issues in the following threads
https://www.vogons.org/viewtopic.php?f=31&t=8843
https://www.vogons.org/viewtopic.php?f=31&t=66560
Steps to reproduce:
test.bat file that contains the one line @echo off.DOSBox.exe -c "mount C ." -c "C:\TEST.BAT" -c exit (note, I tested this on Windows 10 with DOSBox 0.74-3, I don’t know if this can be reproduced on Linux and the command line might need some escaping there).What should happen:
DOSBox starts, executes the .bat file and then exits.
What actually happens:
DOSBox starts, executes the .bat file and then does not exit.
that would be correct.
you probably want
-c "call c:\test.bat"
But that is kinda how DOS works, not really a quirk of DOSBox
Thanks, I’m not sure I understand why this is expected but at least the workaround is already good.