DOS window disappears

A

anon

When I try to execute a DOS program or even something like a 'ping' the DOS
window closes immediately upon termination of execution.

Is there any way to keep the DOS window open?
 
Q

q_q_anonymous

anon said:
When I try to execute a DOS program or even something like a 'ping' the DOS
window closes immediately upon termination of execution.

Is there any way to keep the DOS window open?

cmd /k ping www.google.com

for DOS Programs accessed by clicking an icon. right clicking the icon
and clicking properties, should give some option somewhere to keep it
open. cmd /k might work for them too.
 
A

anon

cmd /k ping www.google.com

for DOS Programs accessed by clicking an icon. right clicking the icon
and clicking properties, should give some option somewhere to keep it
open. cmd /k might work for them too.

***
That is OK for the icon, but if I double click on a program icon (directly
in the program folder) there is no shortcut option - and if I 'run from the
start icon' there is no shortcut.

If I 'run' a batch file - same thing.

Any other suggestions?
***
 
Q

q_q_anonymous

anon said:
***
That is OK for the icon, but if I double click on a program icon (directly
in the program folder) there is no shortcut option - and if I 'run from the
start icon' there is no shortcut.

If I 'run' a batch file - same thing.

Any other suggestions?
***

interesting problem. I see it too.

For start..run you're ok 'cos you've got cmd /k
For shortcuts, you're ok, you got /k (I see no checkbox)

But for the program icon, you can't tell it to run with /k.

So you're not screwed. But it's not convenient.

Maybe TweakXP or TweakUI or whatever will have something. There may be
a way within windows though.
 
R

Richard in AZ

If you run a DOS command line from the RUN window, the DOS window closes as soon as it has finished.
If you want the window to remain open, type "cmd" into run to first open the DOS window. Then type
in your DOS command.
If you want to use a BAT file or something like that, add a line for the "cmd" instruction.

:
: : >
: > anon wrote:
: >> When I try to execute a DOS program or even something like a 'ping' the
: >> DOS
: >> window closes immediately upon termination of execution.
: >>
: >> Is there any way to keep the DOS window open?
: >
: > cmd /k ping www.google.com
: >
: > for DOS Programs accessed by clicking an icon. right clicking the icon
: > and clicking properties, should give some option somewhere to keep it
: > open. cmd /k might work for them too.
: >
:
: ***
: That is OK for the icon, but if I double click on a program icon (directly
: in the program folder) there is no shortcut option - and if I 'run from the
: start icon' there is no shortcut.
:
: If I 'run' a batch file - same thing.
:
: Any other suggestions?
: ***
:
 
A

anon

Richard in AZ said:
If you run a DOS command line from the RUN window, the DOS window closes
as soon as it has finished.
If you want the window to remain open, type "cmd" into run to first open
the DOS window. Then type
in your DOS command.

***
That worked, thanks.
**
If you want to use a BAT file or something like that, add a line for the
"cmd" instruction.

***
Tried adding a cmd line in the batch file and all it did was to open a DOS
window and freeze there waiting for MY to write a command - it did not just
execute the batch file.
***
 
A

anon

"David Candy" <.> wrote in message
In a bat file it is easier to have Pause as the last line.

**
That did the trick - and adding exit after the pause closes the window after
pressing a key.

Thanks
***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top