By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

windows service to lunch windows application

P: n/a
Hi,

I have a windows service developed using c# and it needs to lunch another
windows application. I have been trying to use Process class to do it but the
problem is becase windows service running at background and using system
account, so the applcation it lunchs is also running at the background. is
there a way to lunch the windows application as current logged in user?

Thanks

Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try :
http://support.microsoft.com/default.aspx?kbid=306158

Patrice

--

"Michael" <Mi*****@discussions.microsoft.com> a écrit dans le message de
news:92**********************************@microsof t.com...
Hi,

I have a windows service developed using c# and it needs to lunch another
windows application. I have been trying to use Process class to do it but the problem is becase windows service running at background and using system
account, so the applcation it lunchs is also running at the background. is
there a way to lunch the windows application as current logged in user?

Thanks

Jul 21 '05 #2

P: n/a
No offence - but I read your post and muttered to myself "Man..there's
another term I have to look up.What does lunching a service mean". :-)

--
Sriram Krishnan

http://www.dotnetjunkies.com/weblog/sriram
"Michael" <Mi*****@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
Hi,

I have a windows service developed using c# and it needs to lunch another
windows application. I have been trying to use Process class to do it but
the
problem is becase windows service running at background and using system
account, so the applcation it lunchs is also running at the background. is
there a way to lunch the windows application as current logged in user?

Thanks

Jul 21 '05 #3

P: n/a
Elp
Michael wrote:
I have a windows service developed using c# and it needs to lunch
another windows application. I have been trying to use Process class
to do it but the problem is becase windows service running at
background and using system account, so the applcation it lunchs is
also running at the background. is there a way to lunch the windows
application as current logged in user?


Not really. A Windows Service has by default no access to the currently
logged in user's desktop. This is because it runs regardless of the logged
in user and even if no user is logged in.

However, if you open the Services control panel and go to the properties
page of your service, you will be able to allow it to interact with the
user's desktop. This should allow you to start a Windows application with
the Process class. Note that the application will not run under the logged
in user's account but under your windows service's account (by default Local
System). This poses big security issues and is not recommended. If you do
that you will also certainly run into problems if you try to start a Windows
application while nobody is logged in Windows.

In short: you'd better find another way to do what you want to do than
trying to start a Windows application from a Windows service. What about
placing a shortcut to the needed Windows application in the Startup folder
so that it would be launched automatically each time a user logs in?
Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.