Skip to content

This example shows how to register menu item in Windows shell context menu and pass selected folder or file name to the application.

Notifications You must be signed in to change notification settings

rodriggo-afk/ShellContextMenuExample

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Add item to Windows shell context menu to open your application

Read the full article here.

In this post I'll show how to that for context menus for Folders using a Visual Studio Setup Project, so after installing the application, when you right click on a folder, you can see such menu and when you click the menu, folder path will be passed to your application as command-line argument:

To add an item to context menu of folder, the setup should do the following configurations in registry:

HKEY_CLASSES_ROOT
    Directory
        shell
            OpenWithMyApp  → (Default): Text of the menu
                             Icon:      "Path to executable" 
                command    → (Default): "Path to executable" "%V"

About

This example shows how to register menu item in Windows shell context menu and pass selected folder or file name to the application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%