Command Prompt here (as Admin) for Windows Explorer


Recommended Posts

This tweak places a context menu option to open a command prompt as Administrator (assuming you already have this permission with your account).

 

It places it in several places so that you can even right click anywhere in Explorer in a folder and the option also appears, also with right clicking a folder in Explorer.

 

SNAG-0000.png

 

SNAG-0002.png

 


Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\runas]
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Command Prompt here"
"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]
@="Command Prompt here"
"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]
@="Command Prompt here"
"HasLUAShield"=""

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

 

Copy the above into a new file called admin_prompt_here.reg and merge it into the registry. It works right away without needing to reboot.

 

Bonus tip: You can change the "Command Prompt here" text to anything you want, I opted for a short one since the shield icon already represents that the option is run as an Administrator.

SNAG-0001.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now