Click here to Skip to main content
15,920,603 members
Home / Discussions / C#
   

C#

 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 2:44
queries36518-Dec-08 2:44 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens18-Dec-08 2:51
Simon P Stevens18-Dec-08 2:51 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 3:48
queries36518-Dec-08 3:48 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens18-Dec-08 4:11
Simon P Stevens18-Dec-08 4:11 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 19:52
queries36518-Dec-08 19:52 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens18-Dec-08 21:48
Simon P Stevens18-Dec-08 21:48 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 22:27
queries36518-Dec-08 22:27 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Simon P Stevens19-Dec-08 1:27
Simon P Stevens19-Dec-08 1:27 
queries365 wrote:
This seems to be a good solution


It's better than a good solution. It's the right solution.

What you want to do is a bad idea. Firstly, as both me and Dave have explained, you should not be doing GUI stuff from a service. At all, and that includes calling other .exe files to display a GUI.

I strongly recommend that you take the time to do it properly now. Time spent up front doing things properly nearly always saves time in the future fixing all the problems. What you're basically saying is that you can't be bothered to do it properly, so you just want to hack out a bad version now.

I could be an arse and tell you it's not possible.

It is though.

But I don't recommend it.

In the right click on the service, and click properties, on the "Log on" tab, set the "log on as" to use the "local system account", and tick the "allow service to interact with desktop" check box. Now you can display a GUI to the user. So yes, just use Process.Start to call your exe and break all the good UI design guidelines I can think of.

I really recommend you do it properly though.

This only works on XP. Vista redirects services to a alternative secure desktop which the user doesn't see.

Simon

AnswerRe: Implementing Windows Application as a Windows Service Pin
Dave Kreskowiak17-Dec-08 2:21
mveDave Kreskowiak17-Dec-08 2:21 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36517-Dec-08 22:55
queries36517-Dec-08 22:55 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Dave Kreskowiak18-Dec-08 2:04
mveDave Kreskowiak18-Dec-08 2:04 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 2:33
queries36518-Dec-08 2:33 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Dave Kreskowiak18-Dec-08 16:32
mveDave Kreskowiak18-Dec-08 16:32 
GeneralRe: Implementing Windows Application as a Windows Service Pin
queries36518-Dec-08 19:59
queries36518-Dec-08 19:59 
GeneralRe: Implementing Windows Application as a Windows Service Pin
Dave Kreskowiak19-Dec-08 1:30
mveDave Kreskowiak19-Dec-08 1:30 
QuestionCode for Checkboxes / radio button at the time of Windows Setup Installer Pin
shavil17-Dec-08 1:05
shavil17-Dec-08 1:05 
Questionhindi font to its unicode Pin
Member 441328317-Dec-08 0:49
Member 441328317-Dec-08 0:49 
AnswerRe: hindi font to its unicode Pin
N a v a n e e t h17-Dec-08 0:57
N a v a n e e t h17-Dec-08 0:57 
GeneralRe: hindi font to its unicode Pin
Xmen Real 17-Dec-08 2:00
professional Xmen Real 17-Dec-08 2:00 
AnswerRe: hindi font to its unicode [modified] Pin
Leeladhar Ladia8-Apr-09 22:09
Leeladhar Ladia8-Apr-09 22:09 
QuestionMysterious Group Box Control Pin
musefan17-Dec-08 0:42
musefan17-Dec-08 0:42 
AnswerRe: Mysterious Group Box Control Pin
#realJSOP17-Dec-08 1:08
professional#realJSOP17-Dec-08 1:08 
GeneralRe: Mysterious Group Box Control Pin
musefan17-Dec-08 5:29
musefan17-Dec-08 5:29 
GeneralRe: Mysterious Group Box Control Pin
#realJSOP17-Dec-08 7:19
professional#realJSOP17-Dec-08 7:19 
QuestionGridView HeaderText Horizontaly Pin
EBeylo17-Dec-08 0:40
EBeylo17-Dec-08 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.