..add an item to the folder popupmenu (explorer)?

Author: Tobias Lauridsen

Category: 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