System Delphi

Title: How to use the registry
uses
Registry;
procedure TForm1.Button1Click(Sender: TObject);
var
reg: TRegistry;
begin
// Creates a TRegistry Object, erzeugt ein a TRegistry Objekt
reg := TRegistry.Create;
try
// set the the Mainkey, bestimmt den Hauptschl¨¹ssel
reg.RootKey := HKEY_LOCAL_MACHINE;
// Open a key, den Schl¨¹ssel ?ffnen
reg.OpenKey('Software\siro_com', True);
// Save a string value, speichert einen String-Wert
reg.WriteString('Test string', 'Test');
// Close the key, Schl¨¹ssel schliessen
reg.CloseKey;
finally
// and free the TRegistry Object, das TRegistry Objekt freigeben
reg.Free;
end;
end;