开发者

What is the best way to reincarnate an application that dies? [closed]

Closed. This question is off-topic. It is not currently accepting answers. 开发者_开发问答

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

How do I force an application to restart even after a user closes it or its process is killed from Task Manager?

I tried using a windows service with a timer but the limitation of windows service is that a user can stop the service.


I tried using a windows service with a timer but the limitation of windows service is that a user can stop the service.

This is not a limitation of Windows Services. It is a limitation of the fact that the user owns the computer and can therefore do basically whatever they want to or with it.

There is no way to create an application that cannot be stopped or quit. Even if you somehow managed to figure out a way to hide your app from Task Manager, a semi-computer-literate user could find another Task Manager-style program that would allow them to quit your application.

Windows (and all other end-user operating systems) are specifically designed and programmed to prevent this type of exceptionally user-hostile behavior, and for very good reason.

This is not a programming problem, and you'll never find a solution through that route. This is something you need to solve through the use of Group Policies in collaboration with your system administrator. Group Policy is the built-in feature that Windows has for limiting the amount of control that individual users have over their computer, including the ability to end tasks and/or stop services.

Ask more questions about this over on Server Fault.


NOTE:

This is not an answer that you should try implementing. I would have deleted it if not for the interesting comments on this.

Sounds like a virus! :)

You need to have a buddy process or another process that periodically checks for presence of this process. If not found, then restart it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜