批处理文件中 msg * 命令的高级用法?
编辑:对于这个问题,我已经开始悬赏 50 美元给谁给出最好的答案!
嗨,我想知道是否有一种方法可以让批处理文件使用 msg * "hi"
命令以及除默认情况下的其他选择(取消和确定)之外的其他选择,我的意思是向弹出消息添加自定义按钮,例如“下一步”按钮带您到另一条带有对话框或类似内容的弹出消息。总而言之,有没有办法编辑 msg * "text gets here"
命令的结果?
这就是出现的情况...
这就是我想要的:
但是,我也想知道是否可以更改弹出消息的标题及其大小或位置。我知道这开始听起来像是批处理文件中基于 gui 的弹出窗口,但我只是想知道它是否有必要(请记住,我只想使用批处理/shell)。任何信息或想法都会很有帮助!谢谢!
EDIT: I have started a bounty of 50 on this question to who ever gives the best answer!
Hi i was wondering if there was a way for a batch file to make a pop up appear using the msg * "hi"
command along with other selections besides the ones that are there by default (cancel and ok) by this, i mean add custom buttons to the pop up message such as a "next" button that would bring you to another pop up message with dialog on it or something along those lines. In summary , is there a way to edit the results of the msg * "text goes here"
command?
This is what comes up...
And this is kind of what i want:
However , i also would like to know if its possible to change the title of the pop up message and the size or position of it. I know that this is starting to sound like a gui based popup in a batch file but im just wondering if its possible by any means neccessary (Keep in mind that i only want to use batch/shell). Any information or ideas would really help! Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先,我不知道
msg.exe
的一些其他未记录的开关,您可以使用它们以您想要的形式创建消息。因为您询问了任何信息或想法,我决定写下我的答案。您如何看待 Dependency Walker 程序
msg.exe
内部使用的情况来自的函数
WinStationSendMessageW
、WinStationEnumerateW
、WinStationQueryInformationW
、WinStationOpenServerW
、WinStationFreeMemory
winsta.dll 。函数 WinStationQueryInformationW 已记录,所有其他函数不是。尽管如此,人们可以相对确定这些函数与记录的函数相同 RpcWinStationSendMessage 和 中记录的其他 RpcWinStationXXX 函数终端服务终端服务器运行时接口。我个人认为没有必要使用未记录的函数,因为其他已记录的函数 WTSSendMessage,WTSEnumerateSessions (请参阅远程桌面服务 API)可以执行以下操作相同的。两个函数 WTSSendMessage 和 RpcWinStationSendMessage 具有参数
pTitle
、Style
(例如,可以是 MB_YESNOCANCEL),以及 < code>pResponse (您也可能对此感兴趣)。因此,我建议您或您大学的人自己编写您需要的小实用程序。您可以使用记录的 WTSSendMessage 和 WTSEnumerateSessions 实现中的函数。如果您要询问 serverfault.com 或 superuser.com< /a> 可能有人会推荐您一个可以使用的现有实用程序。
First of all I don't know some additional undocumented switches of
msg.exe
which you can use to create the message in the form which you want. Because you asked about any information or ideas I decide do to write my answer.How you can see with respect of Dependency Walker the program
msg.exe
use internally functionsWinStationSendMessageW
,WinStationEnumerateW
,WinStationQueryInformationW
,WinStationOpenServerW
,WinStationFreeMemory
from thewinsta.dll
. The function WinStationQueryInformationW is documented, all other functions not. Nevertheless one can be relatively sure that the functions are identical to the documented function RpcWinStationSendMessage and other RpcWinStationXXX functions documented in Terminal Services Terminal Server Runtime Interface. I personally see no need to use the undocumented functions because other documented functions WTSSendMessage, WTSEnumerateSessions (see Remote Desktop Services API) can do the same.Both functions WTSSendMessage and RpcWinStationSendMessage have parameters
pTitle
,Style
(which can be MB_YESNOCANCEL for example), andpResponse
(which can be also interesting you you). So I suggest that you or one from your colleges just write the small utility yourself which you need. You can use documented WTSSendMessage and WTSEnumerateSessions functions in the implementation.If you'll ask a question of the serverfault.com or superuser.com probably somebody will recommend you an existing utility which you can use.
抱歉,无法更改批处理“msg”命令显示的弹出窗口。
Oleg 所说的是,如果你想创建自定义弹出窗口,则不能使用 Windows“msg”命令来完成。除了创建自己的“msg”命令之外,没有其他方法,该命令会打开一个自定义弹出窗口(Oleg 解释了有很多方法可以做到这一点)。
Sorry but it's not possible to change the popup showed by the batch "msg" command.
What Oleg said is that if you want to create a custom popup, you can't do it with the windows "msg" command. There is no other way than creating your own "msg" command, which opens a custom popup (and there are many ways to do this, explained by Oleg).
msg * text
在 Windows 10 中不起作用。我编写了一个程序来帮助使用它,但在 cmd 或批处理文件中,
在此处回显文本 > "msgBox extension\text.txt"
是输入,"msgBox extension\messageBox.bat"
将通过文本框激活它。the
msg * text
doesn't work in windows ten.I made a program to help thoughto use it though,in cmd or batch files,
echo text here > "msgBox extension\text.txt"
is the input,and"msgBox extension\messageBox.bat"
will activate it via text box.