Adding Cmder to the Windows Explorer Context Menu
2nd October 2015I recently received an email from a designer in the UK asking me if I knew how to add Cmder to the Windows Explorer context menu, so that when you navigate to your project folder in Windows Explorer (such as c:\projects\client_a
), you can right click within the folder and choose an option that reads "Open in Cmder." As it turned out, I did know how to do this, and I think it is high time I share it with the world.
The first thing we need to do is ensure we know where Cmder.exe
is. If you followed my recommendation in my "Setting Up Git & Cmder" post, your Cmder executable will be located at c:\cmder\Cmder.exe
, so keep this location in mind as we work with our context menu-enabling Registry Data File.
CAVEATS: This tutorial and associated files will only work on Windows Vista and higher (7, 8, 8.1, and 10). Also, if your default shell in Cmder is PowerShell (and not say, git bash or cmd), then this may not necessarily work for you.
Install Option 1: Simple Mode
The simple mode is perfect for anyone short on time, and who has their Cmder.exe
file in my recommended location (c:\cmder\
). If you do not have Cmder.exe
in this location, jump down to Install Option 2: Manual Mode.
- Download (Right-Click and "Save As…") the following Registry Data Files to your computer (anywhere you can find them will do):
- To enable the context menu item, double-click the
cmder_context_enable.reg
file that you downloaded.
- For the User Account Control popup, "Do you want to allow this app/program to make changes to your PC?" — Click Yes.
- For the Registry Editor popup, "Adding information can unintentionally change or delete values and cause components to stop working correctly. If you do not trust the source of this information in […]\cmder_context_enable.reg, do not add it to the registry. Are you sure you want to continue?" — Click Yes.
- You should now have successfully added the registry entries for Cmder to appear in your context menus within folders. For the Registry Editor popup, "The keys and values contained in […]\cmder_context_enable.reg have been successfully added to the registry." — Click OK.
- You can now open any folder on your system, right-click within the folder, and select the new option, "Open in Cmder."
Install Option 2: Manual Mode
This mode is for those who do not have Cmder.exe
located in c:\cmder\
or who just want to try their hand at doing it the old fashioned way (using copy, paste, and find/replace!).
Creating cmder_context_enable.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmder]
@="Open in Cmder"
"Icon"="C:\\cmder\\Cmder.exe,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmder\command]
@="\"C:\\cmder\\Cmder.exe\" \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\cmder]
@="Open in Cmder"
"Icon"="C:\\cmder\\Cmder.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\cmder\command]
@="\"C:\\cmder\\Cmder.exe\" \"%1\""
- Copy the above code for
cmder_context_enable.reg
and paste it into your preferred text editor. - Determine where on your system
Cmder.exe
exists. For example, you may have your Cmder executable located inC:\Program Files (x86)\Cmder\
. Take note of the file path. - In your text editor do a Find/Replace where you are finding all instances of
C:\\cmder
(yes, the extra backslash '\' is important) and replacing it with your own path toCmder.exe
(ensure every backslash is doubled just like mine was), for example:C:\\Program Files (x86)\\Cmder
. - Once you have replaced every instance of
C:\\cmder
with your path toCmder.exe
, go ahead and save the file ascmder_context_enable.exe
somewhere on your computer where you can easily find it. - Now, double-click
cmder_context_enable.exe
and accept all following alerts and prompts. Should everything go smoothly, you will now be able to right-click within any folder and choose the "Open in Cmder" option.
Creating cmder_context_disable.reg
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\cmder]
- Copy and paste the above code into your preferred text editor and save it as
cmder_context_disable.reg
alongside your enable script. - To disable the context menu option, "Open in Cmder," double-click this file and accept all following prompts.
Wrap-Up
In this article I provided the steps and files that will allow you to add Cmder to your Windows Explorer context menu, making it easier for you to open a given folder directly in your preferred shell in Cmder. Check out my other post detailing how to set up Git & Cmder if you hadn't already, and as always: Thank you for reading.
If you have any comments or questions about this article, or are interested in me writing an article about another topic or issue you are curious about or needing help with, feel free to shoot me an email: and...@awmoore.com
View Comments