Kroko Just another WordPress weblog

January 17, 2009

hide console window run by task scheduler

Filed under: fuck windows — admin @ 6:54 am

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

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

Powered by WordPress