Question : Is there a way for a Windows 7 Service to display a window in another user's session?

We have a program that we developed for Windows 2003 that runs as a service.  The service runs under a user account that has administrative privileges.  Under Windows 2003, this program will display a status window in the console session, but not in any remote desktop sessions.  For example, if I log into the system's console with my personal account, I can see the status window from the service (even though the service itself runs as a different user).  However, if my coworker connects via remote desktop, he will not see the status window.

When we have tried running this program in Windows 7, the behavior is quite different.  If I log into the console of the system, the window from our service doesn't show up.  Instead, I get a dialog from Interactive Services Detection that informs me that "A program running on this computer is trying to display a message".  When I click on it I'm taken to what seems like another terminal session where I can interact with our service's status window but no other windows.

I'd like to find a way to:
1.  Make the status window visible for whoever is logged into the system console.
2.  Continue running this service under a separate administrative account.

Is there such a way to do this under Windows 7?

Thanks!

Answer : Is there a way for a Windows 7 Service to display a window in another user's session?

Indeed.  I have the same problem and as far as I can tell, there is no workaround.

For many years, Microsoft has been warning us that the whole "Interact with Desktop" concept  was one day going to go away.  With Win7, it has.

In my case, my Service can be run "blind" -- with no user interaction.  But that leaves the user with only minimal control (start / stop only), no clean/simple way to make settings changes, and a severe lack of activity feedback.

The solution is to bite the bullet and rewrite the service so that it has no user interface and communicates using an external control program via RPC or other mechanism.

see: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/ea6bbfac-a472-46c3-afb3-953a3d100fdf/

-- Dan

P.S. You can turn off the Interactive Service Dialog Detection service, but that only "cures the symptom," not the disease.

Random Solutions  
 
programming4us programming4us