VOGONS


First post, by orangekid

User metadata
Rank Newbie
Rank
Newbie

how do i create a batch file to open a program within dosbox without first having to open dosbox? e.g.

c:\program files\dosbox\dosbox.exe
c:\games\game.exe

this makes it first open dosbox, then after dosbox closes it opens the game in windows command program instead of dosbox. is there a better paramater to use such as

c:\program files\dosbox\dosbox.exe - run c:\games\game.exe
exit

or something i can do to where I just open one file and it launches the game in dosbox then closes dosbox when I close the game?

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

read the readme of dosbox
it explains exactly what you want in the commandline parameters section of dosbox

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 3, by orangekid

User metadata
Rank Newbie
Rank
Newbie

I couldn't find exactly what i was looking for. Can you copy paste the answer or guide me. sorry if this seems to obvious.

Reply 3 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

sure:

An overview of the command line options you can give to DOSBox.
Windows Users must open cmd.exe or command.com or edit the shortcut to
dosbox.exe for this.
The options are valid for all operating systems unless noted in the option
description:

dosbox [name] [-exit] [-c command] [-fullscreen] [-conf congfigfile]
[-lang languagefile] [-machine machinetype] [-noconsole]
[-startmapper] [-noautoexec] [-securemode]
[-scaler scaler | -forcescaler scaler]

dosbox -version

name
If "name" is a directory it will mount that as the C: drive.
If "name" is an executable it will mount the directory of "name"
as the C: drive and execute "name".

-exit
DOSBox will close itself when the DOS application "name" ends.

-c command
Runs the specified command before running "name". Multiple commands
can be specified. Each command should start with "-c" though.
A command can be: an Internal Program, a DOS command or an executable
on a mounted drive.

-fullscreen
Starts DOSBox in fullscreen mode.

-conf configfile
Start DOSBox with the options specified in "configfile".
Multiple -conf options may be present.
See Section 11 for more details.

-lang languagefile
Start DOSBox using the language specified in "languagefile".

-machine machinetype
Setup DOSBox to emulate a specific type of machine. Valid choices are:
hercules, cga, pcjr, tandy, vga (default) as well as the svga chipsets
listed in the help of the DOSBox configuration file. The machinetype
affects both the videocard and the available soundcards.

-noconsole (Windows Only)
Start DOSBox without showing the console window. Output will
be redirected to stdout.txt and stderr.txt

-startmapper
Enter the keymapper directly on startup. Useful for people with
keyboard problems.
-noautoexec
Skips the [autoexec] section of the loaded configuration file.

-securemode
Same as -noautoexec, but adds config.com -securemode at the
bottom of AUTOEXEC.BAT (which in turn disables any changes to how
the drives are mounted inside DOSBox).

-scaler scaler
Show last 28 lines
        Uses the scaler specified by "scaler". See the DOSBox configuration
file for the available scalers.

-forcescaler scaler
Similar to the -scaler parameter, but tries to force usage of
the specified scaler even if it might not fit.

-version
output version information and exit. Useful for frontends.

Note: If a name/command/configfile/languagefile contains a space, put
the whole name/command/configfile/languagefile between quotes
("command or file name"). If you need to use quotes within quotes
(most likely with -c and mount):
Windows and OS/2 users can use single quotes inside the double quotes.
Other people should be able to use escaped double quotes inside the
double quotes.
Windows: -c "mount c 'c:\program files\'"
Linux: -c "mount c \"/tmp/name with space\""

For example (Windows):

dosbox c:\atlantis\atlantis.exe -c "MOUNT D C:\SAVES"
This mounts c:\atlantis as c:\ and runs atlantis.exe.
Before it does that it would first mount C:\SAVES as the D drive.

In Windows, you can also drag directories/files onto the DOSBox executable.

To help you even more. look at the "name" and "-exit" description

Water flows down the stream
How to ask questions the smart way!