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 怎么将一个流转换成字符串?或者将字符串转出一个流

Delphi 让程序自己更新本程序

Delphi tfontdialog

cef4Delphi 语言区域设置

floattostr 将“浮点型”转换成“字符型”

Delphi cannot find implementation of method formcreate 解决办法

dekphi 智能《疯狂刷新》辅助工具v3.1更新开源

Delphi 间隔时间

Delphi 时间与相关类型(2) - tdate、ttime、ttimestamp

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



打赏

取消

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

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

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

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

评论

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