msg * 命令在批处理文件中的高级用法? [英] Advanced uses of the msg * command in a batch file?

查看:31
本文介绍了msg * 命令在批处理文件中的高级用法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始在这个问题上悬赏 50 给谁给出了最好的答案!

您好,我想知道是否有一种方法可以让批处理文件使用 msg * "hi" 命令以及默认情况下的其他选择(取消并确定)通过这个,我的意思是向弹出消息添加自定义按钮,例如下一步"按钮,它将带您到另一个弹出消息,上面有对话框或类似的东西.总之,有没有办法编辑 msg * "text goes here" 命令的结果?

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...

这就是我想要的:

但是,我也想知道是否可以更改弹出消息的标题及其大小或位置.我知道这开始听起来像是批处理文件中基于 gui 的弹出窗口,但我只是想知道它是否可能以任何方式进行(请记住,我只想使用批处理/shell).任何信息或想法都会有帮助!谢谢!

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!

推荐答案

首先我不知道 msg.exe 的其他一些未记录的开关,您可以使用这些开关在你想要的形式.因为您询问了任何信息或想法,所以我决定写下我的答案.

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.

您如何查看 Dependency Walker 程序 msg.exe 使用内部函数 WinStationSendMessageWWinStationEnumerateWWinStationQueryInformationWWinStationOpenServerWWinStationFreeMemorywinsta.dll .功能 WinStationQueryInformationW 已记录,所有其他功能不是.尽管如此,人们可以相对确定这些功能与文档中的功能相同 RpcWinStationSendMessage 中记录的其他 RpcWinStationXXX 函数终端服务终端服务器运行时接口.我个人认为没有必要使用未记录的函数,因为其他记录的函数 WTSSendMessage, WTSEnumerateSessions (请参阅 远程桌面服务 API) 可以做到一样.

How you can see with respect of Dependency Walker the program msg.exe use internally functions WinStationSendMessageW, WinStationEnumerateW, WinStationQueryInformationW, WinStationOpenServerW, WinStationFreeMemory from the winsta.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.

两个函数 WTSSendMessageRpcWinStationSendMessage 有参数 pTitle, Style(例如可以是 MB_YESNOCANCEL), 和 pResponse (你也可以感兴趣).所以我建议你或你的大学里的人自己编写你需要的小工具.您可以使用记录在案的 WTSSendMessageWTSEnumerateSessions 实现中的函数.

Both functions WTSSendMessage and RpcWinStationSendMessage have parameters pTitle, Style (which can be MB_YESNOCANCEL for example), and pResponse (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.

如果您要问 serverfault.com超级用户的问题.com 可能有人会向您推荐一个您可以使用的现有实用程序.

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 * 命令在批处理文件中的高级用法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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