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.

New Articles

Incoming Search Terms for the Article

elevated mode command prompt - elevated mode - open an elevated command prompt with administrator rights - what is elevated mode in vista - vista elevated mode - dos elevated mode - how to open a folder as administrator - open administrator command prompt here - open folder as administrator - open elevated command prompt here - how to open a file as administrator - How to invoke elevated mode - open files as administrator vista - @shell32.dll-8506 - cmd line elevated mode - elevated command prompt in XP - elevated mode vista - elevated command-line window - elevated administrator privileges - open elevated command window here - running elevated mode - windows vista elevated mode - cmd elevated mode windows 7 - elevate permission windows registry file - elevated command line prompt - vistamanager run administrator - как удалить каталог на D @shell32.dll,-8506 - cmd running elavated mode - elevated mode in vista - explorer with administrator privileges from command prompt new window - open command window here as administrator windows 7 - shell32.dll,-8506 - change directory in command prompt - elevated administrator - how do i run in elevated mode - UNELEVATED command line. - # Open an command prompt window with elevated privileges. - elevated as an administrator - cmd eleveated mode - elevated mode command line - how to elevate to an administrator - how to use elevated mode vista through command prompt - how to run command prompt with elevated priveliges - how to open elevated command prompt with administrator privileges in windows xp - in windows vista unable to open elevated command prompt in admin mode - open files as admin vista - programmatically open shell administrative privileges - asus elevated mode - elevated command line shell - elevated command line -