This should be simple I just want dosbox to auto shutdown when I am done with the program
dosbox.exe name.exe -noconsole -exit does not work
dosbox.exe name.exe -exit does not work
name.exe -exit does not work
I am running windows 10
the name.exe runs fine but it will not shut down until i type exit in
Even a bat file with the word exit in does not work
I tried calling a bat file no help
What is wrong here?
steve
to exit from a started program you will have to use the [autoexec] section of the config file, add here as last command EXIT and it will close the shell proper after quitting the game.
of course this can't be in dos-box's autoexec.bat (in Z:) else it would shut down right after start.
the description in the manual is somewhat unprecise telling:
"-exit
DOSBox will close itself when the DOS application "name" ends."
i have to check this i don't use DOS-Box in this way i always use a game specific config file.
means whatever i pass as parameter it exits anyway because of "exit" in the autoexec section, but lemme see.
It seems it has absolutely no influence to that, if i remove the "exit" command from the autoexec section it won't close the started games shell.
but that's like i said nothing new to me it never worked since 15 years (or more).
BUT
it does it proper when i start dosbox in this way via a batch or in the console
by using no config file it will accept the option "-exit"
not very comfortable, ok to quick run a game but in this case you can drag and drop the proggy on the DOS-Box programs icon.
if you like (an you will like it) a proper nice appearance of the game you will need a .conf file and by using this the -exit option will be bypassed.
after this counter testing i assume you use a .conf file and if that is so add
EXIT
as last command in the autoexec section of the .conf file you use that will do the job.
it will behave pretty the same if it looks for the default config file i assume, use specific config files that's the most comfortable, most flexible and most user configurable way to run DOS-Box.
i even use them for test runs even when i later dislike the game, but i can't judge in a standard opened DOS-Box.
i.e for "Buzz Aldrin's Race into Space" (BARIS) the "auto" cycles setting is far to slow and on such a tiny window 320x200 i can't judge a game anyway.
obviousely love space sims, shooters anything space related 😀 i have to like it, it's a must for me.
I usually use DOSBox to run a text editor, but I also use it to prepare some .zip files to send to my boss. (Insert standard warning about DOSBox being for games.) My code gives a series of commands to DOSBox then exits. The command I run from the DBMS is (lightly edited):
"C:\Program Files (x86)\DosBox_MB6\dosbox.exe" c: -c "c:" -c "cd \cbs2dev" -c "pkzip ZIPNAME FILELIST" -c "exit" -noconsole
I could not get -exit to work either, but above has worked for years.
Quite interesting for what you use DOSBox Gene.
May i ask that is like i would start an emulated miggy to run Micro EMacs to edit in a complicated way a text.
Pardon me, maybe you need not to be observed.
Well ok i play MIDI files with an old DOS player even when any windows mediaplayer is much more comfortable.
Also what i wonder is that both of you use the command line instead of a special config file, it's imho far easier as to enter the tard in the commandline.
And it will always exit when the last comand in the autoexec is exit.
i imagine i would like to get a nice batch with some additional features, impossible with the commandline.
Ah pardon me i use DOSBox to play games that's rather unconventional 😉
Erm yes and i forgot there is this close button....
To your original Q, "it can't be" i mean ermpf i have a vice versa problem i would like to close a called batch with "EXIT /b" and probably a returned errorlevel but this really won't work and it always exits also the process where it was called from so it exits always DOSBox. (btw i even use win10 but this won't matter you work in a closed environment nothing from outside affects DOSBox, in general there isn't even a difference to it's internal behave in OSX or Linux).
So if you call a batch and there is exit at the end and the program you started via the batch didn't still runs or hangs it must exit.
While OK, i don't know how it will behave if you call the batch from the commandline, it is like i said not the recommended way or at least i don't recommend it based on my experiences.
Quite interesting for what you use DOSBox Gene.
May i ask that is like i would start an emulated miggy to run Micro EMacs to edit in a complicated way a text.
Pardon me, maybe you need not to be observed.
I like a WordStar-style editor. For me, it work a lot better than a GUI editor.
Also what i wonder is that both of you use the command line instead of a special config file, it's imho far easier as to enter the tard in the commandline.
And it will always exit when the last comand in the autoexec is exit.
i imagine i would like to get a nice batch with some additional features, impossible with the commandline.
I use a special config file for setting up my usual usage. For the special purpose zip, I use the command line. If I needed more, than I would have more than one menu choice to start DOSBox; I do not need the confusion as I use DOSBox for work and play.
It was just a thougt, yes indeed sometimes it's handy to use a default config and perform the rest with a batch or the commandline in the link
(recently i use more batch proggies because i can make it portable in this way and it don't depends on a given installation path as long as DOSBox and DOS programs are in the same root directory, i simply step back and in this way i can i.e. lauch the game/program even from a stick wherever that stick is plugged in to, furhter it will allow me to share my "special setups" with sound selection and some other user created stuff and you will only have to put the game/program in the proper dir and it will work on any PC as it works for me).
A problem which appeared to me now as well and a simple solution as well, just type the following to end your commandline in a link:
-c exit (instead of the mentioned "-exit")
e.g.
uses standard config, mounts drive of programs location as c:, starts proggie and terminates DOSBox after executing of.
But imho for such a simple use you can also drop the file on DOSBox and it does pretty the same.
What i wonder now is this program a pure commandline editor like meMacs was? Because if then it would probably exit right after start because it's a simply "enhanced" dos shell you open and not a standalone program, in such a case you would be grateful it don't exits.
I assume right now the option "-exit" is ment for the dos shell (hidden or not) which starts dosbox and not for dosbox itself, "-noconsole" only hides it "-exit" terminates the shell (console window, pardon me).
And pardon me for the comaprison to meMacs, but to me it was a sheer horror to edit via a commandline editor, but choices my vary
I took a brief look at "ced" which is such a commandline editor, imo "argh", sure once you are used to you are quicker with the shortcuts as with selecting from a menu, but it's still "argh" to me i don't like that, how many shortcuts of programs would i have to know to work on "phoenix"? a quite large and for sure confusing amount of (in fact i didn't even know all the shortcuts for "Phoenix" by myself, eh i'm just a lazy buttonpresser 😀. While i guess your reason could be similar you are used to and that makes it comfortable to you.
I didn't liked to question you, it's really upon you what you like or not.
"new doens't always equals to better"