Illegal command -exit ?

General information and assistance with DOSBox.

Illegal command -exit ?

Postby BuckoA51 » 2017-11-25 @ 11:35

Probably going to kick myself this has to be something obvious but, I am trying to use the -exit parameter to make DOSBox close as soon as I'm done playing my game, but instead of that I'm just getting "Illegal command -exit" on the DOSBox command line, what's wrong with my syntax? Here's the line:-

"D:\Emulators\DOSBOX-074-c\DOSBox.exe" -conf "%LOCALAPPDATA%\DOSBox\dosbox-0.74-RallyChamp.conf" -exit

Posts: 203
Joined: 2012-11-04 @ 16:28

Re: Illegal command -exit ?

Postby Osprey » 2017-11-25 @ 20:32

I'm not sure why that doesn't work for you, since it works for me. I don't declare custom .confs on my command line, though, so it probably has to do with that. GOG games use custom .confs, and I see that they end their command lines with "-c exit" (which just sends the regular exit command to DOSBox), so it seems that they couldn't get -exit to work, either. You might just use the workaround that they use or, of course, add exit to your [autoexec], assuming that you're launching the game from there, too.
Last edited by Osprey on 2017-11-27 @ 18:17, edited 2 times in total.
Posts: 257
Joined: 2017-7-27 @ 21:32

Re: Illegal command -exit ?

Postby collector » 2017-11-25 @ 23:36

What is in your autoexec section of that conf?
User avatar
Posts: 4233
Joined: 2003-1-15 @ 10:39

Re: Illegal command -exit ?

Postby BuckoA51 » 2017-11-26 @ 19:36

Lines as follows:-

# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
mount c D:\ROMs\DOS
mount d E:\ -t cdrom -usecd 0 -ioctl

I will give -c exit a go too thanks.
Posts: 203
Joined: 2012-11-04 @ 16:28

Re: Illegal command -exit ?

Postby Qbix » 2017-11-27 @ 10:42

use "call rally.bat" instead of "rally.bat"
Water flows down the stream
How to ask questions the smart way!
User avatar
DOSBox Author
Posts: 10652
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Return to DOSBox General

Who is online

Users browsing this forum: No registered users and 1 guest