LAZIOMATICA – Guida allo Sviluppo Software

La nuova forma del software su misura…

 

Windows OS – run a .bat file in a silent mode – without opening a console window

After i seek around the web i have a definitive solution to run a batch file in a silent way, that is a vb script, lanched on a task system (example on startup), like this:

Set WshShell = CreateObject("WScript.Shell")
cmds=WshShell.RUN("c:\my_batch_file.bat", 0, True)
Set WshShell = Nothing

Setting intWindowStyle to 0, in the second line, will hide the output window.
Save this as script.vbs file and run it when you need.

Filed under : scripts,Windows
By admin
On 10 gennaio 2011
At 20:04
Comments : 0