...use the registry?

Author: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch

Category: System

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;

 

printed from
www.swissdelphicenter.ch
developers knowledge base