scheduled task in background mode

G

Guest

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
 
P

Pegasus \(MVP\)

Marc said:
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.
 
T

Torgeir Bakken \(MVP\)

Marc said:
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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top