Search code examples
vbscriptautomationwsh

CScript/WScript Prevent an error from being blocking


Currently, WScript pops up message box when there is a script error. These scripts are called by other processes, and are ran on a server, so there is nobody to dismiss the error box.

What I'd like is for the error message to be dumped to STDOUT, and execution to return the calling process. Popping as a MSGBox just hangs the entire thing.

Ideas?


Solution

  • This is how you should be running Script batch jobs:

    cscript //b scriptname.vbs