Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

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.