Adding Administrator Command Prompt to Context Menus in Windows Explorer

Last Updated on

Unlike Linux / Unix based systems, Wintel environments have in many respects only recently made strides to leverage the command line.  This is evident from continuous development of PowerShell and associated modules.  The only thing that ties most people to a windows desktop at this point is Microsoft Office.  Consoles can easily be opened via windows explorer with this minor registry addition, which adds the ability to right click a folder and launch a PowerShell or cmd environment.

1
2
3
4
5
6
7
8
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\runas]
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open Command Window Here as Administrator"
"Icon"="C:\\Windows\\System32\\imageres.dll,-78"
[-HKEY_CLASSES_ROOT\Directory\shell\runas\command]
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd "%V""

 Download Registry File

Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply