Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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

share|improve this answer
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 '13 at 15:16
@Karan You're right. Fixed with the actual command. – Kruug May 17 '13 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 '13 at 12:43
@Tobia I have not used the start command myself, nor have I done much batch scripting. Sorry :( – Kruug May 18 '13 at 14:08

Another way to solve this problem is to use 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.