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

How to open an application from a windows service

P: n/a
Hello,

Does anyone know how to open an application from a
windows service??
For example, I have a windows service running and using a
timer or something else I want to open Windows Calculator!
I used:
Shell("calc", AppWinStyle.NormalFocus)
and
Process.Start("calc")
but nothing seems to work!

Thanks for any help,
Ricardo Correia

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


P: n/a
If you're using the SYSTEM account to run the service and/or the service is
not configured to be able to interact with the desktop then you won't have
much luck.

Services are not supposed to launch applications.

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Ricardo Correia" <ri*************@rcsoft.pt> wrote in message
news:00****************************@phx.gbl...
Hello,

Does anyone know how to open an application from a
windows service??
For example, I have a windows service running and using a
timer or something else I want to open Windows Calculator!
I used:
Shell("calc", AppWinStyle.NormalFocus)
and
Process.Start("calc")
but nothing seems to work!

Thanks for any help,
Ricardo Correia

Jul 21 '05 #2

P: n/a
I'm using the SYSTEM account and I've enabled the
option "Allow service to interact with desktop". If I try
open an application like Calculator it works fine but if
I try to open an application that I've made it doesn't.

Shell("calc", AppWinStyle.NormalFocus) ---> this works

Shell("alertas", AppWinStyle.NormalFocus) ---> this
doesn't

Thanks for any help

Ricardo Correia
-----Original Message-----
If you're using the SYSTEM account to run the service and/or the service isnot configured to be able to interact with the desktop then you won't havemuch luck.

Services are not supposed to launch applications.

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Ricardo Correia" <ri*************@rcsoft.pt> wrote in messagenews:00****************************@phx.gbl...
Hello,

Does anyone know how to open an application from a
windows service??
For example, I have a windows service running and using a timer or something else I want to open Windows Calculator! I used:
Shell("calc", AppWinStyle.NormalFocus)
and
Process.Start("calc")
but nothing seems to work!

Thanks for any help,
Ricardo Correia

.

Jul 21 '05 #3

P: n/a

"Ricardo Correia" <ri*************@rcsoft.pt> wrote in message
news:08****************************@phx.gbl...
I'm using the SYSTEM account and I've enabled the
option "Allow service to interact with desktop". If I try
open an application like Calculator it works fine but if
I try to open an application that I've made it doesn't.

Shell("calc", AppWinStyle.NormalFocus) ---> this works

Shell("alertas", AppWinStyle.NormalFocus) ---> this
doesn't


Ok... is "alertas.exe" in the path? Or does it work if you provide a fully
qualified path?
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

Jul 21 '05 #4

P: n/a
Yes, Alertas.exe is in "c:\windows\system32" path, and is
a VB.NET aplication.
-----Original Message-----

"Ricardo Correia" <ri*************@rcsoft.pt> wrote in messagenews:08****************************@phx.gbl...
I'm using the SYSTEM account and I've enabled the
option "Allow service to interact with desktop". If I try open an application like Calculator it works fine but if I try to open an application that I've made it doesn't.

Shell("calc", AppWinStyle.NormalFocus) ---> this works

Shell("alertas", AppWinStyle.NormalFocus) ---> this
doesn't
Ok... is "alertas.exe" in the path? Or does it work if

you provide a fullyqualified path?
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

.

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.