# simple batch program



## Easy Rhino (Nov 7, 2008)

hey guys, i wrote a REAL simple .bat file that stops and starts certain vmware services on my machine. it makes it a lot easier when dealing with multiple boxes and virtual machines. anyway, when the program completes the cmd window (this is in vista) disappears. this is fine at first because i can see the services start or stop. however, for log purposes id like the cmd window to remain open even after it completes the command. anyone happen to know what code i can add to the batch file to keep the window open? thanks.


----------



## HTC (Nov 7, 2008)

Easy Rhino said:


> hey guys, i wrote a REAL simple .bat file that stops and starts certain vmware services on my machine. it makes it a lot easier when dealing with multiple boxes and virtual machines. anyway, when the program completes the cmd window (this is in vista) disappears. this is fine at first because i can see the services start or stop. however, for log purposes id like the cmd window to remain open even after it completes the command. anyone happen to know what code i can add to the batch file to keep the window open? thanks.



Can't you add something like "Press any key to continue ..." so that only when you press a key, the window will close.

I have no idea of what code you need to do that, though!


----------



## FordGT90Concept (Nov 8, 2008)

PAUSE

Place that on it's own line and it will display the "Press any key to continue . . ." message.

You can also use:

command > filename.txt

or

command >> filename.txt

To write the output of a command to a specific file.  I'm pretty sure >> appends the file and > overwrites but that might be backwards.


----------



## Easy Rhino (Nov 8, 2008)

thanks!


----------

