I'm attempting to use psexec
to spawn a process on a remote machine (for automated testing purposes) and noticed that the spawned process wasn't correctly responding to a message (WM_GETOBJECT
, but that's another question entirely). I opened spy++
in an attempt to see why, but I couldn't log any messages going to my process' window. The window properties also indicated that the "Windows Proc" for the window was "Unavailable":
.
I think this is a behavior of Windows services since psexec
uses an embedded service on the remote machine to launch the requested application. I was logged onto both machines with the same credentials so I don't believe it is a user security issue but rather a service-related behavior.
As a sanity check I wrote a quick standalone server and client to execute a program remotely and everything worked as expected: the Window Proc was no longer "unavailable" and I could spy on messages.
I used the normal Windows Calculator (calc
) for all my tests, i.e.:
psexec.exe -i \\other-machine calc
My question: Can someone confirm, explain, and/or cite why I can't see message queues of processes spawned off services? Also is there a workaround to this? I'd rather use psexec
than my custom solution. Bonus if you can also explain why WM_GETOBJECT
doesn't return my custom UI Automation provider in this situation as well, as that's my original problem.