Just another way in which Microsoft just keeps breaking my productivity by making me fight their systems instead of making it easy to get real work done. In XP – there was a handy “Open command prompt here…” Powertoy that allowed you to right-click on a directory/folder and get a command prompt at that location (no directory switching). But no such luck on Vista. Now add the pain of UAC and you need TWO kinds – “open a command prompt here…” and “open a command prompt here (in administrator mode)…”
Well, here’s how to have BOTH:
“Open a command prompt here…” (courtesy here)
- Open regedt32.exe/registry editor
- Browse to: HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell
- Change the default REG_SZ string to whatever text you want to appear in the right-click menu. (such as:“Open command prompt here…” without the quotes)
- Create a new registry key type within your newly created command prompt shell named “command,” and set the default string to:
cmd.exe /k pushd %1
You may need to add %SystemRoot%system32 before the cmd.exe if the executable can’t be found.
- The changes should take place immediately. Right click a folder and your new menu item should appear.
“Open Command Prompt here (admin mode)…”
- Same as above – open Regedt32
- navigate to/create [HKEY_CLASSES_ROOTDirectoryshellrunas]
- Set the default REG_SZ string for this key to “Administrator Command Prompt here”
- Add a new string value in the same same key called “NoWorkingDirectory” and make sure the string is set to “”
- Navigate to /create [HKEY_CLASSES_ROOTDirectoryshellrunascommand]
- Set the default string to “cmd.exe /k “pushd %L && title Command Prompt””
- Navigate to/create [HKEY_CLASSES_ROOTDriveshellrunas]
- Set the default REG_SZ string “Administrator Command Prompt here”
- Create another new string value in the same key called “NoWorkingDirectory” and make sure the string is set to “”
- Navigate to/creat [HKEY_CLASSES_ROOTDriveshellrunascommand]
- Set the default REG_SZ string to “cmd.exe /k “pushd %L && title Command Prompt””
Or open notepad on AdminOpen.reg and copy/paste the following into it (courtesy of here):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTDirectoryshellrunas] @="Administrator Command Prompt here" "NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTDirectoryshellrunascommand] @="cmd.exe /k "pushd %L && title Command Prompt""
[HKEY_CLASSES_ROOTDriveshellrunas] @="Administrator Command Prompt here" "NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTDriveshellrunascommand] @="cmd.exe /k "pushd %L && title Command Prompt""