Open Elevated Command Prompt Window Here as Administrator at Current Folder Directly in Vista Windows Explorer

In Windows Vista, if User Account Control (UAC) is not disabled, there will be occasional need to open an elevated command prompt window with full administrator rights. When an elevated command prompt is opened, it will normally go to \Windows\System32\ folder by default. Windows Vista has built-in hidden function to show open command prompt or command window here to the contextual menu of the folder so that users can easily open a command prompt shell at current location when browsing directories in Windows Explorer or Computer (aka My Computer) straight direct into the directory without having to type a lot of “cd” (change directory) command, especially when the directory is deeply nested and low in hierarchy.

With the following trick, it’s also possible to add a context menu option item permanently to right click contextual menu of folders in Windows Explorer and Computer to bring up a Open Command Window Here as Administrator option which will not only open a command prompt at current Windows Explorer location which you’re viewing at, but also run the command window in elevated mode with full administrator privileges after granting permission with UAC dialog.

To add a contextual menu item to the file system folders’ right click menu that launch an elevated command window here at current directory as administrator, simply download the following registry registration file.

Download elevated-command-here.zip from the forums.

Unpack the archive and double click on elevated-command-here.reg file to apply the registry setting. You can also right click on the .reg file and select “Merge”. Click “Continue” on User Account Control “Windows needs your permission” pop-up dialog, and then confirm the Registry Editor modification request by pressing “Yes” when asked whether sure want to continue on window with message saying “Adding information can unintentionally change or delete values can causes components to stop working correctly. If you do not trust the source of this information in elevated-command-here.reg, do not add it to the registry”.

What the registry file is doing is shown in the code block below. You can also copy and paste the following code to a text editor, and save the file with a filename with .reg extension. Then double click on it to merge the values to the registry.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open Command Window Here as Administrator"

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

Open Command Window Here as Administrator

Once merged, open Windows Explorer, Computer, Documents, Pictures, Music, or Games in Windows Vista Start Menu, then right click on any folder, and you will see Open Command Window Here as Administrator contextual item option which will bring you direct to the destination directory which you right click at or currently in with full admin rights. A pretty convenient and useful shortcut trick.


3 Responses to “Open Elevated Command Prompt Window Here as Administrator at Current Folder Directly in Vista Windows Explorer”

  1. Neil
    November 6th, 2007 22:48
    3

    hey! landed up here when i googled a strange command line option in vista. when i used vista manager to edit the contextual menu options, i saw the same command you have used as an option already enabled with the display name as “@shell32.dll, -8506″. is this normal, coz when i actually right click at places, or on folders, i never see this entry as an option…

  2. How to Open Elevated Command Prompt with Administrator Privileges in Windows Vista » My Digital Life
    October 18th, 2007 00:28
    2

    [...] key and right click on a folder open a command window here, a registry hack will allow you to open command window at current folder in elevated mode as administrator. Get help or contribute tips or tricks at My Digital Life [...]

  3. Reveal and Access to Windows Vista Hidden Context-Sensitive (Right Click) Menu Item - Open Command Prompt Here & Copy as Path » My Digital Life
    October 18th, 2007 00:24
    1

    [...] You can also use registry hack to open “elevated command window here as administrator“. [...]

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

elevated mode - @shell32.dll,-8506 - elevated mode command prompt - windows vista elevated mode - elevated mode vista - what is elevated mode - commandline for elevated cmd - vista open explorer as administrator - ELEVATED MODE IN VISTA - command line elevated mode - open administrator command prompt - command prompt here with admin - elevated from command line - how to bring up elevated command prompt - How do I run in elevated mode? - open command prompt as admin - open folder as administrator - run in elevated mode windows vista - open file as an administrator - open command prompt as administrator - Start explorer in admnistrator mode in vista - command here adminisatrator - elevated command line - windows 7 elevated mode - elevated command prompt - elevated administrator privileges - elevated command-line prompt - invoking elevated mode windows 7 command prompt - OPEN ELEVATED COMMAND WINDOWS HERE - admin command here - ows xp in elevated mode - how do I start command prompt in elevated mode? - elevated command line prompt - what is elevated mode in command promt vista - programmatically open cmd in elevated mode - "command here" "windows 7" - vista command elevated mode - command here as admin windows7 - how to open command prompt as administrator - how do i run in elevated mode - open file as administrator in vista - register the component from a command prompt with elevated permissions. - calling command line elevated mode - getting vista into elevated mode - windows 7 open folder as admin - elevate process command line - give administrator elevated permissions - how to open administrator folder in xp - how to access cmd with elevated rights - inable elivated mod in cmd -