Reputation: 373
i am planning to run a launch/monitor a UI application using a windows service(written in C#).with "Allow service to interact with desktop " checked. this works fine with windows xp, but with windows 7 a pop is shown as below
and when i click on view the message , then the whole screen blanks out,with only UI showing up ,as shown below.
is there any way to make it work without the message being shown and screen going blank.
comments/suggestions appreciated.
Regards DEE
Upvotes: 3
Views: 2776
Reputation: 36594
"Allow service to interact with desktop " is a legacy option that is now highly discouraged, and although it exists, is not expected to work in Windows Vista and upwards.
You need to read a bit on why this is the case in this other SO answer:
Allow service to interact with desktop in Windows
Then look for the alternatives discussed in the answer here:
Alternative to "Allow service to interact with desktop"?
Another discussion outside SO:
http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/f8f91e8f-5954-43a7-8bc4-80ed2ff1e3b1/
Upvotes: 3
Reputation: 612874
In Vista and later, services cannot interact with the desktop. Services run under what is known as session 0 isolation. What you are attempting is simply impossible.
You will have to re-write your application so that the UI part resides in a standard Windows application that runs on the logged in user's desktop. This UI part can communicate with the service by whatever IPC mechanism you prefer.
Upvotes: 7