What's the best way to watchdog a desktop application?

前端 未结 4 775
清歌不尽
清歌不尽 2020-12-01 05:39

I need some way to monitor a desktop application and restart it if it dies.

Initially I assumed the best way would be to monitor/restart the process from a Windows

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 06:07

    Initially I assumed the best way would be to monitor/restart the process from a Windows service...

    Sure you can! I did it some times ago. You can start learning how watching this:

    http://msdn.microsoft.com/en-us/windows7trainingcourse_win7session0isolation_topic2#_Toc243675529

    and this:

    http://www.codeproject.com/Articles/18367/Launch-your-application-in-Vista-under-the-local-s

    In substance, you have to run programs as SYSTEM, but with the SessionID of the current user.

    If you're feeling lazy, I suppose there could be some good little Services which make the thing you're looking for. Try searching on www.codeproject.com.

提交回复
热议问题