how to run DOSBox using the default windows command line, (without opening it in a new window), editing the source code of DOSBox is a solution, but i want to know if there is no other solution before rebuilding DOSBox.

else

is there any other application that can run 16 bit command line application in CMD.

i tried DOSBox.exe -nonconsole but it is not what i am searching for. tried ScummVM and D-Box without results.

migrated from stackoverflow.com Apr 17 '15 at 16:19

This question came from our site for professional and enthusiast programmers.

  • For an app to run 16-bit command line EXEs on x64 Windows in cmd, it would have to run the app, capture the output and redirect it somehow to cmd. I don't see the point. Use x86 Windows instead if it has to be run via cmd. – Karan Apr 18 '15 at 0:36

I don't know whether the answer will serve you. At least, I found it is possible to start DOSBox, execute commands, and exit it. This allows me to run automated tests on DOSBox via Travis CI. There will still be a window though, and it does not propagate an exit code to the caller.

The command would be as follows:

dosbox exit -c [your_command_here] >>log.txt" -noconsole -exit

For this to work, you have to have a file called exit in the current directory (because exit is run last, and expected to be an external command).

I use log.txt to get feedback from the Dos program.

To my knowledge, it is not possible to run DOSBox without a window. It would be nice if it returned the exit code of its command shell. This should be easy to implement, I think, but would require a source change.

I can't upvote yet but I do think this is a useful question, as DOSBox can be used for testing in a 16-bit environment. In that sense, the question would be suitable for StackOverlow, actually.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.