Groups | Blog | Home
all groups > dotnet setup > november 2006 >

dotnet setup : How to use a service to start a regular windows application


illegal.prime NO[at]SPAM gmail.com
11/24/2006 3:31:17 PM
Hi all, I have a service that needs to start a regular windows
application.

I'm running the service as ServiceAccount.LocalSystem.

But, when it starts the process (using Process.Start) the GUI for the
application doesn't appear - however, I can see the process in the
TaskManager.

Now, feel free to mention that starting a regular windows application
using the LocalSystem account is a security risk and therefore I
shouldn't be doing this. But, what I'm more interested in is why the
GUI for this application isn't appearing in the current architecture.

I read in a few different places something about:
INTERACT WITH DESKTOP
and
RUN INTERACTIVE

Is it possible that the LocalSystem account doesn't have those flags
and that is why the GUI for this application doesn't appear? If so,
can I use impersonation or something to use an account that will show
the GUI for this application?

Thanks,
Novice
Peter Bromberg [C# MVP]
11/24/2006 5:10:01 PM
What is the goal? Do you want to start a specific program at a specific time?
just put an entry into Task Scheduler to run it on whatever schedule you want.

If you want to start the program when the OS starts, there are a slew of
registry entries you can look up that will enable you to do that, too.

If that's the goal, the general advice you'll get here is not to have the
overhead of a windows service to do this. Especially since services are
designed to start when the OS starts BEFORE any "Real user" has logged on and
would be able to see UI dialogs.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




[quoted text, click to view]
AddThis Social Bookmark Button