CScript/WScript 防止错误被阻塞 [英] CScript/WScript Prevent an error from being blocking

查看:35
本文介绍了CScript/WScript 防止错误被阻塞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,当出现脚本错误时,WScript 会弹出消息框.这些脚本由其他进程调用,并在服务器上运行,因此没有人可以关闭错误框.

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.

我想要的是将错误消息转储到 STDOUT,并执行以返回调用进程.作为 MSGBox 弹出只会挂起整个事情.

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.

想法?

推荐答案

这是运行脚本批处理作业的方式:

This is how you should be running Script batch jobs:

cscript //b scriptname.vbs

这篇关于CScript/WScript 防止错误被阻塞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆