Mega Code Archive

 
Categories / Delphi / Files
 

Dd an item to the folder popupmenu (explorer)

Title: dd an item to the folder popupmenu (explorer)? 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;