win + r -> cmd
-> enter
How to replace the alias of cmd?
I want to run cmder instead of default cmd.exe
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communitywin + r -> cmd
-> enter
How to replace the alias of cmd?
I want to run cmder instead of default cmd.exe
Windows uses the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
to register full paths of applications which are visible from the Win+R shortcut. We can use the same behavior by creating an entry for cmd.exe here.
Use the portable program AppPaths to safely write/edit the entry for cmd.exe to reflect the full path to cmder.exe and save. No reboot is required. You could manually write to the registry as well, but the app tests for errors before saving. Note that you will need admin rights either way.
EDIT For posterity, here are the steps for manually editing the registry as well.
Note that in the following, the alias cmd
== cmder
will be set for all users of the PC. If you only want the mapping for your user account, replace the registry path HKEY_LOCAL_MACHINE
with HKEY_CURRENT_USER
in the following.
Run regedit
and go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths
. You might need admin rights.
Create a new key with the name cmd.exe
i.e. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\cmd.exe
Modify the Default
string in the newly created key to reflect the path to cmder.exe e.g. C:\tools\cmder\cmder.exe
In the cmd.exe
key folder, create a new string called 'Path' and give it the value of the folder where cmder.exe is located. For the example path in step 3, this would be C:\tools\cmder
. This step is not mandatory. It adds the directory to the PATH variable the cmder.exe inherits. This is useful if the directory contains any helper executables required by cmder.exe.
How I've achieved the same bypass of Windows' native applications:
1. Create a directory in root called "shortcuts" (C:\shortcuts assuming your root drive is C)
2. Add the path to the new directory to your PATH environment variable
3. Create a shortcut to cmder.exe, and rename the .lnk shortcut file to "cmd"
4. Place the shortcut into your new shortcuts directory
5. Windows+R> cmd
You would think that editing the registry would hold more sway than this workaround, but this is literally the way that I shortcut to anything, now.
cmd.exe
- I would have to rename it to something elsePATH
as first one.PATH=cmderpath:normalpath
and also create a copy ofcmder
ascmd.exe
on the same path ascmder