hide console window run by task scheduler

J

Joe Wong

Hi, I am using Win2000 scheduler to run a .CMD ( batch ) file every minute.
The console window is pop up everytime when the batch file is launched. Is
is possible to tell scheduler hide the console window some how?

Regards,

- Joe
 
M

Michael Bednarek

Hi, I am using Win2000 scheduler to run a .CMD ( batch ) file every minute.
The console window is pop up everytime when the batch file is launched. Is
is possible to tell scheduler hide the console window some how?

Try this:
CMD /C START /MIN your.CMD

For detailed information, see CMD /? and START /?
 
P

Paul R. Sadowski [MVP]

Hello, Joe:
On Wed, 30 Mar 2005 16:59:43 +0800: you wrote...

JW> Hi, I am using Win2000 scheduler to run a .CMD ( batch ) file every
JW> minute. The console window is pop up everytime when the batch file is
JW> launched. Is is possible to tell scheduler hide the console window some
JW> how?

This WSH/VBScript will run your batch file in a hidden window.

'MyCmd.vbs
Set WshShell = WScript.CreateObject("WScript.Shell")
cmd = "C:\bin\scripts\MyCmd.cmd"
Return = WshShell.Run(cmd, 0, True)
set WshShell = Nothing

Regards, Paul R. Sadowski [MVP].
 
J

Jerold Schulman

Hi, I am using Win2000 scheduler to run a .CMD ( batch ) file every minute.
The console window is pop up everytime when the batch file is launched. Is
is possible to tell scheduler hide the console window some how?

Regards,

- Joe
If you need to run the task in the context of the logged on user, try tip 4579 in the 'Tips & Tricks' at http://www.jsiinc.com

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 

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