What do I need to do to add an item to the right click menu for files with certain file extensions, along with sub menus?

An example would be adding items to run Python files (.py, .pyw, .pyc) with a specific version of Python, so the menu for a .py files would look like say:

7-Zip >  
    ...7zip stuff
Run >  
    Python 2.5  
    Python 2.6  
    Python 3.1  
Edit >  
    IDLE 2.5  
    IDLE 2.6  
    IDLE 3.1  
various other items

3 Answers 3


FileMenu Tools can help you create extra items in the context menu of Windows Explorer, including sub-menus. You can add the extra items only for some extensions or type of elements (files, drives, folders, ...).

alt text

  • That's a nice utility.
    – wfaulk
    Oct 15, 2009 at 12:58
  • Is there some way to put items in the main part of the context menu, rather than within the "FileMenu Tools" sub-menu? Oct 15, 2009 at 13:37
  • 3
    Uncheck "Show All The Commands in Submenu" in the Options menu then click on the "Apply changes" icon.
    – Snark
    Oct 15, 2009 at 14:56

In Windows XP (other Windows' should be similar):

  1. Open the File Types configuration dialog (in an explorer window Tools->Folder Options, File Types tab)
  2. Select the Registered file type you would like to add an item for
  3. Select the "Advanced" button under the "Details for ... extension" box
  4. Create a new action and associate it with the command line you would like to run.

That should add an item to the context menu for that file type.

  • but EXE and DLL does not seem to show up here
    – Louis Rhys
    Jun 5, 2012 at 6:14
  • An Anon User adds: Vista onwards has no file types tab, so use instead the misnamed "Default Programs" Editor as a brilliant Workaround. Control Panel\Programs\Default Programs
    – Psycogeek
    Sep 3, 2013 at 19:44
  • When I installed FileMenu tools I got a message from McAfee saying the program exhibited risky behavior (it tried to download from IP after I installed it; why would it need to do that?) Oct 11, 2013 at 11:46
  • I am on Windows 7. I want to install my own entry on this menu that appears when you right-click with a file, and I want this entry to be appear on such menu for all users on the system, and I want this entry to say "Open Command Prompt", and I want such entry to behave so that when it is clicked a cmd.exe opens with its current directory set to the directory which contains the file I right-clicked. There must be a way to do this by manually adding some script files to the system without having to use FileMenu tools. Thanks. Oct 11, 2013 at 11:47

You can manually browse the key HKEY_CLASSES_ROOT.py and add entries.

Such as in there you can create a new subkey under Shell key named Run and create a Value SubCommands and then create another subkey named Shell. And create keys there and attach command keys with default value as commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .