Re: cscript sometimes fails to run JScript
- From: "Jim" <no@xxxxxxxx>
- Date: Thu, 20 Jul 2006 15:36:13 -0400
i would say its an issue with this particular pc... have you tried it
anywhere else?
either a file permission problem, or maybe some AV software blocking
execution randomly
"Aldrich" <davidandbella@xxxxxxxxxxxxxxxxxxx> wrote in message
news:44bfaf02_1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
I have written a JScript that I execute under cscript from the Windows
cmd line. It runs fine on my PC which runs Windows XP SP2 and WSH
version 5.6.
However, if I run it on a colleague's PC with the same XP and WSH
builds, the script runs only about 3 out of 4 tries. When it fails no
code in the script executes and no error is displayed. To demonstrate
this I tried running a script 'MyScript.js' containing only the line:
WScript.StdOut.WriteLine("Started!");
Here is a snippet of the cmd window showing successive runs:
C:\Work>cscript MyScript.js
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Started!
C:\Work>cscript MyScript.js
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Started!
C:\Work>cscript MyScript.js
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
C:\Work>cscript MyScript.js
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Started!
As you can see, on one occasion the script did not execute at all.
If I use the //D switch, I always see an "Access is denied" message.
C:\Work>cscript MyScript.js //D
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
CScript Error: Initialization of the Windows Script Host failed.
(Access is denied. )
Please can anyone suggest what is causing the script not to run?
David
.
- References:
- cscript sometimes fails to run JScript
- From: Aldrich
- cscript sometimes fails to run JScript
- Prev by Date: Re: SQL Script to collect database size
- Next by Date: Re: Looking for a script or a program to keep outlook running at all times....
- Previous by thread: cscript sometimes fails to run JScript
- Next by thread: Re: Return after AppActivate
- Index(es):
Relevant Pages
|