中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 07:06
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Help with the msg command.
Printable Version  1,578 / 3
Floor1 ytjiushiwo Posted 2008-07-19 00:24
初级用户 Posts 33 Credits 98
I can get these information from the help of DOS.. But there are still some problems I don't understand.. Please help me explain.. Thank you!
1. username identifies the specified user name. What does it mean? Is it the user name I use to log in to the computer?
2. sessionname session name. What does it mean? Why is there no difference in the dialog box that pops up when I enter msg %username% "hello" and enter msg %sessionname% "hello"?
3. sessionid session ID. This is even more confusing.. When I enter msg %sessionid% "hello", the program reports an error, saying that it does not exist or the connection has been interrupted.
4. Can I modify the title bar of the message box popped up by msg.. That is, let "Message from XXX" in it can be modified arbitrarily.. Can it become "Message from younger brother""Message from elder sister"?
5. I also didn't understand the descriptions of 4, 5, and 6.. I only understand the last three descriptions..

The novice respectfully submits.. Begging the expert
Floor2 secowu Posted 2009-06-13 00:14
初级用户 Posts 92 Credits 201
username Identifies the specified username. ---Must be an existing user in the system
sessionname Session name. ----The name of the current session, you can customize it
Floor3 secowu Posted 2009-06-13 00:16
初级用户 Posts 92 Credits 201
The second explanation is wrong...
Floor4 qzwqzw Posted 2009-06-13 00:43
银牌会员 Posts 636 Credits 2,343
The parameters of the msg command are mainly applied in server environments such as Windows Server.

On a server, it is very likely that multiple users will log in. Each user will establish an independent session with the server. Each session will have a name and an ID number. There are specialized programs in the server environment to manage the sessions generated by user logins.

msg is mainly used to send messages to other users or other sessions.

Of course, it can also send messages to the current user or the current session. And the two environment variables %username% and %sessionname% store the current user name and the current session name respectively.

The "From" information in the title bar is also directly related to the user name of the sender. To change it, you need to modify the user name of the sender.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023