以前技术老大在XP下玩过net send 给别人弹窗 现在换win7 命令换了

本文介绍了Windows 7中Msg命令的使用方法,并对比了其与Netsend命令的区别。Msg命令用于向指定计算机上的用户发送消息,示例展示了如何通过指定服务器地址来发送消息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

win7没net send这命令了,用msg命令取代了
 
例子:msg /server:127.0.0.1 * "hello"
 
应该还要双方
net send 加计算机名/IP地址/或者加*群发 最后是要发的消息
不过net send要保证双方的Messenger服务已经启动,不然会发送失败的
可以使用`dbus-send`命令来发送一个弹窗的消息,具体操作如下: 1. 首先需要确定你使用的桌面环境的DBus名称,可以在终端中输入以下命令查看: ``` $ dbus-send --session --dest=org.freedesktop.DBus --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames ``` 该命令会列出所有DBus名称,找到你所使用的桌面环境的DBus名称并记录下来。 2. 然后,使用以下命令发送弹窗消息: ``` $ dbus-send --session --dest=<DBus名称> --type=method_call --print-reply --reply-timeout=8000 /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string:"app_name" uint32:0 string:"" string:"title" string:"message" array:string:"" dict:string:variant:"" int32:-1 ``` 将上述命令中的`<DBus名称>`替为你所使用的桌面环境的DBus名称,`app_name`替为应用程序名称,`title`替弹窗标题,`message`替弹窗消息内容。 例如,如果你使用的是GNOME桌面环境,可以将DBus名称替为`org.gnome.Notifications`,弹窗消息发送命令如下: ``` $ dbus-send --session --dest=org.gnome.Notifications --type=method_call --print-reply --reply-timeout=8000 /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string:"my_app" uint32:0 string:"" string:"Hello" string:"World!" array:string:"" dict:string:variant:"" int32:-1 ``` 执行上述命令后,会弹出一个消息框,显示标题为“Hello”,内容为“World!”的消息。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值