Windows service
-
Process.Start
can start applications. But a service starting applications doesn't looks good. Services are not meant for this.Best wishes, Navaneeth
-
Process.Start
can start applications. But a service starting applications doesn't looks good. Services are not meant for this.Best wishes, Navaneeth
-
If I'm not mistaken, and I could be, you have to check the "Allow service to interact with desktop" option under the "Log On" tab of the service properties.
-
A windows service should not be used to start applications for users. However, if yu really want to do this, the service should wait for a user to log in, and then launch the app. You'll have to turn on "Interacts with desktop" in the service.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
That is not a good idea -- rethink the problem.
-
Services run under a non-visible desktop. What you want to do shouldn't be done at all. The "Allow the service to interact with Desktop..." option is for the service to put up a small user interface, like notifications or options dialogs. It is NOT going to allow the service to launch an application on the users Desktop. Any process launched by the service will inherit the session and desktop of the process that launched it, i.e.: your service. There's just about never a good reason to do this and I suspect you're approaching your design all wrong. For instance, what happens when your service needs to launch the UI app and there's noone logged in?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...