How to suppress command window in task scheduler

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I have a lot of tasks executing very frequently via the task
scheduler. Each task runs a command file and sends the standard
output and standard error to a log file. Is there a way to suppress
the display of the command window when the tasks execute? The screen
fills up with popups throughout the day, and it's very annoying.

I know if I log on as a different user than the one running the task,
then I won't see the popups. But I'd rather have a better solution so
I don't have to create a special user that does nothing but run tasks.

Thanks,

Tom
 
You could reschedule the task using the AT command so it runs as the system,
or you could schedule a .vbs file to execute your batch file and supress the
window:

Set oShell = CreateObject("WScript.Shell")
oShell.Run "C:\yourfile.bat", 0
Set oShell = Nothing

The second argument of the run method is the window style, where 0 means
hidden.

Save that as a .vbs file and schedule that in place of your batch file.

Ray at work
 
Tom said:
I have a lot of tasks executing very frequently via the task
scheduler. Each task runs a command file and sends the standard
output and standard error to a log file. Is there a way to suppress
the display of the command window when the tasks execute? The screen
fills up with popups throughout the day, and it's very annoying.

I know if I log on as a different user than the one running the task,
then I won't see the popups. But I'd rather have a better solution so
I don't have to create a special user that does nothing but run tasks.

Thanks,

Tom

If you have scheduled your tasks via the Task Scheduler, make sure
to select an account other than your foreground account. This will
make your task completely invisible.
 
Back
Top