从显示Windows批处理文件弹出/消息框 [英] Show a popup/message box from a Windows batch file
本文介绍了从显示Windows批处理文件弹出/消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有显示来自一个批处理文件,一个消息框的方式(类似于如何 xmessage
可以从Linux中的bash的脚本中使用)?
Is there a way to display a message box from a batch file (similar to how xmessage
can be used from bash-scripts in Linux)?
推荐答案
我会做一个非常简单的VBScript文件并使用的CScript解析命令行参数来调用它。
I would make a very simple VBScript file and call it using CScript to parse the command line parameters.
像下面这样保存在 MessageBox.vbs
:
Set objArgs = WScript.Arguments
messageText = objArgs(0)
MsgBox messageText
,你会叫这样的:
Which you would call like:
cscript MessageBox.vbs "This will be shown in a popup."
MsgBox
reference if you are interested in going this route.
这篇关于从显示Windows批处理文件弹出/消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文