How can I run a windows batch file but hiding the command window? I dont want cmd.exe to be visible on screen when the file is being executed. Is this possible?
To self-hide already running script you'll need getCmdPid.bat and windowoMode.bat
@echo off
echo self minimizing
call getCmdPid.bat
call windowMode.bat -pid %errorlevel% -mode hidden
echo --other commands--
pause
Here I've compiled all ways that I know to start a hidden process with batch without external tools.With a ready to use scripts (some of them rich on options) , and all of them form command line.Where is possible also the PID is returned .Used tools are IEXPRESS,SCHTASKS,WScript.Shell,Win32_Process and JScript.Net - but all of them wrapped in a .bat files.