Saturday, May 11, 2013

Service to reatart notepad if it is not running

Hello All,


I am trying to create a simple windows service that will detect if notepad.exe is running. If it stops running I want it to open notepad again. Originally, I had a console app that just loops and uses Process.GetProcesses("notepad.exe"). But always looping I noticed I was using too much CPU. Not sure how to implement this same logic in a service, but essentially just want to do this without using too much CPU. Any help greatly appreciated


No comments:

Post a Comment