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

Posted on 2009-12-30
Last Modified: 2013-11-20
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?

Question by:TomPro
    LVL 18

    Expert Comment

    Try it by switching Aero to Classic view.
    LVL 1

    Author Comment

    Just tried that, no luck.

    As a side note, I read the following article:

    Based on the article, it sounds like we might have to re-tool the code that displays our window to decouple it from running directly from the service executable.  But before we go down that road I'd like to rule out any workarounds that we could get through changing Windows settings.
    LVL 49

    Accepted Solution

    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.
    -- Dan
    P.S. You can turn off the Interactive Service Dialog Detection service, but that only "cures the symptom," not the disease.
    LVL 1

    Author Comment

    Blast.  At least that clarifies the issue.  Points awarded to DanRollins.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    I hope this helps those who have been battling the SanDisk / U3 problem for a while. For anyone that is running Windows 7 64bit and is receiving and searching the internet for the “Windows Error: Windows has allocated a drive letter to the U3 dri…
    A quick step-by-step overview of installing and configuring Carbonite Server Backup.
    This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now