Windows – Modify “Open command window here” context menu call

cmd.execmderconemuwindows-registry

I've recently started using cmder instead of Window's default cmd prompt and I'm really loving it. I'm at the point now where I want to replace all instances of cmd.exe being launched with cmder.exe being launched instead.

For the Shift + Rightclick context menu in folders, how can I set the "Open command window here" to launch cmder?

Best Answer

Observe next registry key: HKEY_CLASSES_ROOT\Directory\shell\cmd; exporting it from regedit gives next output:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="@shell32.dll,-8506"
"NoWorkingDirectory"=""
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""

Try next changes in the exported file and then import it (i.e. Merge from right-click context menu) with elevated privileges (it will add Open CMDER here functionality to your file explorer, supposing right path to cmder.exe in the last line); if you want to replace the Open command window here functionality, then change the last line only:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmder]
@="Open CMDER here"
"NoWorkingDirectory"=""
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\shell\cmder\command]
;;; @="cmd.exe /s /k pushd \"%V\""
@="cmd.exe /s /d /c pushd \"%V\"&start \"\" cmder.exe"

Edit

If last statement is the case, then use syntax as follows:

@="cmd.exe /s /d /c pushd \"%V\"&start \"\" \"C:\\bin\\cmder.exe\""
Related Question