以编程方式禁用任务管理器 [英] Disabling task manager programmatically

查看:138
本文介绍了以编程方式禁用任务管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写Windows服务,该服务旨在用作教室管理工具.此应用程序的功能之一是能够锁定屏幕.除了禁用任务管理器之外,我一切正常.我发现禁用任务管理器的组策略位于"Hkey_Current_User\Software\Microsoft\Windows\CurrentVersion\Policies\System"

但是,该服务正在作为本地系统运行.因此,当前用户不等于当前登录用户.我也考虑过这个问题,我考虑过更改C:\ Windows \ System32 \ taskmgr.exe的权限以拒绝用户执行权限.有人看到这种方法不起作用的原因吗?


任何想法或建议将不胜感激.

I am writing a windows service that is designed to be a class room management tool. One of the features to this applications is being able to lock the screen. I have everything working correctly except disabling task manager. I have found the group policy for disabling task manager is at "Hkey_Current_User\Software\Microsoft\Windows\CurrentVersion\Policies\System"

However the service is running as local system. So current user isn''t equal to the currently logged in user. Also thinking about the problem more I have considered change the permission for C:\Windows\System32\taskmgr.exe to deny user execute permissions. Anyone see a reason this wouldn''t work?


Any thoughts or suggest would be greatly appreciated.

推荐答案

您不能通过服务来做到这一点.您必须为计算机上的每个帐户加载每个用户注册表配置单元并戳入值,然后卸载配置单元.即使只有几个帐户,这也是一个非常耗时的过程.最好仅使用组策略而不是通过代码来完成.
You can''t do it from a service. You''d have to load each user registry hive and poke the value in, then unload the hive, for each account on the machine. Even with just a few accounts, this can be a VERY time consuming process. This is better done simply using Group Policy alone instead of doing it from code.


这篇关于以编程方式禁用任务管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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