如何在.net中创建难以杀死的应用程序/进程?

发布于 2024-11-02 01:35:14 字数 283 浏览 0 评论 0原文

保护后台进程/服务不被杀死的最佳方法是什么?我考虑创建 2 或 3 个服务,它们将相互监视并在它们停止时启动。

您知道实现此目标的更好方法吗?

干杯!

更新: 有一些评论说“不要这样做”。我不想伤害计算机或制造某种病毒。在某些情况下你需要做这样的事情,例如。家长控制。我知道操作系统是为用户服务的,但我想知道保护进程/服务免遭杀戮的最佳方法。

Update2:有一个关于用例的问题。该应用程序应监控并阻止儿童计算机上不需要的网站。孩子们应该能够安装/卸载其他软件,因此必须是管理员帐户。

What is the best way to secure background process/service from killing? I consider creating 2 or 3 services which will watch each other and start when they are stopped.

Do you know a better way to achieve this?

Cheers!

Update:
There are some comments which says "dont do that". I don't want to harm a computer or make some kind or virus. There are some situations where you need to do such a thing eg. parental control. I know that operating systems are for users, but I would like to know the best possible way to secure process/service from killing.

Update2: There was a question about use case. The application should monitor and block unwanted websites on children computer. The children should be able to install/uninstall other software so it have to be administrator account.

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

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

发布评论

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

评论(2

别挽留 2024-11-09 01:35:14

也许您可以解释一下用例?几乎可以肯定,有比使用恶意软件的方法来实现任何真正有用的功能更好的解决方案。如果不知道你在尝试什么,就很难给出建议。

编辑

您最好创建一个 Windows 服务并指示您的家长以管理员身份进行安装,同时拒绝子帐户修改该服务的权限。这样您的系统管理员(父母)就不会被剥夺对自己系统的控制权。

Perhaps you can explain the use case? There is almost certainly a better solution than using the approach of a malware for any genuinely useful piece of functionality. Without knowing what you're attempting it's hard to advise.

Edit

You would be better off creating a windows service and instructing your parent to install as an administrator, with child accounts being denied permission to modify the service. That way your system administrators (parents) aren't deprived control over their own system.

狼性发作 2024-11-09 01:35:14

这可能会导致不良行为,并可能导致运行您的应用程序的任何人进入安全模式并将服务设置为在启动时禁用。

最好让您的用户决定运行哪些服务。

This could lead to bad behavior and may lead anyone who ran your application to get into safe mode and set the services to disabled upon startup.

It's best to let your users decide which services to run.

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