Instruction Paper
How to utilize Windows operating system to exchange messages
A Setup and Usage Manual By:
Willie L. Williams Jr.
(University of Maryland)
Table of Contents 1. Background 3 2. The Solution 4 3. How to use 5 3.1 Switches and Options: 5 3.1.1 Username 5 3.1.2 SessionName 5 3.1.3 SessionID 6 3.1.4 @FileName 6 3.1.5 * 6 3.1.6 server:ServerName 6 3.1.7 time:seconds 6 3.1.8 v 6 3.1.9 w 6 3.1.10 message 6 4. Understanding the syntax 7 5. Examples 8 6. Remarks 9 7. Troubleshooting Problems 10 8. References 11 9. Bibliography 12 Session: 12
1. Background
There are often times when there's a need that a user would wish to communicate with another user to exchange information or notify about an incident like a maintenance activity, network outage etcetra.
In scenarios like these one often makes use of common available software solutions like an e-mail or third party or proprietary instant messaging softwares. These solutions involves cost and suit requirements of medium to large scale enterprises which can procure software licenses and hardware equipment to set up an exchange server.
2. The Solution
Windows Terminal System commands offer a set of utilities that help a Windows user interact with another Windows user in different ways e.g. exchanging messages or alerting, obtainting a remote session etcetra.
This documents describes a simple communication method which enables a Windows user to exchange messages with another Windows user using a Terminal Services Command utility that is distributed along with Windows operating system.
3. How to use
MSG.exe is a command line utility that can be invoked from the command prompt. Let’s explore the various switches that it provides:
msg {UserName|SessionName|SessionID|@FileName|*} [/server:ServerName] [/time:seconds] [/v] [/w] [message]
3.1 Switches and Options:
The following sub-sections describe various switches and options the utility supports.
3.1.1 Username
Windows user name or the name of the user you want to receive the message.
3.1.2 SessionName
A user may have one or more active sessions on one or more windows machines, if the sender intends to send a message to a specific user session then, sender can specify the name of the session to send message to.
3.1.3 SessionID
Each session is identified by a unique session identifier called SessionID, like session name, if the sender intends to send a message to a specific user session then, sender can specify session identifier to send the message to.
3.1.4 @FileName
Name of the file containing a list of user names, session names, and session IDs of the recipient user.
3.1.5 *
This acts like a wildcard and sends message to all user names on the system.
3.1.6 /server:ServerName
Specified the machine name whose user or session you want to send the message to. If /server is not specified then a local system is assumed.
3.1.7 /time:seconds
Indicates the amount of time (in seconds) for which the message is displayed on the receiver’s screen. After this time elapses, the message disappears. If /time is not specified, the message stays on the receiver’s screen until the receiver acknowledges the message by pression OK button on the dialog.
3.1.8 /v
Displays the information about actions being performed.
3.1.9 /w
Waits for an acknowledgement from the receiver. Yoy may use this switch with /time to avoid long delays in acknowledgement from the recipient.
3.1.10 message
This is the actual message that the sender intends to send to the receiver. If no message is typed, you are prompted for it or standard input (STDIN) is read for the message. To send a message that is contained in a file, type the less than (>) symbol followed by the file name.
4. Understanding the syntax
msg {UserName|SessionName|SessionID|@FileName|*} [/server:ServerName] [/time:seconds] [/v] [/w] [message]
a) Italic: Indicates the information the user must specify
b) Bold: Switches or elements the user must specify as is.
c) Ellipsis (..): Parameter that can be repeated several times on the command line.
d) Between [] braces: Optional items.
e) Between {} braces, separated by | (pipe): User may choose one of the given options, each being separed by the pipe (|).
5. Examples
Here are a few examples to help understand the syntax, for simplicity we’ll send a common message called “Hello World!” in all the examples:
1. To all sessions of a user named Foo:
msg Foo Hello World!
2. To a session name SESSION11:
msg SESSION11 Hello World!
3. To a session Id session11:
msg session11 Hello World!
4. To all sessions specified in file ListOfSessions:
msg @ListOfSessions Hello World!
5. To all logged-on users:
msg * Hello World!
6. Remarks
There are a few important points to note while using this utility they are:
1. If the sender does not specify a name for the user or session, i.e. the recipient details then, the utility msg.exe will display an error message.
2. When the sender specifies the name of the recipients session, then, it must be an active session. An inactive session is one where the user has locked or disconnected a session without actually logging out. An inactive session can be resumed later by the user.
3. The user must have send message access permission to send a message.
7. Troubleshooting Problems
1. If the Windows operating system is forbidden to receive messages from another machine, the communication might fail. To make the Windows OS allow such communication, set the following key in the registry.
Registry Key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
Subkey:
AllowRemoteRPC
Value:
Set it to a value 1.
2. The command promt must be launched in elevated mode. You may do so by right clicking command prompt icon and choose “Run as administrator” or, press Ctrl+Shift and click on command prompt icon.
8. References
For further reading, you may refer the following links:
1. http://technet.microsoft.com/en-us/library/cc771903.aspx
2.
9. Bibliography
Session:
Defines the period during which a user logs on to windows and interacts with the system until he/she logs off.
|
|
Page 1 |
|
|
|
|
|