Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's the best way to watchdog a desktop application?
    primarykey
    data
    text
    <p>I need some way to monitor a desktop application and restart it if it dies. </p> <p>Initially I assumed the best way would be to monitor/restart the process from a Windows service, until I found out that since Vista <a href="http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/f8f91e8f-5954-43a7-8bc4-80ed2ff1e3b1">Windows services should not interact with the desktop</a></p> <p>I've seen several questions dealing with this issue, but every answer I've seen involved some kind of hack that is discouraged by Microsoft and will likely stop working in future OS updates.</p> <p>So, a Windows service is probably not an option anymore. I could probably just create a different desktop/console application to do this, but that kind of defeats its purpose.</p> <p>Which would be the most elegant way to achieve this, in your opinion?</p> <p>EDIT: <strong>This is neither malware nor virus.</strong> The app that needs monitoring is a media player that will run on an embedded system, and even though I'm trying to cover all possible crash scenarios, I can't risk having it crash over an unexpected error (s**t happens). This watchdog would be just a safeguard in case everything else goes wrong. Also, since the player would be showing 3rd party flash content, an added plus would be for example to monitor for resource usage, and restart the player if say, some crappy flash movie starts leaking memory.</p> <p>EDIT 2: I forgot to mention, the application I would like to monitor/restart has <strong>absolutely no need</strong> to run on either the LocalSystem account nor with any administrative privileges at all. Actually, I'd <strong>prefer</strong> it to run using the currently logged user credentials.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload