Modify "Open command window here" context menu call
Solution 1
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
-
cmd.exe
command line parameters:-
/s
Strip quote characters from the command_line; -
/d
Ignore registry AutoRun commands; -
/c
Run Command and then terminate; -
pushd "%V"
Change the current directory/folder and store the previous folder/path for use by the POPD command; -
&
Run command before and then run command after;
-
-
start "" cmder.exe
launches your application; - all
"
are escaped here with\
;- to add full path to
cmder.exe
, e.g."C:\bin\cmder.exe"
, escape all\
as well.
- to add full path to
If last statement is the case, then use syntax as follows:
@="cmd.exe /s /d /c pushd \"%V\"&start \"\" \"C:\\bin\\cmder.exe\""
Solution 2
Context Menu Integration
So you've experimented with Cmder a little and want to give it a shot in a more permanent home;
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.
source: https://github.com/cmderdev/cmder
Solution 3
Try this works for me (This one is to modify "Open command window Here")
Navigate to HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command
& then change the default value to "C:\cmder\Cmder.exe" "%V"
& Also do the same for HKEY_CLASSES_ROOT\Directory\shell\cmd\command
that is also change the default value to "C:\cmder\Cmder.exe" "%V"
Optionally you can also add icons
To add icons goto HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
Make a new String Value Name it Icon
& give its value as "C:\cmder\Cmder.exe"
& do the same for HKEY_CLASSES_ROOT\Directory\shell\cmd\command
Edited : Changed HKEY_CLASSES_ROOT\Directory\Background\cmd
to HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
. Windows 10 have these things. I forgot about my older settings in windows 7.
Related videos on Youtube
Jazcash
Updated on September 18, 2022Comments
-
Jazcash almost 2 years
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?
-
Maximus over 9 yearsThat and 3 more keys ConEmu can process internally without user required registry modifications.
-
Jazcash over 9 yearsThis adds extra context menu options which I don't want, I want to edit the existing one.
-
Jazcash over 9 yearsIn theory this makes sense to me, but the parameters it passed to cmder.exe aren't valid and I can't figure out what the correct parameters would be.
-
Maximus over 9 yearsUse "DefTerm" feature then.
-
Love about 8 yearsWhat is
@
meant here?@="Open CMDER here"
: is it a key? -
Love about 8 yearsCan you post a snapshot? It is not working.
-
JosefZ about 8 years@Love
@
represents "name" of default value (which is nameless really) in a subkey. -
Love about 8 years@JosefZ, Could you please a snapshot for
cmder
part so I can understand it better? Thanks. -
JosefZ about 8 years@Love sorry, I don't comprehend your request. Please ask Google for
understanding windows registry
. In doubts, elaborate your own question. -
Love about 8 years@JosefZ, I meant that I need a picture like this. I created it by the example. But it is not working.
-
JosefZ about 8 years@Love
@="c:\\cmder\\cmder.exe \"%V\""
in.reg
file should result to next entry seen in registry editor(Default) REG_SZ c:\cmder\cmder.exe "%V"
after merging. -
Love about 8 years@JosefZ, Thanks, now it is working. The script in the link is wrong.
-
Love about 8 yearsThe link is not working.
-
Sudipta Biswas about 8 yearsSorry for that, see now screenshot has been added.
-
Love about 8 yearsSo did you override the dos command? I would prefer keep both of them. That is meant to keep both Windows command cmd and cmder.
-
Sudipta Biswas about 8 yearsSo you want to add another context option in the right click . See this tool, I use this tool too door2windows.com/… & in place of command use
"C:\cmder\Cmder.exe" "%V"
& select the Icon. Enjoy -
cgasp almost 6 yearswhy so low. Easiest answer
-
Chris Moutray about 5 yearsI really like this solution - except it does open a new instance every time i use this, shame it can't reuse and open a new tab instead