Delphi add menu item in Windows Explorer right click Delphi add menu item in Windows Explorer right click shell shell

Delphi add menu item in Windows Explorer right click


The simplest way to do this is to add a registry entry like this:

HKEY_CLASSES_ROOT  *    shell      YourAppName        Command      C:\Full\Path\To\Your\App.exe "%1"

When the user clicks on this menu item your app will be executed and passed the file name as the first command line argument.

Whilst you can write a shell extension for this, that is more difficult. What's more, if you are using Delphi 7 then you will not be able to write a shell extension for 64 bit Windows.


At "HKEY_CLASSES_ROOT\*\shell" add key "open with my app" and then add "command" and set Default (REG_SZ) to what you want to run (%1 parameter - filename)