VOGONS

Common searches


First post, by crackshot91

User metadata
Rank Newbie
Rank
Newbie

Hello. I have created two shortcuts for dosbox which launch two separate games (Arena and Daggerfall). All is well except for one thing: I can't get the "-exit" argument to work. Here's what the shortcuts look like:

C:\DOSBox-0.74\DOSBox.exe -conf "C:\DOSBox-0.74\Games\ARENA\dosbox-0.74-ARENA.conf" -noconsole -exit

C:\DOSBox-0.74\DOSBox.exe -conf "C:\DOSBox-0.74\Games\DAGGER\dosbox-0.74-DAGGER.conf" -noconsole -exit

I have also tried placing the "-exit" argument before "-noconsole" and "-conf". It still doesn't work. What am I doing wrong?

Reply 1 of 6, by collector

User metadata
Rank l33t
Rank
l33t

If the executable you have in your autoexec section is a batch file, try using call to invoke it, i.e.

[autoexec]
call mybatch.bat

or whatever the batch file is named. FYI, you can also put the exit command at the end of the autoexec section.

Reply 3 of 6, by Fullscreen

User metadata
Rank Newbie
Rank
Newbie

If "-exit" doesn't work, try "-c exit" instead. In that case, the "exit" command will be executed after running AUTOEXEC.BAT, effectively exiting Dosbox. If you are listing several commands with the -c flag, make sure that the "exit" one is the last one you list, since any other ones, appearing after "-c exit", will be skipped.

Reply 4 of 6, by crackshot91

User metadata
Rank Newbie
Rank
Newbie

"-c exit" seems to work for daggerfall, but not arena.

I have them both set up the same.

Here's my [autoexec] for arena:

[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
@ECHO OFF
mount C "."
mount d "." -t cdrom
c:
cls
Arena.bat
Exit

And for daggerfall:

[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
@ECHO OFF
mount C "."
c:
cls
fall.exe z.cfg
Exit

So it's working for Daggerfall, but not Arena. Any idea why? And thanks for the help so far. 😀

EDIT: I just saw your post, collector. putting "call" before "Arena.bat" worked! Thanks so much!

Reply 5 of 6, by Norton Commander

User metadata
Rank Member
Rank
Member

If you put the DOSBOX executable in quotes you should have no problem with the -exit command (lots of trial and error to figure that out).

For example, I have a batch file to start Lemmings and here is the Windows shortcut I use which also closes DOSBOX when I exit Lemmings:

"C:\Program Files\DOSBox-0.74\dosbox.exe"  -conf lemmings.conf -exit  "C:\Program Files\DOSBox-0.74\lemmings\lemmings.bat"

I have similar shortcuts for Raptor call of the shadows and Wing Commander.

If your game's executable requires command line switches i.e:

GAME.EXE -mouse -graphics -options -blahblah

then use a batch file with those switches. If your game doesn't require any command line options you can just create a shortcut to the EXE file:

"C:\Program Files\DOSBox-0.74\dosbox.exe"  -conf game.conf -exit  "C:\Program Files\DOSBox-0.74\game\game.exe"

I have tried both ways and DOSBOX closes when I exit the games.

the -conf switch is required if you want to load separate DOSBOX config files for each game. If your game doesn't work with the default DOSBOX settings you should definitely create its own conf file.