I have a .bat file to run some programs (Apache httpd, Tomcat, ecc.). These programs have their own window and if I just type this into the .bat file:


When this runs I get many prompt windows, how can I prevent this?

2 Answers 2


Add at the beginning of the batch file:

@echo off

The commands in the Batch file would actually be start

start /B ../apache/bin/httpd.exe

start /B ../tomcat/bin/catalina.exe


/B : Start application without creating a new window. In this case ^C will be ignored - leaving ^Break as the only way to interrupt the application

  • Wow, I think you completely misunderstood the question, and obviously so did the upvoters. The way I see it each EXE is launching a new cmd window and that's what he wants to prevent.
    – Karan
    May 17, 2013 at 15:16
  • @Karan You're right. Fixed with the actual command.
    – Kruug
    May 17, 2013 at 15:20
  • It is quite perfect... Is it possibile to store in some way that process session to send a term signal? I would like to stop apache and tomcat if the main (and lonely) windonw will be closed. Thanks
    – Tobia
    May 18, 2013 at 12:43
  • @Tobia I have not used the start command myself, nor have I done much batch scripting. Sorry :(
    – Kruug
    May 18, 2013 at 14:08

Another way to solve this problem is to use CHP http://www.commandline.co.uk/chp/

This program run an hidden process and return its PID by return code. Than you can use this pid to close the process with taskkill.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .