我们应该使用 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一个主要区别是
cscript
在控制台中运行,而wscript
则不然。如果您想要类似控制台的输出,请使用
cscript
。在该模式下,打印将导致输出到控制台。wscript
中的相同打印将其输出发送到对话框:One major difference is that
cscript
runs within a console,wscript
does not.If you want console-like output, use
cscript
. In that mode, printing will result in output to the console. That same printing inwscript
send its output to dialog boxes:使用 cscript,它会在 cmd 窗口中显示信息,这不会停止脚本。使用 Hscript 时会弹出一个信息,该信息会停止脚本
With cscript, it displays the info in a cmd window, which will not stop the script. while using Hscript will get a info pop up which halts the script