hide console window run by task scheduler

Discussion in 'Microsoft Windows 2000 CMD Promt' started by Joe Wong, Mar 30, 2005.

  1. Joe Wong

    Joe Wong Guest

    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
     
    Joe Wong, Mar 30, 2005
    #1
    1. Advertisements

  2. Joe Wong

    David Candy Guest

    Schedule it with a user other than you.
     
    David Candy, Mar 30, 2005
    #2
    1. Advertisements

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

    For detailed information, see CMD /? and START /?
     
    Michael Bednarek, Mar 30, 2005
    #3
  4. 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].
     
    Paul R. Sadowski [MVP], Mar 30, 2005
    #4
  5. 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
     
    Jerold Schulman, Mar 30, 2005
    #5
  6. Joe Wong

    Joe Wong Guest

    Thanks!


    4579 in the 'Tips & Tricks' at http://www.jsiinc.com
     
    Joe Wong, Mar 31, 2005
    #6
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.