|
|
#1 |
|
Chief of Naval Operations
![]() ![]() |
creating .bat files...
Hey, I'm trying to make a bat file that runs a script (which has some output). The problem is that once it finishes executing (not from cmd prompt, but using explorer), the cmd window closes right after it's done...
So, Does anyone remember how to get the window to stay open after it finishes executing? |
|
|
|
|
|
#2 |
|
Chief of Naval Operations
![]() ![]() Join Date: Feb 2001
Posts: 11,733
|
Add a line at the end that says:
pause
__________________
stay low... keep moving... |
|
|
|
|
|
#3 |
|
turducken all the time
![]() ![]() ![]() ![]() ![]() |
I think there's a "close on finish" checkbox also, at least in Win9x.
__________________
Shall we buy a new guitar? Shall we drive a more powerful car? |
|
|
|
|
|
#4 |
|
Chief of Naval Operations
![]() ![]() |
pause doesn't seem to work
![]() I'm on windows NT.....does that make a difference? |
|
|
|
|
|
#5 | |
|
Chief of Naval Operations
![]() ![]() Join Date: Feb 2001
Posts: 11,733
|
Quote:
<run the exe> pause Once the exe finishes, the DOS window sits there saying "Press any key to continue . . ." |
|
|
|
|
|
|
#6 |
|
Fleet Admiral
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2000
Location: 742 Evergreen Terrace, Springfield USA
Posts: 9,276
|
well you could always just run it from the command prompt instead of double clicking on it.
__________________
|
|
|
|
|
|
#7 |
|
Fleet Admiral
![]() ![]() ![]() ![]() ![]() ![]() |
Or send the output to a text file:
@echo off |
|
|
|
|
|
#8 | |
|
the admiral formerly known as overclocked
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2000
Location: Outside the mainstream
Posts: 5,922
|
Quote:
even better: @echo off <run the exe> > c:\textfile.txt notepad c:\textfile.txt This'll automatically open the text file in Notepad. -OC
__________________
But what is adulthood except a delayed end-run around our parents' better judgment? -- Peter Egan *cough* |
|
|
|
|
|
|
#9 | |
|
Fleet Admiral
![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
Hey hey! Getting fancy here! |
|
|
|
|