hide console window run by task scheduler

  • Thread starter Thread starter Joe Wong
  • Start date Start date
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
 
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 /?
 
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].
 
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
 
Back
Top