Stop Automatic closure of console windows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having the problem of having any console windows and dos commands that
automatically close after they finish the execution and I cannot see the
results of the windows. Is there any windows setting that can turn the
function off?

Thanks in advance
 
Vester said:
I am having the problem of having any console windows and dos commands that
automatically close after they finish the execution and I cannot see the
results of the windows. Is there any windows setting that can turn the
function off?

Thanks in advance

You can either open the console window first (type CMD at RUN) or put
your DOS commands into a batch file that terminates with a pause.
 
The DOS command outputs can now be read so thank you for that.

However with some of the console programs that are console executables I
have made using C++ do not work when running them through the command prompt,
and typing the path in the Run dialog results in the the program
automatically closing once its completed its execution.

Is there any windows setting or some sort of registry modification or
something that make these console windows all close manually?
 
Vester said:
The DOS command outputs can now be read so thank you for that.

However with some of the console programs that are console executables I
have made using C++ do not work when running them through the command prompt,
and typing the path in the Run dialog results in the the program
automatically closing once its completed its execution.

Is there any windows setting or some sort of registry modification or
something that make these console windows all close manually?

I've never seen or heard of such a thing, or I would have suggested it
the first time around.

Since you wrote the console executable then I think it's up to you to
handle how the program terminates. You may wish to give it a mini
command shell so that it just sits there waiting new input until a close
command (e.g. q=quit) is issued.
 
Vester said:
The DOS command outputs can now be read so thank you for that.

However with some of the console programs that are console executables I
have made using C++ do not work when running them through the command prompt,
and typing the path in the Run dialog results in the the program
automatically closing once its completed its execution.

What is preventing the application from running through the command prompt? Console applications
should run without problem.
Is there any windows setting or some sort of registry modification or
something that make these console windows all close manually?

As was previously suggested, open the console window first (using Start -> Run, cmd [Enter]), and
then executing
your C++ program from the actual console window.



--
 
Vester said:
I am having the problem of having any console windows and dos commands that
automatically close after they finish the execution and I cannot see the
results of the windows. Is there any windows setting that can turn the
function off?

Thanks in advance

cmd /k yourprogram your parameters
 
Back
Top