我们应该使用 CScript.exe 还是 WScript.exe 来运行 .vbs 文件? [英] Should we use CScript.exe or WScript.exe to run .vbs files?

查看:35
本文介绍了我们应该使用 CScript.exe 还是 WScript.exe 来运行 .vbs 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VBScript (.vbs) 文件可以使用 cscript.exe 或 wscript.exe 运行.

VBScript (.vbs) files can be run using either cscript.exe or wscript.exe.

这两个选项有什么区别?

What's the difference between these two options?

推荐答案

一个主要区别是 cscript 在控制台中运行,wscript 不是.

One major difference is that cscript runs within a console, wscript does not.

如果您想要类似控制台的输出,请使用 cscript.在该模式下,打印将导致输出到控制台.wscript 中的相同打印将其输出发送到对话框:

If you want console-like output, use cscript. In that mode, printing will result in output to the console. That same printing in wscript send its output to dialog boxes:

wscript.echo "hello"

这篇关于我们应该使用 CScript.exe 还是 WScript.exe 来运行 .vbs 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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