Saturday 25 May 2019

Run a silent batch command on Windows


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:


../apache/bin/httpd.exe
../tomcat/bin/catalina.exe
...

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



Answer



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


http://ss64.com/nt/start.html



/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



No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...