本文介绍了使用参数从CMD调用wscript.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用CMD中的参数调用VBScript编译器 WScript.exe ,例如:

Is it possible to call the VBScript Compiler WScript.exe with parameters from CMD, like;

WScript.exe -"WScript.Echo Hello World"



显示一个消息框。

我知道如何使用VBScript但我想运行一个脚本而不保存到 .vbs 档案。



提前致谢



我的尝试:



--------------------------------- --------


to display a message box.
I know how to use a VBScript but i want to run a script without being saved to a .vbs file.

Thanks in advance

What I have tried:

-----------------------------------------

推荐答案

wcscript.exe test.vbs "C:\temp\"



但你不能省略第一个,这是强制性的!



BTW您也可以使用Script.exe,它与WScript.exe相同,但是一个控制台程序。


But you can not omit the first one, it's a mandatory one!

BTW you can use Script.exe as well, it is the same like WScript.exe but a console program.


这篇关于使用参数从CMD调用wscript.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 14:15
查看更多