Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a .bat file for my script (Scheduled Tak (CronJob)) per minute. When it run, seems ms-dos window short period of time. My batch code like this;

@ECHO OFF C:\wamp\bin\php\php5.4.3\php.exe -f "C:\wamp\www\tst\index.php"

How can I hide this window when it run?

share|improve this question
up vote 6 down vote accepted

You can hide the window with a VB script:

Set objArgs = WScript.Arguments
For Each strArg in objArgs
    Set WshShell = CreateObject("WScript.Shell")
    cmds=WshShell.RUN(strArg, 0, False)
    Set WshShell = Nothing

start c:\runHidden.vbs "C:\wamp\bin\php\php5.4.3\php.exe -f 'C:\wamp\www\tst\index.php'"
share|improve this answer
Thank you @Micro Tolts – prestack Nov 27 '12 at 14:11

You can use start /min <your command> which will not hide window but will minimize it.

share|improve this answer

In Task Scheduler, you may create a task that will run in another user account. If done so, the batch window won't appear in your own login.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.