How to stop XP dos window closing

T

TC

How do i stop a dos window closing after the completion of commands. In NT &
98 there used to be a user option in properties (I think I remember) but not
in XP

Ideas ?

Thanks
 
R

Ron Bogart

In
TC said:
How do i stop a dos window closing after the completion of commands.
In NT & 98 there used to be a user option in properties (I think I
remember) but not in XP

Ideas ?

Thanks

Start - Run - CMD.exe. You will have the command window open until you type
exit or click on the X to close.
 
T

TC

Sure - opening a cmd.exe is no problem, but it involves typing. But I what I
want a shotcut to a bat file of a cmd file in which a netstat commands is
written. One click on a shortcut and the window opens and runs the netstat
and then remains open displaying the info - can't see a way to do this in
the new inproved windows
 
R

Ron Bogart

In
TC said:
Sure - opening a cmd.exe is no problem, but it involves typing. But I
what I want a shotcut to a bat file of a cmd file in which a netstat
commands is written. One click on a shortcut and the window opens and
runs the netstat and then remains open displaying the info - can't
see a way to do this in the new inproved windows

You can open a command window and type cmd /? and see all of the options. A
very brief view is listed below.

I would use "cmd.exe /K netstat" without the quotes. Works rather well for
me. YMMV

c:\>cmd /?
Starts a new instance of the Windows XP command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]

/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
/S Modifies the treatment of string after /C or /K (see below)
/Q Turns echo off
/D Disable execution of AutoRun commands from registry (see below)
/A Causes the output of internal commands to a pipe or file to be ANSI
/U Causes the output of internal commands to a pipe or file to be
Unicode
/T:fg Sets the foreground/background colors (see COLOR /? for more info)
/E:ON Enable command extensions (see below)
/E:OFF Disable command extensions (see below)
/F:ON Enable file and directory name completion characters (see below)
/F:OFF Disable file and directory name completion characters (see below)
/V:ON Enable delayed environment variable expansion using ! as the
delimiter. For example, /V:ON would allow !var! to expand the
variable var at execution time. The var syntax expands variables
at input time, which is quite a different thing when inside of a FOR
loop.
/V:OFF Disable delayed environment expansion.

Note that multiple commands separated by the command separator '&&'
are accepted for string if surrounded by quotes. Also, for compatibility
reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the
same as /C. Any other switches are ignored.
 
T

Torgeir Bakken \(MVP\)

TC said:
Sure - opening a cmd.exe is no problem, but it involves typing. But I what I
want a shotcut to a bat file of a cmd file in which a netstat commands is
written. One click on a shortcut and the window opens and runs the netstat
and then remains open displaying the info - can't see a way to do this in
the new inproved windows
Hi

In the bat file, add a pause command at the bottom, like this:


--------------------8<----------------------
netstat.exe
pause
--------------------8<----------------------
 

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