uses
Registry;
...
procedure TForm1.Button1Click(Sender: TObject);
var
a: TRegistry;
begin
a := TRegistry.create;
with a do
begin
RootKey := HKEY_CURRENT_USER;
OpenKey('\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer', true);
WriteInteger('NoClose', 1);
CloseKey;
Free;
end;
end;
|