cscript errors when running many concurrent vbs scripts

Tech-Archive recommends: Fix windows errors by optimizing your registry



hi,

i have a java application that spawns cscript to run a simple vbs script
that uses wmi to connect to another computer and retrieve properties of
Win32_OperatingSystem. it's a multi-threaded app and might make ~50 of
these calls concurrently to different systems. i find that when many
concurrent calls are made some of the cscript invocations will fail in the
following ways:

* exit code -1073741502, no stdout/stderr
* exit code 1, no stdout/stderr
* exit code 1, stdout = CScript Error: Initialization of the Windows Script
Host failed. (Class does not exist. )
* exit code 1, stdout = CScript Error: Initialization of the Windows Script
Host failed. (Not enough storage is available to complete this operation.)
* exit code 128, no stdout/stderr

i don't have any problems when i limit the number of simultaneous calls to a
smaller number, say 10. i haven't seen any correlation between specific
target machines and these cscript errors - it's pretty random which cscript
invocations will fail in this manner. the system has plenty of memory
available.

because of these problems, and others (best not to spawn lots of processes
from java), i'm looking into writing a c++ dll that makes the identical
queries, which i'll invoke from java through jni. i'm hoping this will
avoid these errors. having some trouble getting the c++ code to work
remotely (the c# equivalent of the vbs script works great, haven't quite
figured out the right combination of flags to get things working from c++),
so i thought i'd ask if there was a simple workaround to these cscript
errors i'm seeing that doesn't involve throttling the number of concurrent
requests. i've seen some other newsgroup posts on this topic (cscript
errors when running many concurrent vbs scripts) without a solution, but
thought i'd ask.

thanks.

-mike


.



Relevant Pages

  • using cscript.exe and vvbs script for file-stored inputs
    ... He gets a Matlab file to write a .vbs script. ... So basically cscript gets the inputs from test2.vbs and inputs them to ... it is that you don't even need to interface other language code with ...
    (comp.soft-sys.matlab)
  • Cscript from a SQL Stored Procedure?
    ... Basically we are trying to add code that calls the .vbs script so that when ... stored procedure gets called from the application. ... CScript Error: Loading your settings failed. ...
    (microsoft.public.sqlserver.server)
  • Re: How to add multiple computers into collection
    ... theres a great vbs script called colladd.vbs by Mark Nunn that ... cscript /nologo Colladd.vbs smsserver filename collectionID ... We are using SMS 2003 in our organization. ... created a collection and asked me to add computers into it. ...
    (microsoft.public.sms.admin)
  • Re: execute .vbs
    ... The vbs script in fact runs on my host machine via a CRT serial ... connection to a WinCE box. ... for the added serial terminal support. ... > makes mention of a 'cscript' runner for a .vbs. ...
    (microsoft.public.windowsce.embedded.vb)
  • Running CScript in an aspx application
    ... Using the process method I'm trying to run a CScript ... command (via a batch command). ... CScript Error: Loading your settings failed. ...
    (microsoft.public.inetserver.iis.security)