Link to home
Start Free TrialLog in
Avatar of Lionel MM
Lionel MMFlag for United States of America

asked on

MSG that replace net send

It used to be that I can use "net send * Have nice day"; and everyone in my domain will get a popup that says "Have a Great Day".  Now with Windows Server 2008 and I can no longer do so. Can anyone give me a replacement that will do EXACTLY the same thing. The replacement message, as best I can figure it, has no such feature--it requires that I address each person with username, seesionname, server which makes all of this very complicated. I simply want my mixed domain od Windows XP PCs, Windows 2003 Server and Windows 2008 Server to get a popup when I need to communicate with all those systems. Thank you!
Avatar of jppinto
jppinto
Flag of Portugal image

Without using any 3rd party tool you can't do it anymore. MSG.EXE is only able to send to a specific machine, basically built for Terminal servers to inform all logged on users.

jppinto
Avatar of younghv
You could probably get the VB/Scripting guys to work something up for you - pulling the actual host names from a text file (but that is way beyond my skill set).

I am more curious of how you could type "Have nice day" and then have a message delivered that read "Have a Great Day"

(Just a little end of year humor.)
Avatar of Lionel MM

ASKER

younghv: You got me--I screwed up--focused on the wrong thing; thanks anyways!
Do you have any aditional question on this one?
For the record - my comment was just an observation, but 'jppinto' gave you the real answer.

IOW - no points for me...I'm over 3,000 for the month and they would be wasted.
jppinto: NO additional questions--original question stands--looking for a solution to replace net send * which I still do not have. No solution yet--waiting to see if others have one or not.
lionelmm,

there is nothing to add to this question! As I said, without any other tool, you can't send messages to all of your users using Windows Server 2008...

jppinto
PS: you can always wait to see if anybody gives you a clue of the type of tool that you can use to do this...
NET SEND was removed for security reasons.  There's plenty of alternatives - here's one free one:
http://www.lantalk.net/netsend/
I installed it on my Windows 7 PC--ran netsend /* /testing -- did not work;
even tried netsend /computername /testing and
netsend /username /testing and no popup message

I copied this from the url you gave me and it does not mention Windows 7 so maybe it does not work in it, which was my experience
Small console utility that can be used to send the messages from an command line, like Net send command in the Windows NT, Windows 2000, Windows XP and Windows 2003 Server. But our utility Netsend.exe works in all Windows versions, including Windows Vista where build-in net send command is removed.
I am using msg to send alert messages to all users in our domain from time to time.
You need:
-admin rights on all computers you are trying to reach (use a domain admin account)
-a small script that uses net view to dump the names of all computers to a text file, then does some search and replace on that text and then uses a for loop to start sending a message to each computer. To get any user that is logged on, use the asterisk:
*                   Send message to all sessions on the specified server.

if you need help with the code, I could provide mine on jan 3rd.
McKnife: why Jan 3? Sounds like what you have would work!
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany 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
Hi.

Now I got access to my script here - it's indeed the same (apart from chcp 1252 and chcp 850 at start and end to ajust the codepage to our language's needs). What you have to be careful about are computer descriptions (like pc1; exchange server). If you have configured some, those have to be replaced, too.
So the idea is to do a net view command, see what shows up, and then do a ssr (replace) of those comments so that all I am left with is the computernames and nothing else, and then all those names that are left will get a
do msg * /Server:%%a Put Your Message HERE
I have tested it on my Windows 7 PC and it works--will test on my Windows Server 2008 later today.
It works but only for Windows 2008 server but not Win7 and XP systems. I have a mixed environment where some systems are Win7 others are Win XP and since the system from which I am sending this is WinServer 2008 it works sending it to itself but for the others I get this error--note the last one gave no error--its the server and it works

C:\Utils>msg * /Server:KENNY Please email or call me if you get this, Lionel
Error 5 getting session names

C:\Utils>msg * /Server:ROB Please email or call me if you get this, Lionel
Error 5 getting session names

C:\Utils>msg * /Server:SCOTT Please email or call me if you get this, Lionel
Error 5 getting session names

C:\Utils>msg * /Server:SERVER Please email or call me if you get this, Lionel
Lionel, you missed one important thing I wrote:
Additionally but none the less important: you first need to propagate a registry key to all target computers (can be done using scripts or Group policy preferences):

Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
 "AllowRemoteRPC"=dword:00000001

Please not: this key is present on servers by default, that's why it already works for those.
Sorry--will do. How can I do this with GP?
"(can be done using scripts or Group policy preferences)" :)

Use GPPs. Install MS kb943729 to your xp and vista boxes, win7 does not need that patch as it already contains it. Read http://www.microsoft.com/downloads/en/details.aspx?FamilyID=42e30e3f-6f01-4610-9d6e-f6e0fb7a0790&DisplayLang=en - it's easy and a must have.
That works--made the change manually on one XP system and it worked--thanks so much--finally something I put into all my batch files that use net send although it will have to be with a call instead of one line -- but that's Microsoft for you--always doing stuff that makes no sense.
Finally something to use that can replace net send
MS is not that dumb after all. They kicked net send (the messenger service) out of vista/win7 because they saw possible security concerns - maybe the same they crippled msg for.
They could have fixed net send's security issues instead of not giving us something to replace--same as "the Show Desktop" icon--why move it from the left to the right--what's up with that!
Thank you for this script. Looks like it will be great, but when I run this command, my computers are preceeded by a double backslash. This is causing this to fail. Is there a way around this?
You did not download ssr. ssr does serach for \\ and removes those. Place ssr to d:\tools\ssr (or better: adjust the path)
DO you have a constant list of systems you wish to meg? If so simply create a list of systems in text file like this
system1
system2 etc etc. Save the file--in my case I named it SystemsList.Txt
One system name per line. Then simply create a batch file that you use or that ypu can call with this in it

for /F %%a in (C:\Utils\SystemsList.Txt) do msg * /Server:%%a Put your message here

The most important thing to do is, from user McKnike is--if you don't do this to your registry for Win XP systems, MSG won't work
Additionally but none the less important: you first need to propagate a registry key to all target computers (can be done using scripts or Group policy preferences):

Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
 "AllowRemoteRPC"=dword:00000001