Windows - desabilitando do task manager no win2000 nt

Top  Previous  Next

// desabilitando o TASK MANAGER

 

procedure TForm1.FormCreate(Sender: TObject);

var

  Reg: TRegistry;

begin

  Reg := TRegistry.Create;

  try

    Reg.RootKey := HKEY_CURRENT_USER;

    if Reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Policies\System', True)

    then Reg.WriteInteger('DisableTaskMgr',1);

  finally

    Reg.CloseKey;

    Reg.Free;

  end;

end;

 

 

procedure TForm1.FormDestroy(Sender: TObject);

var

Reg: TRegistry;

begin

 

  Reg := TRegistry.Create;

  try

    Reg.RootKey := HKEY_CURRENT_USER;

    if Reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Policies\System', True)

    then Reg.WriteInteger('DisableTaskMgr',0);

  finally

    Reg.CloseKey;

    Reg.Free;

  end;

end;