Subscribe to our RSS feed     Get daily updates in your mail box

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


Bookmark this Page!BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon | Wink |
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?

Enter your email address:

Delivered by FeedBurner

Post a Response