Copy Code code as follows:
The msg.exe command sends a message to the user.
MSG {username | sessionname | sessionid | @filename | *}
[/server:servername] [/time:seconds] [V] [/w] [Message]
Username identifies the specified user name.
SessionName session name.
SessionID session ID.
@filename identify a file that contains messages that will be sent
A list of user names, session names, and conversation identification numbers sent to.
* Send information to all sessions on the specified server.
/server:servername the server you want to contact (the default value is the current value).
/time:seconds waits for the receiver to confirm the message's time delay.
/V Displays information about the action that was performed.
/w waits for the user's response and is useful with/V.
Message to send. If not specified, a prompt is issued,
or read from stdin.
Microsoft's Explanation:
In Terminal Server session ID 0 Msg.exe tool does not handle
Note: This article is completed by an automated machine translation system without human intervention. These articles are provided by Microsoft to users who do not understand English, so that they can understand the content of these articles. Microsoft does not guarantee the correctness of machine translation, nor is it responsible for any direct, or indirect, possible problems arising from the mistranslation of the content or the customer's use of it.
Article number: 302799
Last modified: August 6, 2002
Revised: 1.0
Symptoms
For list users and you want to use the Msg.exe command-line tool to send a message to a user, a session with a list file may be sent to the console session, and you may receive a session ID 0 (0). If it is sent to a console user, however, the message may reach the console.
Reason
This behavior occurs because the procedure requires administrator privileges to send massage to the console.
State
This behavior is by design.
More information
The list file is described in the "Symptoms" section of this article as a user and session text file with a list (administrator, 0, User 1, 2, USER15, 4, and so on). The file is then invoked with the MSG @file name command, where the filename is the name of the text file. For more information about this Msg.exe tool, use to help MSG search in Windows XP.