Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't want to install PowerToys, I'd rather a simpler solution for this specific problem.

I've tried Ctrl+Shift+Right-Click.

I've tried adding a registry script, but I get the following error:

Cannot import D:\Admin\Reg\Open command window here (Administrator)\Open command window here (Administrator).reg: The specified file is not a registry script. You can only import binary registry files from within the registry editor.

Any suggestions?


Forgot to mention: I've tried the import facility in regedit to no avail

share|improve this question

This is one of my favorites. It also takes a bit of work so I've created a reg file. go ahead and create a notepad txt file that has the following:

Windows Registry Editor Version 5.00



@="cmd.exe /s /k pushd \"%V\""



@="cmd.exe /s /k pushd \"%V\""



@="cmd.exe /s /k pushd \"%V\""



@="cmd.exe /s /k pushd \"%V\""

now rename the txt to .reg and merge the file into your registry. It'll create a regular right click context menu for most if not all possible menus.

share|improve this answer
+1; Works great! I'd add HKEY_CLASSES_ROOT\Directory\shell\runas:Extended="" etc. so that this appears on the shift+right-click menu rather than the right-click menu. Also, you have - for keys. Doesn't that delete the keys and sub-values? Shouldn't you leave the existing keys there, or is it probably safe/won't conflict? – Merlyn Morgan-Graham Mar 13 '12 at 1:01
@MerlynMorgan-Graham I believe the places that I used the minus are places that typically don't have keys. This is simply protection against anything else being there. In theory, you could have a RunAs PrintServer or something, but I'd assume if someone is doing that, they should know what they're doing. I work in IT and have seen people try this kind of thing and any attempt to insert better code typically clashes with previous code. Feel free to remove the minus signs. – tophersmith116 Mar 13 '12 at 4:43
The fact that you've given it thought gives me enough comfort to use the code you've provided :) – Merlyn Morgan-Graham Mar 13 '12 at 4:49
Note that it's only the runas verb that gives this the ability to elevate. The HasLUAShield only shows the shield. – Deanna May 7 '15 at 8:14

The easiest way I know of is to simply install CmdOpen. I know you're trying to avoid installing something, but this is a 46 KB install, and the shell extensions themselves are less than 20 KB each (1 for 32-bit, 1 for 64-bit). It's also got some other useful features that you're not going to get out of the box.

It's certainly easier than struggling with registry edits -- especially if you're having problems.

share|improve this answer

If you don't want to install powertoys, try Ultimate Windows Tweaker. It's a one-run .exe that you can delete after.

share|improve this answer

How are you trying to import the .reg file?

The error message suggests you are using the IMPORT option in RegEdit

Try double clicking it in Windows Explorer.

share|improve this answer
That's what I was trying – Josh Comley Jul 10 '10 at 13:58

Just the see below link

Add Command prompt here to right click of mouse or in the context menu Every thing is described there.

share|improve this answer
-1 I don't seen any evidence that this will elevate by default under Windows 7, as the OP asked. It will add a link that already exists under Windows 7, but won't add elevation. Can you provide details to the contrary? – Merlyn Morgan-Graham Mar 13 '12 at 0:50
@MerlynMorgan-Graham is correct, this opens a regular command-prompt, not an elevated one. You need to add the HasLUAShield value to make it have admin privileges. – Synetech Nov 6 '12 at 1:43

I solved it adding this registry keys:

Windows Registry Editor Version 5.00

@="Open command prompt here as admin"

@="C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""

Save it on a .reg file and double click on the file to install it on your registry.

share|improve this answer

Just right click while holding Shift. The option will appear in the context menu.

share|improve this answer

You don't need to add anything to Windows 7, the elevated command prompt is already included, just hold the shift key down when you right click in a folder, the context menu provides additional options, including the Admin command prompt.

If that doesn't work for you, the two reg files you linked to above do work. Make sure you only use Notepad to create the reg file as some text editors add formatting, which will cause problems.

Open a new Notepad text file copy and past the link from the first script then save the file as elecmd.reg Make sure the file file has not been saved with an additionl .txt extension. To check that, In Explorer, open the Tools menu/Folder Options/View/ Untick the box for 'Hide extensions of Known file types. Once confirmed, right click on the elecmd.reg file and select merge.

I've just been through that process and it does work.

share|improve this answer
No. No it doesn't. – Josh Comley Jun 12 '10 at 0:15
+1 for Shift->Right clicking a folder! Hadn't seen that before. Thanks! – BQ. Aug 10 '10 at 16:10

You must log in to answer this question.

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