Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"Open Cmder Here" in context menu

"Open Cmder Here" in context menu

Edit 04/2021:

As of the lastest versions, just execute the following command .\cmder.exe /REGISTER ALL per Documentation.

Original Solution

To add an entry in the Windows Explorer context menu to open Cmder in a specific directory, paste this into a OpenCmderHere.reg file and double-click to install it.

    Windows Registry Editor Version 5.00

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

    [HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder\command]
    @="\"%CMDER_ROOT%\\Cmder.exe\" /START \"%v\""

Then add the Environment variable CMDER_ROOT to point to the path of your installation.

System Settings Environment Variable

After adding this, a restart of the explorer might be required to make it work.

Execute .\cmder.exe /REGISTER ALL If you get a message "Access Denied" ensure you are executing the command in an Administrator prompt.

@arun369

This comment has been minimized.

Copy link

@arun369 arun369 commented Apr 29, 2020

That worked so well... thanks a ton for that. :) You are awesome. :)

@grcldq

This comment has been minimized.

Copy link

@grcldq grcldq commented May 2, 2020

I really needed this and it worked so well. Thank you!

@spaciousmind

This comment has been minimized.

Copy link

@spaciousmind spaciousmind commented May 19, 2020

thanks! perfect!

@vivekteega

This comment has been minimized.

Copy link

@vivekteega vivekteega commented Jun 19, 2020

Thanks you so much, it worked for me :)

Untitled8

Ps - It doesn't work when I try it after browsing into my Android's phone's file system, I think because of MTP. Do you think there is a solution for that?

Untitled9

@AlbertSnows

This comment has been minimized.

Copy link

@AlbertSnows AlbertSnows commented Aug 8, 2020

Thank you kind sir for your patriotic work.

@AlexandreZT

This comment has been minimized.

Copy link

@AlexandreZT AlexandreZT commented Sep 24, 2020

Thanks a lot !

@AdriBusse

This comment has been minimized.

Copy link

@AdriBusse AdriBusse commented Oct 30, 2020

What do you mean with "Execute .\cmder.exe /REGISTER ALL ". How it can executed?

@hamzahamidi

This comment has been minimized.

Copy link
Owner Author

@hamzahamidi hamzahamidi commented Nov 1, 2020

@AdriBusse just run the command .\cmder.exe /REGISTER ALL in the cmder directory.

@viclafouch

This comment has been minimized.

Copy link

@viclafouch viclafouch commented Nov 4, 2020

image
not for me :(

@hamzahamidi

This comment has been minimized.

Copy link
Owner Author

@hamzahamidi hamzahamidi commented Nov 4, 2020

@viclafouch just read carefully the steps. If you got this error that's just mean you re not running cmder in administrator mode.

@khew81

This comment has been minimized.

Copy link

@khew81 khew81 commented Nov 15, 2020

.\cmder.exe /REGISTER ALL

May I ask what this command is actually doing? This fixed my access denied issue but I just want to understand it.

@hamzahamidi

This comment has been minimized.

Copy link
Owner Author

@hamzahamidi hamzahamidi commented Nov 15, 2020

It registers a Windows Shell Menu shortcut. You can check cmder documentation here

@masidiq

This comment has been minimized.

Copy link

@masidiq masidiq commented Dec 4, 2020

Its working thank you :)

image

@Bahodir8586

This comment has been minimized.

Copy link

@Bahodir8586 Bahodir8586 commented Dec 24, 2020

I couldn't find OpenCmderHere.reg file. Can someone help me please

@Saloh

This comment has been minimized.

Copy link

@Saloh Saloh commented Jan 21, 2021

I couldn't find OpenCmderHere.reg file. Can someone help me please

You have to create it yourself by pasting the given code snippet into it. @Bahodir8586

Windows Registry Editor Version 5.00

HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
="Open Cmder Here"
Icon"="\"%CMDER_ROOT%\\icons\\cmder.ico\",0"

HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder\command]
@="\"%CMDER_ROOT%\\Cmder.exe\" /START \"%v\""
@mannyanebi

This comment has been minimized.

Copy link

@mannyanebi mannyanebi commented Apr 2, 2021

Worked for me.

@mannyanebi

This comment has been minimized.

Copy link

@mannyanebi mannyanebi commented Apr 2, 2021

I couldn't find OpenCmderHere.reg file. Can someone help me please

You'd have to create a new txt file, paste the code into it, rename it and run the registry file

@amaridansface

This comment has been minimized.

Copy link

@amaridansface amaridansface commented Apr 3, 2021

image
When I click the Cmder Here, it gives me this... should I have saved the .reg somewhere in particular?

@StokicDusan

This comment has been minimized.

Copy link

@StokicDusan StokicDusan commented Apr 15, 2021

Worked perfectly, Thank you!

@shakilsmash

This comment has been minimized.

Copy link

@shakilsmash shakilsmash commented May 4, 2021

What do you mean with "Execute .\cmder.exe /REGISTER ALL ". How it can executed?

Open your windows command prompt in administrative mode
-> change directory to the cmder.exe folder
-> run the above command

@sistla001

This comment has been minimized.

Copy link

@sistla001 sistla001 commented May 11, 2021

Is it possible to open it as a new tab (if an instance is already running) instead of opening it in a new window every time?

@romanripari

This comment has been minimized.

Copy link

@romanripari romanripari commented May 23, 2021

image
not for me :(

It works if you don't use caps for /register. The command is .\cmder.exe /register ALL

@maya-hamdan

This comment has been minimized.

Copy link

@maya-hamdan maya-hamdan commented Jun 5, 2021

Thanks a lot that helped me so much <3 <3

@maya-hamdan

This comment has been minimized.

Copy link

@maya-hamdan maya-hamdan commented Jun 5, 2021

Thanks a lot that helped me so much <3 <3

but when the cmder is opened in the file the path isn't the current file path
image

@tumelo-mapheto

This comment has been minimized.

Copy link

@tumelo-mapheto tumelo-mapheto commented Jun 10, 2021

Thank you

@MobCat

This comment has been minimized.

Copy link

@MobCat MobCat commented Jun 14, 2021

Works grate on windows 7...
didn't have to restart but did have to use the
.\cmder.exe /REGISTER ALL
command with windows CMD as admin in the cmder folder first, then the context menu and cmder works fine.
Thanks again, and kinda odd this app doesn't have a setting for this as this seems to be a very commonly asked about feature.

@jeremyj563

This comment has been minimized.

Copy link

@jeremyj563 jeremyj563 commented Jun 29, 2021

I'm surprised that no one has pointed that no .reg file or environment variable is necessary for this. All that's needed is to run
cmder.exe /REGISTER [ALL, USER]

Per the documentation: https://github.com/cmderdev/cmder#cmderexe-command-line-arguments

image

@nimit2801

This comment has been minimized.

Copy link

@nimit2801 nimit2801 commented Jul 13, 2021

Worked perfectly thank you! @hamzahamidi

@sewerin0911

This comment has been minimized.

Copy link

@sewerin0911 sewerin0911 commented Oct 20, 2021

What I noticed is that it is not needed to make the registry file. Just use the command \REGISTRY ALL on Cmder that's it!

@hyfydistro

This comment has been minimized.

Copy link

@hyfydistro hyfydistro commented Nov 7, 2021

I'm surprised that no one has pointed that no .reg file or environment variable is necessary for this. All that's needed is to run cmder.exe /REGISTER [ALL, USER]

Per the documentation: https://github.com/cmderdev/cmder#cmderexe-command-line-arguments

image

I'm surprised few read this line

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.

Source: https://github.com/cmderdev/cmder#shortcut-to-open-cmder-in-a-chosen-folder

@hamzahamidi

This comment has been minimized.

Copy link
Owner Author

@hamzahamidi hamzahamidi commented Nov 7, 2021

I'm surprised that no one has pointed that no .reg file or environment variable is necessary for this. All that's needed is to run cmder.exe /REGISTER [ALL, USER]
Per the documentation: https://github.com/cmderdev/cmder#cmderexe-command-line-arguments
image

I'm surprised few read this line

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.

Source: https://github.com/cmderdev/cmder#shortcut-to-open-cmder-in-a-chosen-folder

Simply because it didn't exist in the previous versions. Additionally, The answer has been updated.

@jambi2

This comment has been minimized.

Copy link

@jambi2 jambi2 commented Nov 22, 2021

thank you thank you thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment