Execute Batch File without any windows

Posted on

If you have a need of executing your batch file where you do not want the window to be popped up; here’s the solution to that using VB Script.

Open the notepad and type the following

CreateObject("Wscript.Shell").Run "<your batch file path>",0

Save the above file in any name you want with the extension .vbs

That’s it you are done. Now simply double click the VB Script, your batch process has started without any windows or task bar minimizations.

You can call this .vbs file directly from the .NET code as to start like a process

Process p = new Process();

p.StartInfo.FileName = @”myFile.vbs”;


Note : This Requires Windows Script Host installed in your machine. (by default this installed in most Windows OS)