Link to home
Start Free TrialLog in
Avatar of zattz
zattz

asked on

Add to explorer right click context menu

Hi,

Can somebody show me some sample delphi code that will add an item to the right click context menu in explorer. I want to add the item "test". It must work for all file types.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of bernani
bernani
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Read also this

http://delphi.about.com/od/adptips2006/qt/app2sendtomenu.htm

EasyNSE package.: www.mustangpeak.net 

and finally the example given in Delphi self:

\Demos\Activex\Shellext\

Hi,


You can also create a reg file with those lines

_______ copy and save as text file called nameofthefile.reg________

REGEDIT4

[HKEY_CLASSES_ROOT\*\shell]

[HKEY_CLASSES_ROOT\*\shell\open]
@="Test"

[HKEY_CLASSES_ROOT\*\shell\open\command]
@="C:\\WINDOWS\\NOTEPAD.EXE %1"                              //<--------- check if the path is correct on your OS

Double click on the reg file and you'll have a new entry in your contect menu: test (it will be able to open the same files as Notepad do).

But it's not the Delphi way (for this, write the lines with TRegistry functions).