Delphi:在 Windows 7 中禁用 TaskManager
I found this code for disabling the task manager in Windows XP. It works :)
But does it work in Windows 7, too? The registry path is the same, I've checked this. But maybe there are some restrictions!?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认情况下,自 Windows 2000 起,以下键对标准用户具有“只读”访问权限(请参阅 这里)。
因此,您的应用程序需要具有管理权限才能写入这些项。
By default, the below keys have "readonly" access for standard users since Windows 2000 (See here).
So your application needs to have administrative privileges in order to write to these keys.
是的,它也适用于 Windows 7。我以提升的权限(Windows 7 Home Premium)运行该程序,之后任务管理器不再可用。
但是,作为旁注,我不得不说代码
相当糟糕。首先,根本不需要
begin
和end
部分,因为命令WriteInteger...
是“一行代码” ”。其次,为什么不直接写而不是YesNo
的值呢?人们真的应该将代码写成这样,
这不是更具可读性和简洁性吗?
Yes, it works in Windows 7 too. I ran the program with raised privileges (Windows 7 Home Premium), and after that the Task Manager is no longer available.
But, as a sidenote, I have to say that the code
is rather horrible. First of all, there is no need at all for the
begin
andend
parts, because the commandsWriteInteger...
are "one-liners". Secondly, why not just write the value ofnot YesNo
?One really should write the code as
Isn't that much more readable and brief?