# msg.exe pickup help



## andythepandy (Jul 2, 2006)

Hi there,
I have written a macro in Excel which fills the contents of a .bat file with:

"C:\Windows\System32\msg.exe /Server:" + server + " " + user + " '" + msg + "'"

and then runs it.

The server, user and msg vars are all got from what the user enters in the spreadsheet.

Is there any way possible to pickup messages, send with the msg.exe command, that have been sent to the computer?

Thanks very much,
Andy


----------



## andythepandy (Jul 2, 2006)

To elaborate. 
I think that the messages sent with "msg.exe" are picked up with a service that is alwasys running. (I think it may be Terminal Services, but i may be completely wrong!)

I would like to find a way to detect incoming messages and grab the info. from them; i.e. the author and the message.

It would probably be very complex, but i'm thinking of doing this in VBA in excel.
Any help would be much appreciated!

Thanks,
Andy


----------



## TheOutcaste (Aug 8, 2007)

Messages are picked up by the Messenger Service, and displayed by the Alerter Service.
These are normally disabled on XP SP2 and later versions of Windows.

Afraid I don't know how to intercept them though.

Jerry


----------



## andythepandy (Jul 2, 2006)

I'm affraid I can't use messenger as i am on vista and it was removed with net send and stuff like that.

Thanks for the response though,
Andy


----------



## Squashman (Apr 4, 2003)

I know it can be done because I have seen third party utilities that do this that work with XP and Vista. I have no idea how to code it though.


----------

