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; //解除锁定
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; //解除锁定