HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Software Newsgroups > Windows XP

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-08-2007, 12:23 PM
KG
 
Posts: n/a
Default Dos window automaticlly closes after command??

I have noticed when a dos command is run the DOS window closes after the command is run. The
window closes after either a bat file is run or a command is run from the program, run, command
line. Any idea how to keep the window open so I may see the command results?? Thank you in
advance for any assistance.
*****************
Thank You kGbAT@msbx.net

To reply to this email please remove the AT
after the kGb in the reply to address as shown above.
Reply With Quote
Sponsored Links
  #2  
Old 04-08-2007, 12:23 PM
Gordon
 
Posts: n/a
Default Re: Dos window automaticlly closes after command??

KG wrote:
> I have noticed when a dos command is run the DOS window closes after
> the command is run. The window closes after either a bat file is run
> or a command is run from the program, run, command line. Any idea
> how to keep the window open so I may see the command results?? Thank
> you in advance for any assistance. *****************


Add a "pause" command to the end of the bat file.


Reply With Quote
  #3  
Old 04-08-2007, 01:02 PM
Pegasus \(MVP\)
 
Posts: n/a
Default Re: Dos window automaticlly closes after command??


"KG" <kgstAT@msbx.net> wrote in message
newsqhh13drrduutal7j3s3jkdpd2qnhopse3@4ax.com...
> I have noticed when a dos command is run the DOS window closes after the

command is run. The
> window closes after either a bat file is run or a command is run from the

program, run, command
> line. Any idea how to keep the window open so I may see the command

results?? Thank you in
> advance for any assistance.
> *****************
> Thank You kGbAT@msbx.net
>
> To reply to this email please remove the AT
> after the kGb in the reply to address as shown above.


You can adapt Gordon's suggestion to the "Run" box too.
Instead typing the command directly, such as
ping www.yahoo.com

run it through your own batch file like so:
kg ping www.yahoo.com

kg.bat should reside in the Windows folder and contain
these lines:
@echo off
%1 %2 %3 %4 %5 %6 %7 %8 %9
pause

A better alternative would be to run your commands from
a proper Command Prompt.


Reply With Quote
  #4  
Old 04-08-2007, 06:11 PM
Wesley Vogel
 
Posts: n/a
Default Re: Dos window automaticlly closes after command??

Also cmd /k

/K Carries out the command specified by string but remains

cmd /k whatever_command I.e. cmd /k start iexplore

cmd /k start iexplore in Start | Run will start cmd.exe, start Internet
Explorer (iexplore.exe) and cmd.exe will stay open.

For Pause HELP, paste the following line into Start | Run and click OK...

hh ntcmds.chm::/pause.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In newsqhh13drrduutal7j3s3jkdpd2qnhopse3@4ax.com,
KG <kgstAT@msbx.net> hunted and pecked:
> I have noticed when a dos command is run the DOS window closes after the
> command is run. The window closes after either a bat file is run or a
> command is run from the program, run, command line. Any idea how to keep
> the window open so I may see the command results?? Thank you in advance
> for any assistance. *****************
> Thank You kGbAT@msbx.net
>
> To reply to this email please remove the AT
> after the kGb in the reply to address as shown above.


Reply With Quote
Sponsored Links
Fix your Windows Problems - FAST.
FREE Safe Scan Registry Check. Locate & Fix Errors in Minutes!
Reply


Thread Tools
Display Modes



All times are GMT. The time now is 02:22 PM.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger