我们应该使用 CScript.exe 还是 WScript.exe 来运行 .vbs 文件?

编程入门 行业动态 更新时间:2024-10-26 16:26:49
本文介绍了我们应该使用 CScript.exe 还是 WScript.exe 来运行 .vbs 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-28 00:30:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1164496.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我们应该   文件   CScript   exe   WScript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!