How to Message With CMD

By Daniel Hatter

One of the useful things you can do on the IT side of your business is to send messages over the network with the command line (CMD). In Windows Vista and Windows 7, the "msg" command replaces the "net send" command that was used in earlier versions of Windows. It is also compatible with the advanced versions of Windows Vista Business/Ultimate and Windows 7 Professional/Enterprise/Ultimate. For the msg command to work, you must first change a registry key on the recipient computer.

Send a Message Over the Network

Log on to the computer to which you want to send a message as an administrator, open the Start menu, type "regedit" in the "Search programs and files" box and press "Enter." The Windows Registry Editor will open.

Use the left pane to navigate to HKEY_LOCAL_MACHINE | SYSTEM | CurrentControlSet | Control | Terminal Server. Double-click on the "AllowRemoteRPC" registry key and change the value data to "1." Click "OK" and close the Registry Editor.

Open the Start menu on the computer from which you want to send the message and type "cmd" in the "Search programs and files" box. Press "Enter" to open a Command Prompt window. To identify the recipient computer, you can either use its IP address or its computer name and user name. For example:

"msg /server:ipaddresshere console Hello" or "msg /server:computernamehere usernamehere Hello"

Replace "ipaddresshere" or "computernamehere" and "usernamehere" with the actual IP address or computer name/user name. Change "Hello" to the desired message. Don't include quotes in the command.

Press "Enter" to send the message to the recipient computer. A message box will pop up on the recipient's screen.

Create a Message Batch File

Open Notepad and press "Ctrl-S" to save a new document. In the "File name" box, type "message.bat." Click the "Save" button. The file is now saved as a batch file, which runs using CMD.

Copy and paste the following text into the Notepad window:

msg * "This is your new computer!"

You can replace the text within the quotes with your own text.

Save the file and double-click on it to launch it. Your CMD message box will now be displayed onscreen. Click "OK" to close it.

You can string multiple message boxes together. When the first message box is closed, the next will open; and so on. For example, this code will display four message boxes one after the other:

msg * "Welcome!" msg * "Hello!" msg * "Good bye!" msg * "See ya!"

Click and drag the batch file over the Start menu, hold it over "All Programs" and drop it over the "Startup" folder. Once added, the message box(es) will be displayed onscreen at every login.