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 in Windows Vista
- Adding the Run as Administrator Option for .VBS and .JS Files
- Games Explorer Link in the Vista Start Menu Does Not Work
- Open Command Window Here – Make Available From Folder Tree
- Fix for Windows Installer Errors 2738 and 2739 in Windows Vista
If you enjoyed this post, make sure you subscribe to our RSS feed! We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?





For XP:
http://www.roggel.com/NGNeer/BackgroundCMD/