locked
scripting wsh cscript errors when running many concurrent vbs scripts RRS feed

  • Question

  • 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.)

    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.

    Would you be able to know 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.

    Thank you.
    • Edited by kasunch Monday, August 4, 2008 2:42 PM to put "thank you" at the end
    • Moved by Martin Xie - MSFT Friday, August 8, 2008 8:52 AM Off-topic of VB.NET forums. (Moved from Visual Basic General to Off-Topic Posts (Do Not Post Here))
    Monday, August 4, 2008 2:41 PM

All replies

  • Java? vbs? CScript? Oh my...

    This forum is for VB.NET languages, so isn't really the appropriate forum for your post.

    Stephen J Whiteley
    Monday, August 4, 2008 7:15 PM
  • Sorry for the inconveniences you had.

    Thank you.
    Tuesday, August 5, 2008 5:09 AM