How to run commands at startup in DOSBox

DOSBox is an emulator that allows the execution of legacy DOS programs within Windows or other operating systems. The reason for its existence is simple: current versions of Windows aren’t completely compatible with older DOS applications developed in the ’80s and ’90s, so people who need to run those will either have to run them on an old machine or use an emulator.

In order to run programs, however, the user is required to mount at least a folder as a drive using the command

mount x YourPath

Where YourPath is the full path of the folder one intends to mount and x the drive letter the folder will be mounted at. So, for example, running

mount c c:/dosbox

will mount the dosbox folder on Windows’ C drive as the C drive of DOSBox.

As onemay imagine, having to type the command at every execution of DOSBox gets old really fast. There must be a better way of doing the initial setup and thankfully there is.

Editing the dosbox.conf file

DOSBox uses a file named dosbox.conf to store information about its configuration. It contains a lot of options, but we’re only interested in the section titled [autoexec].

To open dosbox.conf, simply open the Start menu and open DOSBox 0.74 Options under the DOSBox folder. Your version number may differ from mine.

At the very bottom of the file you’ll find a section named [autoexec]. You may insert all the commands you wish to run whenever DOSBox is launched, like this:

Now, whenever you run DOSBox, the program will run automatically those commands at startup.

Automatic execution of commands at startup in DOSBox.

About Andrea Luciano Damico 109 Articles
Andrea Luciano Damico is a freelance translator from Italy. Among his interests are linguistics, technology, video games, and generally being a chill guy. He runs Let's and