How-To Add Command Prompt Option to Explorer Context Menu (and other tricks)

 From How-To Add Command Prompt Option to Explorer Context Menu (groovypost.com)


Add the “Open command window here” Option to the folder context menu

To add the Open command window here option to the context menu that displays when you right-click on a folder, press Windows key + R to open the Run dialog box.

Then, type: regedit into the Open box and click OK.

If the User Account Control dialog box displays, click Yes to continue. You may not see this dialog box, depending on your User Account Control settings.

Open the Registry Editor in Windows 10

Navigate to the following registry key. You can copy the full path below, paste it into the box just under the menu bar, and press Enter to get to the key quickly.

HKEY_CLASSES_ROOT\Directory\shell\cmd

Take ownership of the cmd key and give yourself full control permission.

Select Permissions for a key in the Windows Registry Editor

Make sure the cmd key is selected. Then, right-click on the HideBasedOnVelocityId value on the right and select Rename.

Select Rename for the HideBasedOnVelocityId value in the Windows Registry Editor

Change the name of the HideBasedOnVelocityId value to ShowBasedOnVelocityId and press Enter.

Rename the HideBasedOnVelocityId value to ShowBasedOnVelocityId in the Windows Registry Editor

Close the Registry Editor and restart the Windows Explorer process.

Restart the Windows Explorer process

Now you can Shift + right-click on a folder, not in it, and select Open command window here.

Notice that the Open PowerShell window here option is still there. If you’re not going to use that option, see the next section to hide it.

Open command window here option added to right-click menu in Windows File Explorer

Hide the “Open PowerShell window here” Option

If you want to hide the Open PowerShell window here option, go to the following path in the Registry Editor:

HKEY_CLASSES_ROOT\Directory\shell\Powershell

Then, take ownership of the Powershell key and give yourself full control permission

Select Permissions for the Powershell key in the Windows Registry Editor

Right-click on the ShowBasedOnVelocityId value, select Rename, and change the name to HideBasedOnVelocityId.

Close the Registry Editor and restart the Windows Explorer process.

The Open PowerShell window here option is removed from the right-click menu in File Explorer.

Rename ShowBasedOnVelocityId key in Windows Registry Editor

Add the “Open command window here” Option to the Context Menu in an Open Folder

So far, we’ve explained how to add the Open command window here option to the context menu when you Shift + right-click on a folder, but not in a currently open folder.

You can also enable the Open command window here option on the right-click menu in an open folder.

Open the registry editor as we showed you earlier and go to the following key.

HKEY_CLASSES_ROOT\Directory\Background\shell\cmd

Take ownership of the cmd key and give yourself full control permission.

Make sure the cmd key is selected. In a blank area of the right pane, right-click the HideBasedOnVelocityId value, and click Rename.

Then, change the name to ShowBasedOnVelocityId.

Close the Registry Editor and restart the Windows Explorer process.

Rename Background cmd HideBasedOnVelocityId value in the Windows Registry Editor

Now you can be in a folder, Shift + right-click in the right pane of File Explorer, and select Open command window here.

The Open command window here option added to the context menu in a folder in Windows File Explorer

Revert Your Changes

To revert your changes, follow the same instructions listed here, but rename the ShowBasedOnVelocityId or HideBasedOnVelocityId value to the other, depending on whether you’re showing or hiding the context menu option.

Comments

Popular posts from this blog

Add GitHub Repository to DBeaver CE Secured with SSH Protocol

Keyboard Shortcut to "Toggle Line Comments" in DBeaver

DBeaver Shortcuts