[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

C# - how do i activate a UI from win service?

Posted on 2011-02-13
5
Medium Priority
?
628 Views
Last Modified: 2013-12-17
Hi Experts

we wrote  a win service  with C#.  it is local system account
and even though the interact with desktop property is on -
i can't load a GUI or EXE with GUI.

is there a way to Load UI from win service?

10x
for the help
0
Comment
Question by:gudidi
  • 3
  • 2
5 Comments
 
LVL 71

Expert Comment

by:Qlemo
ID: 34882259
Starting with Vista GUI components of interactive services are catched on WinStation 0 (which has been the "Console" in prior OS', which does no longer exist with Vista and above). There is a service running (Ui0Detect) catching Windows and notifying you that there is something to be displayed. Confirming will switch to WinStation 0 temporarily.
You cannot circumvent that. If Ui0Detect does not run, you cannot switch to the Service Desktop.
0
 

Author Comment

by:gudidi
ID: 34882272
i don't understand.
so from the service i can not call GUI?
what is Ui0Detect?
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 34882303
I don't understand. I was expecting you to be an experienced developer, tried that already with XP or the like, because writing interactive services isn't something you would start with when learning.
How much do you know already regarding services?
0
 

Author Comment

by:gudidi
ID: 34882321
not much. icreate service with timer that activate some Dll's.
and now i want to activate Exe file with GUI.
0
 
LVL 71

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 34882396
First, read my post again regarding Ui0Detect - it is a service needed in your case. Check that.
If you are not getting a notification from your sevice when Ui0Detect runs, you will need to check for error codes returned in your service.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
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.
Suggested Courses
Course of the Month18 days, 9 hours left to enroll

825 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