//適用於Win NT/2K/XP,
//參數Key為True,屏蔽“任務管理器”;為False,“任務管理器”可用
//使用方法:
//DisableTaskmgr(True);
procedure DisableTaskmgr(Key: Boolean);
Var
Reg:TRegistry;
Begin
Reg:=TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey('SoftwareMicrosoftWindowsCurrentVersionPolicIEsSystem', True) then
begin
if Key then
Reg.WriteString('DisableTaskMgr','1')
else
Reg.WriteInteger('DisableTaskMgr',0);
Reg.CloseKey;
end;
except
Reg.Free;
end;
end;