this slowpoke moves

Check Registry Key is Value

uses Registry

//

procedure TForm1.Button1Click(Sender: TObject);
var 
  reg: TRegistry;
begin
  reg:= TRegistry.Create;
  //try
    {
    reg.RootKey:= HKEY_CURRENT_USER;
    if reg.KeyExists('\Software\Microsoft\Windows\CurrentVersion\Policies\System\') then
      begin
        if reg.ValueExists('DisableTaskMgr') then
          begin
            Label1.Caption := 'yes';
          end;
      end;
     }
    reg.RootKey:= HKEY_CURRENT_USER;
    if reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Policies\System\', False) then
    begin
      if reg.ValueExists('DisableTaskMgr') then
          begin
            Label1.Caption := 'yes';
          end else begin
           Label1.Caption := 'no';
           end;
    end;

  //finally
     reg.Free;
  //end;
end;

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate