我访问了网站,我的注册表被管理员禁用,请问我想用DELPHI编个程序,恢复注册表,请问如何做

解决方案 »

  1.   

    uses registry;
    procedure TForm1.Button1Click(Sender: TObject); 
    var
      reg:TRegistry;
    begin
      reg:=TRegistry.Create;
      with reg do
      begin
       rootkey:=HKEY_CURRENT_USER;
       if openkey('Software\Microsoft\Windows\CurrentVersion\Policies\System',true) then
          WriteInteger('DisableRegistryTools',0);
       CloseKey;
       Destroy;
      end;
    end;   //解除锁定
      

  2.   

    'DisableRegistryTools' 为 1 时禁止使用。