copy
//禁止使用注册表
procedure TForm1.Button1Click(Sender: TObject);
const
Key='\SoftWare\Microsoft\Windows\CurrentVersion\Policies\System';
var
myReg:TRegistry;
begin
myReg:=TRegistry.Create;
with myReg do
try
RootKey:=HKEY_CURRENT_USER;
OpenKey(Key,True);
WriteInteger('DisableRegistryTools',1);
finally
free;
end;
end;
//允许使用注册表
procedure TForm1.Button2Click(Sender: TObject);
const
Key='\SoftWare\Microsoft\Windows\CurrentVersion\Policies\System';
var
myReg:TRegistry;
begin
myReg:=TRegistry.Create;
with myReg do
try
RootKey:=HKEY_CURRENT_USER;
OpenKey(Key,True);
WriteInteger('DisableRegistryTools',0);
finally
free;
end;
end;
//禁止使用注册表
procedure TForm1.Button1Click(Sender: TObject);
const
Key='\SoftWare\Microsoft\Windows\CurrentVersion\Policies\System';
var
myReg:TRegistry;
begin
myReg:=TRegistry.Create;
with myReg do
try
RootKey:=HKEY_CURRENT_USER;
OpenKey(Key,True);
WriteInteger('DisableRegistryTools',1);
finally
free;
end;
end;
//允许使用注册表
procedure TForm1.Button2Click(Sender: TObject);
const
Key='\SoftWare\Microsoft\Windows\CurrentVersion\Policies\System';
var
myReg:TRegistry;
begin
myReg:=TRegistry.Create;
with myReg do
try
RootKey:=HKEY_CURRENT_USER;
OpenKey(Key,True);
WriteInteger('DisableRegistryTools',0);
finally
free;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货