How to open an application from a windows service

  • Thread starter Thread starter Ricardo Correia
  • Start date Start date
R

Ricardo Correia

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
 
Your service does not have access to the user's windows desktop. Read up
about "Window Stations" in msdn. Note that most all recommendations say not
to do this as it is a security risk. However, if you are open to that risk,
you can check the box for "allow service to interact with the desktop" and
this will most likely allow your program to open. Just remember that if you
do that, the user basically now has admin rights on the machine since they
can take actions using local system priveleges (or whatever priveleges you
are running your service with).

Jerry
 
How Can I do that???

-----Original Message-----
Your service does not have access to the user's windows desktop. Read up
about "Window Stations" in msdn. Note that most all recommendations say not
to do this as it is a security risk. However, if you are open to that risk,
you can check the box for "allow service to interact with the desktop" and
this will most likely allow your program to open. Just remember that if you
do that, the user basically now has admin rights on the machine since they
can take actions using local system priveleges (or whatever priveleges you
are running your service with).

Jerry




.
 
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
 
Back
Top