Power Tip: Elevated Command Prompt Here in Windows 8.1

Introduction

From my last post on “Power Tip for Windows Users: Open Command Prompt Here”, I was asked what about an elevated command prompt inside a folder? This is a very good question and Rahul responded that you can use (ALT-F-M-A ) as shown below:

image

While I am not opposed to doing that, I actually think life would be easier if we just added it to the context menu. While we are here, we can also add the required keys to open an elevated prompt of every drive letter attached to the system. This can easily be accomplished by adding an entry in the registry. So copy/paste the text below into a text file and give it a name of something like “admin.reg” and double-click it.

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Directory\shell\runas]

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open command window here as Administrator"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Open command window here as Administrator"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[-HKEY_CLASSES_ROOT\Drive\shell\runas]

[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="Open command window here as Administrator"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

Now if you shift-right click on any folder, you will see both options:

image

You can also just right click on any folder and see the “Open command windows here as Administrator” prompt. According to your UAC settings, you may have to allow Windows to run in this elevated mode. This works for Drive letters as well.

image

If you don’t care what path you start in, pressing “Windows X then A” is your best bet.

image

Wrap-Up

I hope this helps. Take care and I’ll return you to your regularly scheduled program – Michael on Mobile!



Windows 8
Posted by: Michael Crump
Last revised: 09 Jan, 2014 05:57 PM

Comments

No new comments are allowed on this post.

Hosting provided by http://www.DiscountASP.NET