Please note that in case several instances of the Softros LAN Messenger are running on the same machine (if it is a terminal server for example) and the message is sent using an IP address or computer name, all online users of Softros LAN messenger on the machine will receive the message.

Messaging Automation With Command Line

Softros LAN Messenger offers two ways to integrate message sending via Softros LAN Messenger from your app or script. The simpler way is represented in a form of a command-line tool and deeper integration is possible with a dynamic link library (DLL). Both methods require:

Sending Messages using Command Line

Softros LAN Messenger’s messaging automation can be done by command-line utility MessengerCMD.exe, located in the Softros LAN Messenger installation folder, SDK subfolder. After the program is installed the MessengerCMD command is available from any working directory, so there is no need to use the full path to call it. The tool cannot be used on a system where Softros LAN Messenger is not installed and running.

With MessengerCMD you can:

Usage: MessengerCmd –SendMessage –t:TypeOfRecipient –r:Recipient –m:MessageText

Command line parameters for MessengerCMD

Parameter Description
-SendMessage Sends a message
-t:TypeOfRecipient The type of Recipient must be one of the parameters listed in the Recipient Types section below.
-r:Recipient Recipient. The format depends on the type. Can be omitted only if TypeOfRecipient is All. See the Recipient Types section below.
-m:MessageText Text of the message to be sent. Message text must be in double quotes in case any space characters are present in the message. Any double quote characters inside the message are stripped. No line breaks are supported.

Recipient Types

Depending on the information known about the recipient one of the following recipient types must be used.

Recipient Type Utility behavior
UID Sends a message to a user using their UID. To retrieve the UID, right-click the user’s name in the list, and then click Get Information.
  • Sends to online and offline users.
  • Case insensitive.
Example: MessengerCmd –SendMessage –t:UID –r:A341468500 –m:"message text"
IP Sends a message to an IP address.
  • Sends to online users only.
  • IPv6 is not supported
Example: MessengerCmd –SendMessage –t:IP –r:192.168.81.1 –m:"message text"
PCName Sends a message to a machine by its name.
  • Sends to online users only.
  • Case insensitive.
Example: MessengerCmd –SendMessage –t:PCName –r:MYDESKTOP –m:"message text"
UserName Sends a message to a user using their exact username.
  • Sends to online and offline users.
  • Case sensitive.
  • Username must be in double quotes in case any space characters are present in it.
Example: MessengerCmd –SendMessage –t:UserName –r:"John Hopkins" –m:"message text"
Group Sends a message to all members of a group using the group’s exact name.
  • Sends to online and offline users.
  • Case sensitive.
  • The group name must be in double quotes in case any space characters are present in it.
Example: MessengerCmd –SendMessage –t:Group –r:"Accounting dept." –m:"message text"
All Sends a message to all users on the list, both online and offline.

Example: MessengerCmd –SendMessage –t:All –m:"message text"

Return codes for MessengerCMD.exe

Return Code Description
0 The command has been executed successfully.
1 Error: The recipient has not been found.
2 Error: The SDK API is not enabled in the Admin.ini.
3 Error: Softros LAN Messenger is not running.
4 Error: Required files not found. Reinstall the Softros LAN Messenger.

Successful execution of the command does not guarantee the message has been received by the recipient. For example, in case the recipient is offline, the message is stored for later delivery.