Running programs from windows service

D

D2

Hi,

My windows service based application launches applications using
System.Diagnostics.Process class' Start method. However it has come to
my notice that vista is displaying a Interactive Dialog Detection
window whenever this service starts a program using the above
mechanism. Could someone throw some light on the interactive dialog
detection and how we can avoid this dialog?

thanks,
dapi
 
A

Alex Clark

The best way... is not to launch processes from your service.

Vista is (quite correctly) warning the user of a potential security risk,
because your service (which is likely running under an elevated account) is
trying to spawn another process (which will start with the same security
privs as your service). That process would have sufficient privs to do
harmful things (delete system files, alter the registry etc) and thus Vista
prompts the user for confirmation.

In simple terms, avoid launching apps from your service wherever possible -
it's not good security practice. If you cannot avoid it, you might be able
to look into other solutions involving the task scheduler (i.e. schedule a
process to start under the interactive session in the next 5 seconds, one
time only).
 
F

Family Tree Mike

In addition to what Alex wrote, in XP, without enabling desktop interaction,
your service should have had issues. Vista prohibits this altogether. As
far as I know, there is no way arround this block.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top