Delphi 实现禁用“任务管理器”


本文整理自网络,侵删。

 uses Registry

//一下是定义禁用任务管理器的过程
procedure DisableTaskmgr(Key: Boolean);
Begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey := HKEY_CURRENT_USER;
    if Reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Policies\System', True) then
    begin
      if Key then
        Reg.WriteString('DisableTaskMgr','1')
      else
        Reg.WriteInteger('DisableTaskMgr',0);
      Reg.CloseKey;
    end;
  except
    Reg.Free;
  end;
end;
//以上是定义禁用任务管理器的过程

调用的时候:

        DisableTaskmgr(True);//禁用任务管理器
        DisableTaskmgr(False);//启用任务管理器

相关阅读 >>

Delphi自动提交网页表单和获取框架网页源码

Delphi 中文urlencode的简单办法

Delphi 泛型排序器 tcomparer

Delphi中使用自定义字体

Delphi 时间耗时统计

Delphi memo1 行倒序排列三种方法

Delphi idftp 详解

gdi tgpimage 提取 gif 动画

Delphi 多种方法查找窗口句柄

Delphi �c 使用createoleobject后释放olevariant

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...