Pages

Tuesday 18 September 2012

Insert command prompt anywhere in Explorer


Command-line junkies get frustrated easily by User Account Control because so many command-
line tools require you to open an administrator command prompt. Particularly frustrating are instances
when you’re using Windows Explorer, and you realize that you need to launch an administrator
command-line prompt at a particular folder, especially one that’s nested several levels deep. You’ll
have to go through the annoying steps required to launch an administrator command prompt, then go through the equally annoying steps of using the CD command to get to the right folder. Then you can
finally get to work. There’s a simpler way. A command-line hack will let you add a right-click option to Windows Explorer
called Open Administrator Command Prompt Here. That way, you’ll just need to right-click in the
folder in which you want to open an administrator prompt, make your selection, and the prompt . . .
well, the prompt opens promptly.

To do this trick just copy and paste the code below to your Notepad and save with ".reg" extension with any name.
Insert command prompt


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open Administrator Command Prompt Here"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /k \"pushd %L && title Command Prompt\""

[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="Open Administrator Command Prompt Here"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /k \"pushd %L && title Command Prompt\""




No comments:

Translate My Blog