How do properly add "Open Cmder" Here in the windows context menu?

I tried adding to the registry as per suggested answers and searches. I couldn't get it to work. Finally, on the Cmder wiki I stumbled across the answer: Shortcut to open Cmder in a chosen folder

Shortcut to open Cmder in a chosen folder:

  • Open a terminal as an Administrator.
  • Navigate to the directory you have placed Cmder.
  • Execute .\cmder.exe /REGISTER ALL

If you get a message "Access Denied" ensure you are executing the command in an Administrator prompt. In a file explorer window right click in or on a directory to see "Cmder Here" in the context menu.


Use this REG file instead:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
@="Open Cmder Here"
"Icon"=hex(2):22,00,25,00,43,00,4d,00,44,00,45,00,52,00,5f,00,52,00,4f,00,4f,\
  00,54,00,25,00,5c,00,69,00,63,00,6f,00,6e,00,73,00,5c,00,63,00,6d,00,64,00,\
  65,00,72,00,2e,00,69,00,63,00,6f,00,22,00,2c,00,30,00,00,00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder\command]
@=hex(2):22,00,25,00,43,00,4d,00,44,00,45,00,52,00,5f,00,52,00,4f,00,4f,00,54,\
  00,25,00,5c,00,43,00,6d,00,64,00,65,00,72,00,2e,00,65,00,78,00,65,00,22,00,\
  20,00,2f,00,53,00,54,00,41,00,52,00,54,00,20,00,22,00,25,00,76,00,22,00,00,\
  00

If you do not want to use environment variable use this as registry file or batch file. Let assume Cmder installation path is C:\MyFiles. Change that path as your setup.

  • Registry file (.reg):
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
@="Open Cmder Here"
"Icon"="\"C:\\MyFiles\\icons\\cmder.ico\",0"

[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder\command]
@="C:\\MyFiles\\cmder.exe /START \"%v\""
  • Batch file (.bat):
reg add "HKCR\Directory\Background\shell\Cmder" /ve /d "Open Cmder Here" 
reg add "HKCR\Directory\Background\shell\Cmder" /v "Icon" /d "C:\MyFiles\icons\cmder.ico,0" 
reg add "HKCR\Directory\Background\shell\Cmder\command" /ve /d "C:\MyFiles\cmder.exe /START \"%v\"" 

Command Options:

  • reg add command:
REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f] [/reg:32 | /reg:64] 
    /v       The value name, under the selected Key, to add.
    /ve      adds an empty value name (Default) for the key.
    /t       If omitted, REG_SZ is assumed.
    /d       The data to assign to the registry ValueName being added.
  • Cmder option:

    /START [start_path] Folder path to start in.

  • Shortcut option:

    %v For verbs that are none implies all. If there is no parameter passed this is the working directory.