如何杀死系统进程 [英] How to kill a system process

查看:111
本文介绍了如何杀死系统进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在本地系统权限下运行的服务.该服务将根据需要启动和停止其他应用程序.由于该服务归系统所有,因此该服务启动的所有应用程序均归系统所有.如果由服务启动的应用程序挂起,则该服务有权终止该进程并在必要时重新启动该进程.但是,如果要求用户通过单独的维护应用程序终止由服务启动的应用程序,则由于缺少权限,终止进程将失败.

我该如何克服这个问题?

预先感谢.

I have a service that runs with the permissions of the local system. The service starts and stops other applications as necessary. Since the service is owned by the system, any applications started by the service are owned by the system. If an application that was started by the service hangs, the service has permissions to kill that process and restart it, if necessary. However, if a user, through a seperate maintenance application is required to kill an application that was started by the service, the process kill fails because of a lack of permissions.

How can I overcome this problem?

Thanks in advance.

推荐答案

AFAIK,如果您无权启动/停止该服务,则您将无法做任何事情.
AFAIK, you cannot do anything if you don''t have rights to start/stop that service.


如果当前用户无权杀死该进程,则可以使用模拟来使用admin帐户杀死该进程.

看看这里的模仿者示例:用于模仿用户的小型C#类 [ ^ ]
If the current user don''t have rights to kill the process, you can use impersonation to use the admin account to kill the process.

Take a look here for an impersonator example:A small C# Class for impersonating a User[^]


这篇关于如何杀死系统进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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