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:
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:
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.
If you don’t care what path you start in, pressing “Windows X then A” is your best bet.
Wrap-Up
I hope this helps. Take care and I’ll return you to your regularly scheduled program – Michael on Mobile!
TweetFollow mbcrumpNo new comments are allowed on this post.
Comments
No comments yet. Be the first!