I have a curious issue with MSG.EXE, the (relatively) new method by Windows to issue network popup messages.
The following statement:
msg aag /SERVER:100.100.100.22 /TIME:15 /V TEST
works fine from a Win7 cmd window, and the server receives the message immediately.
In PHP, however, shell_exec ("msg aag /SERVER:100.100.100.23 /TIME:15 /V ".$emailHeader);
does not produce any message and does not return any results either.
As a temporary workaround, I have embedded the first statement into a *.CMD batch file, which I call from PHP. However, (1) that is anything but elegant, and (2) it leads to up to 60 seconds delay in the transmission of the MSG, which in my case is a deal-breaker.
Any ideas on how to call MSG.EXE properly from PHP?