Open an elevated Command Prompt from the Desktop context menu
In article 113 How to open an elevated Command Prompt from the folder context menu in Windows Vista (published in December 2006) we saw how to add the Open Command Window here (Administrator) option for file system folders in Windows Vista.
Here is how to add this option in the Desktop context menu.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Open Command Window here (Administrator)"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
Copy the above lines to Notepad, and save the file with .REG extension, say cmd-admin.reg. Then right-click the .reg file and choose Merge. You’ll see see an Open Command Window here (Administrator) option as shown in the above figure, when you hold down the SHIFT key and right-click on the Desktop.
This uses the same runas technique used in article 113 How to open an elevated Command Prompt from the folder context menu in Windows Vista to trigger the elevation prompt.
RELATED POSTS
- Register DLLs (elevated) using the context menu
- Calendar Gadget in Windows Sidebar is blank with orange background
- Adding the Run as Administrator option for .VBS and .JS files
- Open Command Window Here - Make available from folder tree
- Add “Edit HOSTS file” option in the context menu
Bookmark this Page!BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon | Wink |


If you enjoyed this post, make sure you
Prefer an E-mail subscription?