从Windows批处理文件显示弹出/消息框 [英] Show a popup/message box from a Windows batch file
问题描述
是否有一种方法来显示来自批处理文件的消息框(类似于 xmessage
可以从Linux中的bash脚本中使用)?
我将创建一个非常简单的VBScript文件,并使用CScript来解析命令行参数。
在 MessageBox.vbs
中保存的类似以下内容:
Set objArgs = WScript.Arguments
messageText = objArgs(0)
MsgBox messageText
您会这样调用:
cscript MessageBox.vbs这将显示在弹出窗口中。
Is there a way to display a message box from a batch file (similar to how I would make a very simple VBScript file and call it using CScript to parse the command line parameters. Something like the following saved in Which you would call like: 这篇关于从Windows批处理文件显示弹出/消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! MsgBox
> xmessage
can be used from bash-scripts in Linux)?MessageBox.vbs
:Set objArgs = WScript.Arguments
messageText = objArgs(0)
MsgBox messageText
cscript MessageBox.vbs "This will be shown in a popup."
MsgBox
reference if you are interested in going this route.