scheduled task in background mode
I'm trying to do it in that way as it reaches my needs but one thing that I'd
like to bypass is that when the task is executed the cmd window is showed.
How can I execute the task in background mode or almost minimized?
I've looked for a flag/switch that could do that but I haven't found it.
Thanks,
Marc Soleda
Pegasus \(MVP\)
07-10-2005, 12:54 AM
"Marc" <Marc@discussions.microsoft.com> wrote in message
news:A4E8E1F5-86FE-408F-B957-C9EF5C1D7EF1@microsoft.com...
> I'm trying to do it in that way as it reaches my needs but one thing that
I'd
> like to bypass is that when the task is executed the cmd window is showed.
> How can I execute the task in background mode or almost minimized?
> I've looked for a flag/switch that could do that but I haven't found it.
>
> Thanks,
> Marc Soleda
>
Schedule the task to run under an account other than your own.
Torgeir Bakken \(MVP\)
07-10-2005, 12:54 AM
Marc wrote:
> I'm trying to do it in that way as it reaches my needs but one thing that I'd
> like to bypass is that when the task is executed the cmd window is showed.
> How can I execute the task in background mode or almost minimized?
> I've looked for a flag/switch that could do that but I haven't found it.
Hi
Use a VBScript (.vbs file) to launch your program or batch file:
'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")
sCmd = "ping.exe -n 6 127.0.0.1"
oShell.Run sCmd, 0, True
'--------------------8<----------------------
In task configuration, set it to start the script like this:
wscript.exe "path to your .vbs file"
e.g.
wscript.exe "C:\Scripts\LaunchTask.vbs"
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
Nice trick. It's solved now.
thanks,
Marc
"Pegasus (MVP)" wrote:
>
> "Marc" <Marc@discussions.microsoft.com> wrote in message
> news:A4E8E1F5-86FE-408F-B957-C9EF5C1D7EF1@microsoft.com...
> > I'm trying to do it in that way as it reaches my needs but one thing that
> I'd
> > like to bypass is that when the task is executed the cmd window is showed.
> > How can I execute the task in background mode or almost minimized?
> > I've looked for a flag/switch that could do that but I haven't found it.
> >
> > Thanks,
> > Marc Soleda
> >
>
> Schedule the task to run under an account other than your own.
>
>
>
scheduled task in background mode