1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| procedure TForm1.Button1Click(Sender: TObject);
var RegistreDistant : TRegistry;
ok, ok2 : boolean;
begin
memo1.Clear;
RegistreDistant := TRegistry.Create;
try
RegistreDistant.RootKey := HKEY_LOCAL_MACHINE;
ok := RegistreDistant.RegistryConnect('\\Fixe');
if ok then begin
showmessage('Connect Ok');
Ok2 := RegistreDistant.OpenKeyReadOnly('\Software\Bibi');
if Ok2 then
showmessage('Read Ok')
else
showmessage('Read pas ok');
RegistreDistant.GetKeyNames(Memo1.Lines);
end
else
showmessage('Connect pas Ok');
finally
RegistreDistant.Free;
end;
end; |
Partager