When you hold Shift while right-clicking a folder in Windows, the context menu includes the option to Open command window here.
Is there a registry tweak, or an extension/add-on, which frees you from the need to hold Shift for this operation?
Write up on How To Geek, they also include downloadable reg files to make the edits for you, or open regedit and navigate to:
HKEY_CLASSES_ROOT\Drive\shell\cmd
Change the name of the key "Extended", or just delete it, this will give you “Open Command Window Here” on right clicking drives.
For directories do the same thing as above here:
HKEY_CLASSES_ROOT\Directory\shell\cmd
Start / regedit
Browse to each of the following keys in the registry tree:
HKEY_CLASSES_ROOT\Drive\shell\cmd
HKEY_CLASSES_ROOT\Directory\shell\cmd
HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
Delete the file 'value' called 'Extended'.
Alas the Registry Editor doesn't have a URL bar before Windows 10, so navigating to find those three folders is more tedious than it could be.
I like using the small CmdOpen shell extension. It will replace the built-in functionality and enhance it by adding an Open Elevated Command Prompt Here
option. It also adds entries to the context menu of the folder background, so you don't have to mouse over to the tree view and hit a small target (or go up a folder if you have the tree hidden).
The above solution can be done without manually editing the registry. Someone has already done the script for us.
Note that before running any reg file, view it to make sure it is safe.
Other answers have covered the steps, but the import of a REG
file can also accomplish this:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
"Extended"=-
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=-
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
"Extended"=-
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=-
[HKEY_CLASSES_ROOT\Drive\Background\shell\cmd]
"Extended"=-
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=-
[HKEY_CLASSES_ROOT\Drive\shell\cmd]
"Extended"=-
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=-
The ShowBasedOnVelocityId
and HideBasedOnVelocityId
values exist because Windows is trying to force PowerShell over the regular Command Prompt by inserting these values into these keys and the similar \PowerShell
keys.
But, before you do this, you will have to ensure that your account has permission to the Registry keys in question since after every major Windows Update the TrustedInstaller
account likes to take control of the settings it changes. I generally set the owners of the [HKCR\Directory]
and [HKCR\Drive]
keys and all subkeys to the Administrators group, then force inheritance of the permissions which grant Administrators full access to all of the subkeys.
With Windows 10 version 1607, the security of the keys must be changed in order to be able to change/delete the value (source):
Select Permissions...
Click the Advanced button