如何在批处理脚本中创建弹出消息? [英] How can you create pop up messages in a batch script?

查看:34
本文介绍了如何在批处理脚本中创建弹出消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道如何在不使用 VBScript 或 KiXtart 或任何其他外部脚本/编程语言的情况下在批处理脚本中制作弹出消息.我对此毫无头绪……甚至没有起点.我知道 NET SEND,但 Messenger 服务在我当前的环境中被禁用.

I need to know how to make popup messages in batch scripts without using VBScript or KiXtart or any other external scripting/programming language. I have zero clue about this... had no starting point even. I am aware of NET SEND but the Messenger service is disabled in my current environment.

推荐答案

关于 LittleBobbyTable 的回答 - NET SEND 在 Vista 或 Windows 7 上不起作用,已被 MSG.EXE 取代

With regard to LittleBobbyTable's answer - NET SEND does not work on Vista or Windows 7. It has been replaced by MSG.EXE

有一个适用于所有 Windows 版本的粗略解决方案 - 可以通过启动一个新的 cmd.exe 窗口来发送粗略的弹出消息,该窗口在按下某个键后关闭.

There is a crude solution that works on all versions of Windows - A crude popup message can be sent by STARTing a new cmd.exe window that closes once a key is pressed.

start "" cmd /c "echo Hello world!&echo(&pause"

如果您希望脚本在消息框消失之前暂停,则可以添加/WAIT 选项.

If you want your script to pause until the message box is dismissed, then you can add the /WAIT option.

start "" /wait cmd /c "echo Hello world!&echo(&pause"

这篇关于如何在批处理脚本中创建弹出消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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