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

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

问题描述

编辑:!我已经就此问题向谁曾给出了最好的答案开始的50赏金

您好我想知道是否有一个批处理文件的方法,使弹出出现与除之外的其他选项一起使用 MSG *喜命令在默认情况下是有这个(取消和OK),我的意思是添加自定义按钮,在弹出的消息,如下一步按钮,将带你到另一个弹出对话框与它或东西沿着这些线路的消息。总之,有编辑的结果的方式MSG *的文字放在这里命令?

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的弹出只是想知道,如果可能以任何方式neccessary(记住,我只是想用批处理/ 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 内部使用功能 WinStationSendMessageW WinStationEnumerateW WinStationQueryInformationW WinStationOpenServerW WinStationFreeMemory winsta.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.

这两个函数 WTSSendMessage 和<一个HREF =htt​​p://msdn.microsoft.com/en-us/library/cc248836%28PROT.10%29.aspx相对=nofollow> RpcWinStationSendMessage 有参数 pTitle 风格(可以的 MB_YESNOCANCEL 为例),和 presponse (可以是也很有趣,你你)。因此,我建议你还是一个来自您的院校仅有的自己写的小工具,你需要。您可以使用记录 WTSSendMessage 并的 WTSEnumerateSessions 在执行功能。

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天全站免登陆