Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how not to open a Cmd window when running a batch file

Every batch file I write opens a Cmd window and leaves it open until the program is completed. What is the command string to include in the .bat file to either not open the CMD window or open it and immediately hide it? I must stay within the confines of MSW7 Pro's built in programming. Right now, I'm just playing with the msg command to get this figured out. For success, only the message window itself should appear on screen.

like image 720
Gray Death Avatar asked Nov 13 '15 03:11

Gray Death


1 Answers

You can do it by creating a vb script.

hideCMD.vbs

CreateObject("Wscript.Shell").Run "foo.bat", 0, True

This will run your batch file with command prompt window hidden.

like image 125
secretgenes Avatar answered Oct 02 '22 20:10

secretgenes