# How to make the batch file doesn't appears in monitor when executed



## etstalker (Sep 30, 2012)

Dear All,I Have the problem when execute the batch files as background job by schedule. It's always appears on monitor, because the batch files running on the PC Client that running other application to so that make to bother the user execute other application. Or maybe it can be appears but in minimized mode when the batch files executed


I hope, anyone can give me the solution about this.

Thanks.


----------



## leroys1000 (Aug 16, 2007)

Remove your batch file sheduled task.
Put the batch file itself in an easy to find place
like the root of your C: drive or an easy place
to find it. 

Make a file with this code.
Set WshShell = CreateObject("WScript.Shell")
cmds=WshShell.RUN("c:\main.bat", 0, True)
Set WshShell = Nothing"
Change c:\main.bat to the path of your batch file.
Save the file the rename it and change the file extension
to .vbs
Put the vbs file with your batch file.
Now setup you scheduled task to run the vbs file instead.
The task will call the vbs file and the vbs file will run the batch
file in silent mode so the window doesn't show.


----------



## bliss-II (Oct 18, 2012)

Alternately, you can run it as SYSTEM or another user you create for running your tasks.


----------

