Link to home
Start Free TrialLog in
Avatar of malcolm29
malcolm29Flag for United States of America

asked on

Vista msg.exe to all users on a domain

We are trying to use msg.exe to send urgent messages to all users on our domain.  However, either it's not working or we're not using it correctly.  When we type
msg userid test message
We get the error: userid does not exist or is disconnected.
When we replace userid with * to get
msg * test message
the message doesn't send to anyone.
In doing some research, we've tried
msg /server:machinename console test message
but get Error 1722 getting session names.
We just want to find a way to send urgent messages to all machines.  Any ideas of how to use the message command to do this?  All machines are on the same domain.
Thanks.  Greg.
Avatar of MYCU
MYCU
Flag of United States of America image

Are all users on the domain using Vista? If you are trying to run this command to an XP machine then you will need to go in and enable the messenger service before it will work.
Avatar of inorbital
inorbital

I tried this in a Vista environment and I got the same message. I would GUESS there's a service that needs to be running somewhere on the server and on the client(s).

I tried using the server name, and the machine name in the server-parameter for this MSG.EXE and nothing worked...

Hmmm...
Avatar of malcolm29

ASKER

MYCU, we are in a mixed environment.  Neither Vista nor XP users are receiving the messages.  Plus, my understanding was that the MSG command didn't depend on the Messenger service, which is known to be insecure and which has been shut off in XP SP2 by default.  Any ideas?
Ok....I just tried this command msg "username" This is a test. I received the message on my computer becuase I put in my user name. However, when I tried to send the same message to another one of our users with their user name (on an XP) machine it tells me the user does not exist or is disconnected. I am expecting to get this message because the messenger service is disabled through active directory. If you are able to turn this service on (for XP machines) does the message get sent?
ASKER CERTIFIED SOLUTION
Avatar of Jason210
Jason210
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry the second fact should read
  • MSG.EXE is available on Vista machines.
Oh, you can send a message to yourself by writing
MSG * "Hello".
Very handy.
Nope...skip the speech marks
MSG * Hello.
Or, instead of the * you can put a domain logon name

MSG JasonD Hello
 
To allow and receive Messages through MSG.EXE (tested in Windows 7 Professional and Ultimate) perform the following:

1. Open the Registry Editor.
2. In the left pane, locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server

3. In the right pane, ensure value of AllowRemoteRPC key is 1. If not, please change it to 1.
4. Quit Registry Editor and Reboot the computer.
5. Run MSG command in a elevated CMD window.
Is it possible to change that key with a line of VBS script?
Also, is there a security risk in enabling RPC on workstations on a local network?
Jason210, you can add the registry keys to GPO through a VBS script. Check out here http://msdn.microsoft.com/en-us/library/aa384906(VS.85).aspx 

Also, I do not believe there is a security risk imposed by allowing remote RPC, however it was disabled in Windows XP SP2, so there may have been risk. As long as the workstations are properly secured behind a corporate firewall and protected by threat protection software (from viruses and the like) I have not seen any issues as of yet. The allowremoteRPC should only be enabled to allow communication behind a firewall, to other workstations/servers on the domain.
Thanks for this. Although I wasn't the original asker of the question, it's been of interest to me.
Of course everything here is behind a firewall. It is also protected by good AV software so I'll set this up and text it out.
This seemed like as good a place as any to pass this along.

I have been getting "Error [1722]: RPC sever is not available" when using msg.exe to send messages to Windows 7 and Windows Server 2008. It would work to XP and Server 2003 FROM Windows 7 and Server 2008. Everything I read here and other places said it should work and it didn't. I had the following:

AllowRemoteRPC set to 1 - was already set
Firewall off - I'm on a domain behind a firewall
Enable File and Printer Sharing - was off, enabling didn't fix it
Enable Network Discovery - was off, enabling didn't fix it.
The Windows 7 PC I was testing with didn't have AV running, don't know about another Windows 7 PC or the Server 2008
Starting RPC Locator - was not running, starting it didn't fix it.

So I started comparing registry entries between the XP and Windows 7 PCs. There is a value fDenyTSConnections for the Terminal Server in the same path as AllowRemoteRPC. The XP PC had this as 0 by default. The Windows 7 and Server 2008 PCs had this a 1 by by default. Changing it to 0 got it to work on both PCs. This probably applies to any O/S after Vista.

Hope this keeps somebody else from going crazy like it did me for 2 days.