Some suggested using third-party program to minimize the window. Some suggested using Windows Script.
The solution is simple, use this: cmd /c start "title" /min "batch file"
For example: cmd /c start "Backup" /min "d:\my documents\scripts\backup.bat"
Be cautious that the start command will treat the first double-quoted string as title. So if you do this:
- cmd /c start /min "d:\my documents\scripts\backup.bat"
you will just get a command prompt window entitled "d:\my documents\scripts\backup.bat" without the batch file running. Thus it's a good idea to always put a title to prevent scratching your head later.
There is one problem though, that you have to put an exit at the end of your batch file. Otherwise the batch file window will stay there when it is finished.
This is how you convert the above command into the Action of a scheduled task:
- Put "cmd" in Program/script.
- Put the rest in Add arguments (optional), eg: /c start "Hello" /min "d:\my documents\scripts\backup.bat"