Using MSG.EXE


Recommended Posts

I've been fiddling with this MSG.EXE thing, can it do something like what NetSend can?

I use:

msg /server:<PCNAME> <USERNAME> <MESSAGE>

But I always get an error saying that:

<USERNAME> does not exist or is disconnected

Is it possible to get this to work?

Link to comment
Share on other sites

Well for one, its not really the same as net send. And you have the syntax wrong.. Its

MSG {username | sessionname | sessionid | @filename | *}

[/sERVER:servername] [/TIME:seconds] [/V] [/W] [message]

username Identifies the specified username.

sessionname The name of the session.

sessionid The ID of the session.

@filename Identifies a file containing a list of usernames,

sessionnames, and sessionids to send the message to.

* Send message to all sessions on specified server.

/SERVER:servername server to contact (default is current).

/TIME:seconds Time delay to wait for receiver to acknowledge msg.

/V Display information about actions being performed.

/W Wait for response from user, useful with /V.

message Message to send. If none specified, prompts for it

or reads from stdin.

So for example - from my one quad-w7 to other box p4-28g

msg adminstrator /server:p4-28g.local.lan test

post-14624-12677363813267_thumb.jpg

But just tested and you can put the /server before the username -- you might have a firewall blocking?

Link to comment
Share on other sites

BudMan, I don't know if anyone else has said this, but I find your posts responding to various issues to be of a high quality. I almost always learn something reading them. Just wanted to say that.

Link to comment
Share on other sites

BudMan, I don't know if anyone else has said this, but I find your posts responding to various issues to be of a high quality. I almost always learn something reading them. Just wanted to say that.

Ditto, I enjoy them very much. Thanks BudMan!

Link to comment
Share on other sites

I try and help as much as I can -- glad you guys are learning something!! If you like my posts -- make sure to vote them up.. The green + signs.. ;)

Link to comment
Share on other sites

As far as I'm aware... it only works on a Domain environment.

If your running your network as a workgroup... it won't work.

Link to comment
Share on other sites

It works in a workgroup just fine - that test was from my home boxes.. No domain.

Link to comment
Share on other sites

  • 3 months later...

I still can't get this to work. I am trying to send between XP and 7, when sending from XP it gets a access denied error. Vista and 7 say the user doesn't exist or is disconnected.

Yet I can sucessfully make each system send a msg to it's self.

All in the same workgroup.

perhaps you can't send between these OS's.

Anyone know whether this is possible?

Link to comment
Share on other sites

Ok -- when I tested it was from win7 to a 2k8 box.. So this was allowed by default since AllowRemoteRPC is set to 1 in the reg..

So I tested and duplicated your problem -- but then set on both machines

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\AllowRemoteRPC to 1

So I have now tested with xp --> w7 and win7 to xp and both ways work.

post-14624-12773190977655.jpg

Now I am logged into each machine as bud with the same password - so there is no permissions issues..

So I tested by logging in with a different account, and got access denied. So looking into that.. Also seem to have issues sending msg to different account logged other machine when even logged into account that matches up with account on other machine that has admin rights. So clearly some issues between w7 and xp.. But again this msg tool is really designed for sending messages to true terminal server.. I have to do some real work ;) but will get back to it to see if there is a way to make it work.. But for sure your going to have to enable allowremoterpc with w7 and or xp.. Just need to figure out what other permissions are coming into play.. Seems unable to determine if user session is there, even when account that has admin right on other machine using passthrough.

Getting this error when try to send from bud account on xp that matches up with bud account on w7 with same password, but bud-w7 is logged into the win7 box.

bud-w7 does not exist or is disconnected

So you found something interesting to look into ;)

Link to comment
Share on other sites

Ok -- figured out the issue I was seeing when trying to send to different users on the win7 box..

To xp from win7 works fine.

post-14624-12773266863119.jpg

As you can see bud-xp is logged into the xp box, and I sent him a message from the win7 box logged in as bud, and there is a bud account on the xp box with the same password to no permission issues. And by default admin shares are enabled on xp.

Now sending from xp to win 7, logged in as bud that matches up with an account on win 7 I was only able to send messages to bud, if he was logged in to the win7 box, if logged in with different account would get "user does not exist or is disconnected" error.

So I enabled admin shares on the win 7 box -- need to create this dword

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy and set to 1

This enables admin shares on win7, which are disabled out of the box.

Now I can send to a different account, ie bud-w7

post-14624-12773269650925.jpg

So for this to work in a non domain setup.. The account your using to send the message with has to have a matching admin account on the boxes your sending too, and looks like admin shares have to be enabled - which on win7 are disabled by default. And from before you also need the allowremoterpc setting.

Link to comment
Share on other sites

Wow that's some great info. I am going to give this a go later. Also I want to try going between win7 and vista, will it be the same?

I don't even know why I want this to work any more. I just want it to... :cool:

thanks for your help!

Link to comment
Share on other sites

Only vista box, which I just have not updated yet is my son's laptop who is no longer in the house - so would have to fire up a test box to verify.. But I would assume it would be the same, you would need to allow the do the allowremoterpc, and Im like 99% sure that vista also by default has the admin shares disabled - so will also need to do the LocalAccountTokenFilterPolicy -- if you have problems with it just let me know and will fire up a test of it.

Link to comment
Share on other sites

  • 1 year later...

i have a problem my Windows 7 Home premium doesn't have msg.exe. i enabled LocalAccountTokenFilterPolicy to 1 and AllowRemoteRPC to 1. But still that command (msg.exe) doesnt exist on my system. Is there somewhere i can download it

Link to comment
Share on other sites

  • 1 month later...
  • 2 years later...

Hi, ok I know this topic is old, but I'm trying everything on this thread and I'm seeing flames. I'm failing to send a message from XP to Win7, maybe what I need is a step by step guide. When I run "msg win7 /server:testxp testing xp" I get, Error opening Terminal server testxp
Error [1722]:The RPC server is unavailable. HELP!!!!

Link to comment
Share on other sites

"software firewalls: stopping people from doing what they want to do since 2001. "

heheheh - well stated, have to remember this line!!

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.