Discussion Locked

Preventing closing a MS-DOS box?

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How can an a MS-DOS box be prevented from closing itself when exiting in Windows NT?
The box is started with a shortcut on the desktop and launches an exe-file (not the MSDOS or Command prompt!).

4 replies

by bart_lagast

running a command-line application (like ping.exe) from a shortcut on the desktop closes automaticaly the dosbox on exiting the application. So the output is not available any more (redirecting the output to a file is a possible, but not very attractive possibility).

by skutts

instead of typing
ping 192.168.2.1
try
command /k ping 192.168.2.1

the /k switch forces the command interpreter to keep running

or you could make a batch file called png.bat for example:

@echo off
command /k ping %1

the %1 is the variable, so typing
png 192.168.2.1

would actually run

command /k ping 192.168.2.1

or png skutts

would run

command /k ping skutts

get the idea?

skutts

by bart_lagast

in the comment above ping.exe is just an example. The question is in general: for all programs started on the command-line (command programs like find, expand, chkdsk, ... but also a command-line compiler, interpreter, ect...) the window (dosbox) disappears when the executed command has finished.

This discussion is closed to new replies.