Automate opening of DOS program under DOSBox / Windows 7

I use DOSBox and it works pretty well, but each time I want to run the application I have to launch DOSBox, then type:

mount c c:\path\to\app
c:
cd app
app.exe

Can I somehow automate the process, like with a batch file or something?

Or are there other DOS emulators that let you launch programs easier?

2 Answers

DOSBox has this feature itself, defined on the configuration file:

You can save yourself some time by having DOSBox automatically MOUNT your folders and change the drive to C:. In original DOS based operating systems a file called AUTOEXEC.BAT contained any commands that the user wanted executed every time the computer booted up. This functionality is simulated by the [autoexec] section of the dosbox.conf file.

I have done this in VB using:

dos32Proc = Diagnostics.Process.Start("C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe", " -c mrpd");
dos32Proc.WaitforExit()

mrpd is a bat file, and will execute several lines in the DOSBOX command prompt and finish with the exit command. You will also need a mount command to ensure you are in the correct directory for the command prompt.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like