views:

168

answers:

4

Suppose you have a process which run as as service as the System Account, is it possible to view the content of the windows created by the processes created by the service.

Suppose for example, that you have a service running as a kind of wrapper which starts Excel.

A: 

Microsoft Spy++

Select Spy/Processes and find your process there

If some of it's threads had created any windows, you'll see them as subtrees.

Quassnoi
A: 

Thanks for the quick answer, but sorry, my question was not clear.

What I wan to view is the windows content, not the list of existing windows.

A: 

A process that creates and fills windows should never be run as a service. That being said, if this is on Win2K3 or earlier set the service to interact with the desktop and you can see the contents yourself. If it is on Vista or later there is no way to examine the contents of an arbitrary window.

If it is a specific type of window (i.e. EDIT control) that supports retrieving its contents you may be able to run another service that sends a windows message to the first service to get what you want.

Stephen Martin
A: 

Services will (under normal circumstances) be associated with a different window station to the interactive desktop, and they cannot interact -- you can read up more on Window Stations on MSDN

Rowland Shaw