Hide Command Window of .BAT file that Executes Another .EXE File
Using start
works fine, unless you are using a scripting language. Fortunately, there's a way out for Python - just use pythonw.exe
instead of python.exe
:
:: Title not needed:
start pythonw.exe application.py
In case you need quotes, do this:
:: Title needed
start "Great Python App" pythonw.exe "C:\Program Files\Vendor\App\application.py"
Using start
works for me:
@echo off
copy "C:\Remoting.config-Training" "C:\Remoting.config"
start C:\ThirdParty.exe
EDIT: Ok, looking more closely, start
seems to interpret the first parameter as the new window title if quoted. So, if you need to quote the path to your ThirdParty.exe you must supply a title string as well.
Examples:
:: Title not needed:
start C:\ThirdParty.exe
:: Title needed
start "Third Party App" "C:\Program Files\Vendor\ThirdParty.exe"
Create a .vbs
file with this code:
CreateObject("Wscript.Shell").Run "your_batch.bat",0,True
This .vbs
will run your_batch.bat
hidden.
Works fine for me.