Windows Services in Win7?

Posted by Brandi on Stack Overflow See other posts from Stack Overflow or by Brandi
Published on 2010-03-25T15:45:21Z Indexed on 2010/03/25 15:53 UTC
Read the original article Hit count: 276

I am trying to make a service that spawns a desktop application, and then watches to make sure it restarts again if it is closed. .

I would like it to basically spawn the process and then forget about it, allowing to act like a normal interactive application. (Apparently this is much easier to do in XP and before, but I need this for XP, Vista, and 7)

My problem now is that either it shows up invisible if I use process.start() with desktop interactive checked, and if I directly spawn a form it asks "Do you REALLY want to do this?!" and then the whole screen goes blank EXCEPT for my program.

I just want this to be an inoffensive background app. I have the app working well, I just need to figure out how to spawn it from a service without all the trouble.

I am finding all of this stuff that says "Don't make services that have UI", but first off this was a requirement that was given to me. (Boss does not want it to be a scheduled task) Also, I noticed that the Task scheduler is itself a service, and it does not have any problem spawning user interactive applications. Why can't I do that too?

What am I doing wrong?

© Stack Overflow or respective owner

Related posts about windows-services

Related posts about windows-7