Windows Service-禁用进程终止 [英] Windows Service - disable process killing

查看:108
本文介绍了Windows Service-禁用进程终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在寻找一种编写可丢失的"服务的方法.
我发现可以创建不允许从服务列表中停止/暂停的服务,但是仍然有可能终止该进程.
AntiVirus软件(例如E-SET)具有此功能,并且在尝试终止进程时,会显示一条消息访问被拒绝".

您能告诉我该访问被拒绝"消息是如何实现的,这样我的服务将无法正常使用"吗?

*它的目的是为我们的组织编写内部服务.

谢谢,
Amir

Hi,

I''m looking for a way to write "unkillable" service.
I found out that it''s possible to create a service that won''t allow to stop/pause from the services list, but it''s still possible to kill the process.
AntiVirus softwares (such as E-SET) has this functionality, and when trying to kill the process a message is displayed "access is denied".

Can you please advise how this "access is denied" message can be achieved, so my service will be "unkillable"?

* The purpose of it is to write internally service to our organization.

Thanks,
Amir

推荐答案

我认为最简单的解决方案是拥有一个监视服务,如果该服务被杀死,它将重新启动该服务.主要服务还可以确保监视服务正在运行.

我认为Windows资源管理器是这样工作的.如果您杀死它,它将被重新发送.

这比阻止终止要好得多,因为如果有问题,您可以选择重新启动终止.
I think the easiest solution would be to have a monitoring service that would restart the service if it was killed. The main service would also ensure that the monitoring service is running.

I think that Windows Explorer works like that. If you kill it, then it will be resarted.

This is far better than preventing a kill as you have the option to restart it if there is a problem.


这篇关于Windows Service-禁用进程终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆