Note

If the firewall is not turned off, then the program Nassi should be included in its exceptions.

Send text command Net messages send

Text messages by local network can be sent not only to special programs(Radmin, Nassi), but also from command line Windows XP. Team Net send serves for sending text messages another computer accessible on the network. However, in order to team worked, you must initially enable the message delivery service. To do this, go to Control Panel. Open the folder Administration, Services. Find the messaging service in the list (Fig. 20.9).

Rice. 20.9.

Open its properties. Select meaning Auto from the list Launch type if you want the service to automatically start on boot Windows. Then click on the button Start And OK(Fig. 20.10 and Fig. 20.11).

Rice. 20.10.

Rice. 20.11.

Let's look at examples of using the command net send when sending messages in workgroup (domain) 110. To send a message to all users in workgroup 110, enter: net send /domain:110 CONNECTION CHECK. Another variation of a similar command: to send a message to all users in your domain, enter: net send * ping(Fig. 20.12 and 13)



Rice. 20.12.

Rice. 20.13.

To send a message to a specific user, for example 110-1, enter: net send 110-1 HELLO!(Fig. 20.14).

Rice. 20.14.

IN Windows XP has another option for sending messages over the network. Run the commands Control Panel-Administration-Computer Management. Further: Action - All tasks - Send console message. Next, select a PC and send it a text (Fig. 20.15).


I was faced with the problem of informing users, the most common reason is a 1C update, which requires all my users (and there are more than 160 of them) to log out of 1C and not log in for some time. It would seem that there’s nothing complicated about it, you can send a message via e-mail, as I did before when I had Office 365, but Yandex mail has its limitations: no more than 50 users on the mailing list. If you send it to more users, then the letter will simply not reach some. Sending 50 users separately is not convenient. The second problem with Yandex mail is that in some cases the system perceives the need to enter a captcha mass mailing like spam, but the letters are necessary, if you don’t warn the user, they won’t be saved in time and there may be problems...

In general, it has become terribly inconvenient to send messages to all users. I started thinking about possible solutions.

The first thing that came to mind was: , but several inconveniences emerged:

  • Messages arrive within approximately 30 minutes to 160 workstations, which is a very long time.
  • The message appears only on the taskbar; if the user works via a remote desktop, he will not see the message immediately.
  • It is necessary to maintain the functionality of Kaspersky agents on the user’s working machines, otherwise the message will not arrive at all.

The second option is to install some kind of messenger, but here there are also several inconveniences.

  • There are a lot of messengers, they are not universal, you cannot send messages to each other between messengers.
  • Good messengers are paid.
  • Messages do not pop up on top of all windows, and if you need to communicate something urgent and important, then this is a useful property of the message.
  • It requires installation and configuration of these instant messengers, as well as user training in new software.

As a result, I'm on the team Windows line, there are net send and msg commands to send messages to all computers on the local network. It all works very simply, you open the command line, write a command, a message is sent to the computer whose name you specified in the command text. Moreover, the message pops up on top of all windows, no registration is required, and everything is completely free.

The command for sending messages to one computer on the local network looks like this:

msg * /server:computername “Test message, click OK”

I made a list of computers, then a little tedious work on creating the same type of commands in one txt file, but it’s done quickly via copy-paste. The main thing is to make a list of computers. In a domain, this is done quite simply through the Users and Computers snap-in, right key under the list of computers, then “Export list” directly to a TXT file. Since I have about 160 computers in the domain, I approached the issue a little more creatively, I didn’t do “copy-paste”, but in the already existing list of computers I auto-replaced the first letter in the computer name with msg * /server: + The first letter in the name of the computers, luckily for me, it was the same for everyone. Similarly for the second part, but only with the last letter of the computer name (the last letter in the computer name + "Test message, click OK"), as a result I received a TXT file with a list of commands. I changed the file extension from txt to bat and launched it for execution. As a result, all computers in the domain received a “test message, click OK.”

Unfortunately, such a command does not work outside the domain, and since I completed the task, it was simply not rational to experiment further. I was unable to send messages to computers in the workgroup, but I have only a few such computers. You can send them a message by mail, or in Kaspersky, or through some messenger. Let this be a topic for one of the following entries.

As a result, what I received: 1 file in which you can quickly change the text of the message and with which I can send any message for free to everyone in the domain. It seems great, but there are still a couple of disadvantages:

  1. It is necessary to keep the file up to date, add new ones, delete non-existent computers.
  2. No prompt feedback.
  3. The file turned out to be ugly, I think you can load the computer name values ​​from the file into this command, but there was no time to figure it out completely.

However, the pros outweigh all the cons:

  • Quick to implement, requires virtually no preparation for the next shipment.
  • It works reliably, the user will definitely see this message.
  • For free.
  • Very, very simple, you just need to know one command and computer names.

I will be glad to receive any comments, suggestions)

Team MSG existed back in Windows 2000/XP and was intended for exchanging messages between users logged in locally and users of terminal sessions (connected to a remote desktop). In Windows Vista and later family operating systems Windows command MSG has become mainstream standard means messaging because the team net send This OS is no longer supported.

Command line format:

MSG (user | session name | session ID | @filename | *) [message]

Description of command line parameters:

user- Username.
session name- Session name.
Session ID- Session ID.
@file name- A file containing a list of usernames, sessions, or session IDs to which the message is sent.
* - Send a message to all sessions on the specified server.
/SERVER:server- Server (default - current).
/TIME:seconds- Waiting interval for confirmation from the recipient.
/V- Display information about completed actions.
/W- Waiting for a response from the user, useful together with /V.
message- The message being sent. If not specified, a prompt is issued or input from STDIN is accepted.

Important!

The current implementation of msg.exe is perfect for exchanging messages between sessions of local and terminal users within the same system, however, in cases of exchange between different computers local network, you will need to change some default security settings in Windows Vista, 7 and later operating systems.

With standard settings, sending messages to users remote computers fails and is accompanied by the message:

Error 1722 when retrieving session names

This means that the computer where the message is to be received cannot obtain information about the logged-in users. The reason may be that the firewall is blocking incoming connections, the user's rights in relation to the remote system are insufficient, or remote procedure calls are prohibited in the terminal server service parameters. At a minimum, for messaging using the command msg between computers, you must have a user account valid for the remote system and make the following settings:

  • on each computer to which messages will be sent, add to the registry key HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server parameter AllowRemoteRPC type REG_DWORD and equal 1 To change the settings, you can use the .reg file with the following content:

    Windows Registry Editor Version 5.00
    "AllowRemoteRPC"=dword:00000001

    In Windows Vista, Windows 7, 8, 10 registry key AllowRemoteRPC exists, but has the same value 0 what needs to be fixed. A reboot is required for changes to take effect.

  • because the messaging utility msg.exe uses SMB protocol(Server Message Block), each computer to which messages will be sent must have an open TCP port 445

    Examples of using MSG:

    msg * /server:Server "Test message"- send a test message to all computer users Server

    msg * /server:192.168.0.1 "Test message"- send a test message to all users of a computer with an IP address 192.168.0.1

    msg RDP-Tcp#0 /server:TSServer "Test message"- send a test message to a terminal session user named RDP-Tcp#0 on the computer TSServer

    msg console /server:Windows7 "Test message"- send a test message to the current local user computer Windows7

    msg console "Test message"- sending a test message from an RDP session user to a local user. If this command is not executed by a terminal session user, then the message will be sent by the local user to himself.

    To execute a command msg You can use the utility on behalf of another user PSExec from the package PSTools or standard means runas.exe

    psexec -u otheruser -p otherpass msg * /server:win10 TEST message

    runas /user:otheruser "msg * /server:win10 Test message"

    Messages sent by the team msg local user of a computer with an operating system Windows system XP, which is missing (not yet included in Windows) are displayed in the window prompting you to register on the system and may be accessible to outsiders.