有什么办法可以直接运行VBScript来的WScript或CSCRIPT命令行 [英] There's any way to run vbscript directly to wscript or cscript command line

查看:707
本文介绍了有什么办法可以直接运行VBScript来的WScript或CSCRIPT命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要运行命令行一个VBS命令我会在批量调用

I want to run a vbs command from command line as I would in batch calling

cmd.exe /c "echo.Hello World! & pause"

显然,这并不正常工作

Obviously this doesn't work

wscript /C MsgBox("Hello world")

我可以打印VBS,然后调用临时文件,然后将其删除。

I could print the vbs and then call the temporary file and then delete it

cmd.exe /c "echo. [VBSCODE] > temp.vbs & wscript temp.vbs & del temp.vbs"

但这是太乱了,我不希望提示坡平了。

but this is too messy, and I don't want the prompt poping up.

推荐答案

这工作直接在命令行上:

this works directly on the command line:

MSHTA的VBScript:执行(MSGBOX(amessage,64,atitle)(window.close))

mshta vbscript:Execute("MsgBox(""amessage"",64,""atitle"")(window.close)")

这篇关于有什么办法可以直接运行VBScript来的WScript或CSCRIPT命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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