Windows 10 - Add back 'Open command window here'

Windows 10 - Add back 'Open command window here'


2 min read

In most recent versions of Windows 10, PowerShell is the default console. If you open file explorer and shift + right click, you will get the option to Open a PowerShell window here (as below).

This is fine (even great) in most cases but recently I've had a few users who want to be able to go back to opening cmd.exe from within a folder.

In order to be able to enable this option you will need to modify some registry entries. So be sure you know what you're doing before attempting this (and maybe perform a backup just in case).

  • Open regedit (Windows + R keys > Type regedit > Press Enter)
  • Browse to the following path: HKEY_CLASSES_ROOT\Directory\shell\cmd
  • Right click the cmd folder and click Permissions
  • Press the Advanced button
  • Next to Owner, press Change.
  • You can enter your account name or select a local group like Administrators.
    • If you're on a AAD domain joined system, you may need to use the Administrators group as you domain account isn't discoverable from within this window.

  • Check the Replace owner on subcontainers and objects option

  • Press Apply and then OK
  • On Permissions select the Administrators group.
  • Under Permissions for Administrators, select Allow for the Full Control option.

  • Press Apply and then OK
  • Inside the cmd key, rename the REG_DWORD HideBasedOnVelocityId to ShowBasedOnVelocityId

  • If you select a folder within folder explorer and press Shift + Right click, you should now see the new option.

If you would like to be able to right click on the background of a file explorer window to open a command console you will need to perform the following steps.

  • Still in regedit, browse to: HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
  • Repeat the same steps as before to change the owner and permissions for the cmd key.
  • Inside the cmd key, rename the REG_DWORD HideBasedOnVelocityId to ShowBasedOnVelocityId

  • You should now see the Open command window here option when shift+right clicking on an open folder

You can go a few steps further an implement your own options. I have one setup that opens PowerShell as administrator in the folder's directory. This saves me having to navigate to the folder after opening an elevated command session.

There are some steps available here to help you on your way.