TerminateProcess不适用于已验证的进程ID [英] TerminateProcess doesnt work for verified process id

查看:261
本文介绍了TerminateProcess不适用于已验证的进程ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理应用程序,它应该杀死具有给定名称的进程。
我使用的操作系统是windows 7.事情是,对于任务管理器中列出的所有进程,使用非空白的USER NAME字段,它工作正常。但是,当一个进程有一个空的用户名不能被杀死即使任务管理器。

I am working on application that is supposed to kill a process with a given name. Operating system I use is windows 7. The thing is that for all processes listed in task manager with a non-blank USER NAME field it works fine. However when a process has an empty username cannot be killed even by task manager.

任何人都可以告诉我为什么有些进程没有用户名。在我的情况下,它是csrss.exe winlogon.exe和不幸的是一个旧的应用程序,我想杀了。我检查的所有其他进程有一个正确的用户名。

Can anyone tell me why some processes has no user name. In my case it is csrss.exe winlogon.exe and unfortunately an old application I want to have killed. All other processes I examined has a proper username.

有任何方法可以为现有流程添加用户名吗?

Is there any way to add a username to existing process ?

任何人都可以推荐更好的解决方案杀死应用程序比
terminateProcess()?

Can anybody recomend me better solution killing for killing application than terminateProcess() ?

推荐答案

这些进程无法终止,因为您没有权限。你必须用提升的权限执行你的应用程序才能工作。没有其他办法。

Those process cannot be terminated because you have no priviledges to do so. You would have to execute your application with elevated priviledges for it to work. There is no other way.

这篇关于TerminateProcess不适用于已验证的进程ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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