..einen Eintrag im Kontextmenü für Ordner (im Explorer) erstellen?

Autor: Tobias Lauridsen

Kategorie: System

uses Registry;

procedure TForm1.Button1Click(Sender: TObject);
var
Reg : TRegistry;
begin
Reg := Tregistry.create;
 with Reg Do
  begin
    
RootKey := HKEY_CLASSES_ROOT;
      OpenKey('Directory\shell',false);
       if not KeyExists('DelphiTest') then CreateKey('DelphiTest');
      CloseKey;
      OpenKey('Directory\shell\DelphiTest',False);
        WriteString('','Delphi Test');
        if not KeyExists('command') then CreateKey('Command');
      Closekey;
      OpenKey('Directory\shell\DelphiTest\command',true);
        WriteString('',Application.ExeName);
      CloseKey;
  end
end
;

 

printed from
www.swissdelphicenter.ch
developers knowledge base