Tree [336786] master /

File Date Author Commit
 menus 2011-11-04 Clemens Anhuth Clemens Anhuth [d4597b] Handle paths with whitespace
 MyExplorerContextMenu.ahk 2011-11-07 Clemens Anhuth Clemens Anhuth [336786] Minor, fix function declaration
 create_release.cmd 2011-11-06 Clemens Anhuth Clemens Anhuth [cbc3a3] Copy readme to release folder for convenience w...
 readme.txt 2011-11-04 Clemens Anhuth Clemens Anhuth [d4597b] Handle paths with whitespace
 version.txt 2011-11-06 Clemens Anhuth Clemens Anhuth [3b8366] Version 0.2+

Read Me



1. Introduction
2. Rationale
3. Disclaimer
4. License
5. Acknowledgements
6. Release notes
7. Creating context menu entries
8. Showing the context menu
9. Configuring context menu entries
10. Supported configuration options
11. To Do


MyExplorerContextMenu introduces a custom context menu for files
and folders in Windows Explorer that gives direct access to the
functions that you need to perform regularly on files and folders
(and without requiring installation).

The advantages over adding to the Windows Explorer context menu:

- No clutter, only the context menu items that you want.
- No adverse effect on Windows Explorer or Windows Explorer context
  menu performance.
- No registry changes required.
- No installation required.
- Works portable; can be run from USB sticks, etc. without
- Much simpler to add, maintain and configure custom menu entries.
- Very low memory usage.
- Separate process from Windows Explorer.


The context menu of files and folders is a very convenient and
intuitive way to perform tasks on the selected files and folders
(delete, move, rename, upload, compress, unzip, etc.).

Microsoft realized very early that it could be useful to be able to
add custom context menu entries. For this reason they introduced
mechanisms to add to the standard context menu of Windows Explorer.
Unfortunately the mechanisms for adding custom menu entries are
relatively hard to set up, for simple users and programmers alike.

Another downside is that the default context menu of Windows
Explorer contains entries from Windows and possibly from many other
tools, so it can end up being bloated and cluttered.

And buggy context menu extension modules for Windows Explorer can
cause Windows Explorer to crash or hang for a long time (or
forever) when trying to open the context menu. They can also cause
high (and hard to analyze) memory consumption of Windows Explorer.


This software is provided as is without any guarantees for
anything, use at your own risk.


Public domain. Do whatever you like with it.


This project uses AutoHotkey_L:



* Fixed "Open Command Prompt here..." entry to handle folders with
  whitespace characters.

* Added: About dialog.

* Added: About and homepage tray menu entries.

* Fixed: Removed declaring access to global variables via "global" at
  a label - which is not supported anyway. This caused errors at
  startup with AutoHotkey_L v1.1.4.1.

* Changed: Remove product version number from tooltip to avoid that
  a new version number causes the tray icon to be hidden by Windows
  (after configuring the previous version to be always shown).

* Changed: Simplify tray tooltip contents because of truncation of
  longer text.

* Changed: Internal: Use hotkeys instead of hotkey command. Switch to
  hotkey command later for reconfigurable hotkeys.


* Key combination Win+c: Show context menu populated by *.cmd files
  in menu_items folder.

* Configuration option "__all_exts": Show for all extensions

* Configuration option "_<ext>": Show only for configured

* Configuration option "__only_files": Show only for files

* Configuration option "__only_dirs": Show only for folders

* Configuration option "__multiple": Show for multi-selection

* Configuration option "__separator_above": Additional separator
  above menu entry

* Configuration option "__separator_below": Additional separator
  below menu entry

* Configuration option Support entry icon

* Example menu entry "Command prompt here..." to open command
  prompt (cmd.exe) in selected folder (or folder of the selected

* Tray context menu entry for browsing menu entries.

* Tray context menu entry for editing the script.

* Key combination Contrl+Shift+r: Reload script convenience for

Creating context menu entries

Place your batch files with .cmd extension in...

  "<myexplorercontextmenu_dir>\menus\menu1" have them included as entries of your custom context menu.

When one of the context menu entries gets activated the associated
batch file will be executed.


  "<myexplorercontextmenu_dir>\menus\menu1\Command Prompt here....cmd"

...for an example.

The following environment variables are available:

- A_AHKPATH: "The full path and name of the EXE file that is
  actually running the current script."

- A_SCRIPTDIR: "The full path of the directory where the current
  script is located."

- A_SCRIPTNAME: "The file name of the current script, without its
  path, e.g. MyScript.ahk."

- A_SCRIPTFULLPATH: "The combination of the above two variables to
  give the complete file specification of the script, e.g.
  C:\My Documents\My Script.ahk"

Showing the context menu

Select one or more files or folders in a Windows Explorer window
and press the key combination Win+c.

Configuring context menu entries

The configuration of menu entries is mostly done by creating empty
files with the name of the menu entry batch file and a file name
postfix that is setting specific.

The configuration files must be located in the same folder as the
menu entry batch files.

Example for menu entry "My menu entry" to support all file

  "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd"
  "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd__all_exts"

Supported configuration options

- "_<extension>" - Add supported extension
  Configuration file name pattern: "<menu_entry_batch_file>_<extension>"
  Examples: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd_bmp"
            "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd_png"
            "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd_ico"

- "__all_exts" - Show for all extensions
  Configuration file name pattern: "<menu_entry_batch_file>__all_exts"
  Example: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd__all_exts"

- "__multiple" - Show for multiple selected files/folders
  Configuration file name pattern: "<menu_entry_batch_file>__multiple"
  Example: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd__multiple"

- "__only_dirs" - Show for folders only
  Configuration file name pattern: "<menu_entry_batch_file>__only_dirs"
  Example: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd__only_dirs"

- "__only_files" - Show for files only
  Configuration file name pattern: "<menu_entry_batch_file>__only_files"
  Example: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd__only_files"

- "__run_visibly" - Running menu entry batch file visibly:
  Configuration file name pattern: "<menu_entry_batch_file>__run_visible"
  Default is to run the menu entry batch file invisibly.
  Example: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd__run_visibly"

- ".png" - Setting menu entry icon:
  Configuration file name pattern: "<menu_entry_batch_file>.png"
  Example: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd.png"

- "__separator_above" - Add separator menu entry above menu entry:
  Configuration file name pattern: "<menu_entry_batch_file>__separator_above"
  Example: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd__separator_above"

- "__separator_below" - Add separator menu entry below menu entry:
  Configuration file name pattern: "<menu_entry_batch_file>__separator_below"
  Example: "<myexplorercontextmenu_dir>\menus\menu1\My menu entry.cmd__separator_below"

To Do

- Support configuration of context menu entries:
-- Disabled
- GUI configuration tool