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 VBScript (.vbs) file via Windows Scheduled Task.

On a Windows XP SP3 x86 machine, a command window is not shown when the task executes.

On a Windows Server 2003 R2 SP2 x64 machine, a command window is shown when the task executes.

Does anyone know why the difference in behavior and, in particular, how I can suppress the command window on the server?

Full version is Microsoft Windows Server 2003 R2 Enterprise Edition x64 (5.2.3790).

share|improve this question
Does the scheduled task have anything to do with it. Perhaps one system is set to use wscript by default and the other is set to use cscript? – Zoredache Dec 7 '11 at 18:33
On both systems the scheduled task is configured to run the .vbs file and, I guess, let the file association take care of which executable is run. This is a very good point though - I will check which executable is being run on each system... when I get into the office tomorrow ;-). – AdamRalph Dec 7 '11 at 18:56

The CMD window is being shown most likely because it is being run via cscript. The CMD window will be displayed if the user that the task is configured to run as, is logged in at the time it executes.

share|improve this answer

Change your scheduled task to launch via WScript similar to:

wscript //b //nologo <scriptname>
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.