MSG command fails in Windows 7
Back in the days, the net send command-line tool used to be quite popular among systems administrators and let’s be fair, it used to run smoothly and fulfilled a purpose. Though, I have seen many instances where it was used to prank users with fake messages like ‘hi, the system has detected that you have a low IQ. Please consider upgrading for better performance’. Since Vista, Microsoft introduced the message (msg.exe) command-line tool instead, which like the net send worked like a charm. However, in Windows 7 the MSG command may fail to send a message and returns an ‘Error 5’ message.
This is due to a default setting in Windows 7 that disallows remote RPC sessions! But you can get Msg.exe to work by modifying a setting in the registry. Also, remember that the account you are logged on with on your Windows 7 computer has administrative privileges on the remote computer and you need to modify the registry setting on the remote computer.
To start the registry editor, type regedit in the Start menu search text box and press enter. Go to the following registry key and change the AllowRemoteRPC value from 0 to 1
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
DWORD (32-bit) Value name: AllowRemoteRPC
Value: change from 0 to 1
A word of caution – incorrectly editing the registry may severely damage your system. The above modifications are intended for Windows advanced users who are familiar with the registry editor. Users are also reminded to back up the registry before making any critical changes.