19

The point is to add right click menu items only for Shift+Right click. Don't even bother: regular right click is all over the web, but I want to add some items that wouldn't clutter my right click.

Here's how to add "Open Command Window Here" for right click menu. What do I need to modify to add it only to Shift+Right click?

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]
@="Open Command Window Here"
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command]
@="cmd.exe /k pushd %L"

(Yes, I know, that's exactly what win7 does).

4 Answers 4

16
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]
@="Open Command Window Here"
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command]
@="cmd.exe /k pushd %L"

Note the "Extended"="" command on the fourth line.

0
5
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\CommandPrompt]
@="Open Command Window Here"
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\CommandPrompt\command]
@="cmd.exe /k pushd %L"

You probably want to add to the Background

3
  • welcome to superuser, but as you can see the question had been answered half a year ago ;)
    – Pavel P
    Dec 12, 2013 at 22:59
  • yea the answer wasn't working for me and once I changed the background one it seemed to work. I'm glad you asked this question because it was a good starting point.
    – Steven
    Dec 13, 2013 at 2:05
  • The accepted answer did not work for me either, but this one did. May 24, 2020 at 6:46
1

While searching for solutions on how I can add the command to regular right click, i stumbled upon this question. I already had the solution to open the command prompt window on shift+right click and I feel like I should share it, since it's a bit different than the ones mentioned here.

Windows Registry Editor Version 5.00

; show OpenCmdWindow when shift+right click
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
"HideBasedOnVelocityId"=-
"ShowBasedOnVelocityId"=dword:00639bc8

I also noticed that you need permissions for changing the values in HKEY_CLASSES_ROOT\Directory\Background\shell. I use SetACL to modify permissions from command line.

0
  1. In regedit go to Computer\HKEY_CLASSES_ROOT\Directory\Background\shell
  2. Go to your Key
  3. Add a String and name it Extended
1
  • Avoid posting answers to old questions that already have well received answers unless you have something substantial and new to add.
    – Toto
    Aug 22, 2022 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .