In Windows, Task scheduler, Properties of the task, Actions tab, edit the task by adding:
%comspec% /c start /min
in front of the path to the script, in the field "Program/Script" where you would browse to the script on your system, for example
%comspec% /c start /min "C:\path\to\my\batchfile.bat"
%comspec% is an environment variable that points to the location of the cmd.exe on your system.
Clicking OK will invoke dialog to ask if you if you ment all this to be parameters or not. Answer NO and
the task will be saved as you would expect.
Then, add
exit
at the end of the batch file that you want to run with minimized with Task scheduler.
That's all.
No comments:
Post a Comment