重生已死亡的应用程序的最佳方法是什么?

发布于 2024-11-26 02:33:00 字数 1459 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我家小可爱 2024-12-03 02:33:00

我尝试使用带有计时器的 Windows 服务,但 Windows 服务的限制是用户可以停止该服务。

这不是 Windows 服务的限制。这是一个限制,因为用户拥有计算机,因此基本上可以做任何他们想做的事情或用它做任何事情。

没有办法创建不能停止或退出的应用程序。即使您设法找到一种方法从任务管理器中隐藏您的应用程序,半懂计算机的用户也可以找到另一个任务管理器风格的程序,允许他们退出您的应用程序。

Windows(以及所有其他最终用户操作系统)经过专门设计和编程,旨在防止这种异常的用户敌对行为,并且有充分的理由。

这不是一个编程问题,并且您永远无法通过该途径找到解决方案。您需要与系统管理员合作使用组策略来解决这个问题。组策略是 Windows 的内置功能,用于限制单个用户对其计算机的控制量,包括结束任务和/或停止服务的能力。

服务器故障上询问更多有关此问题的问题。

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.

贱人配狗天长地久 2024-12-03 02:33:00

注意:

这不是您应该尝试实现的答案。我会
如果不是因为对此的有趣评论,请将其删除。

听起来像病毒! :)

您需要有一个伙伴进程或另一个进程来定期检查该进程是否存在。如果没有找到,则重新启动它。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文