Walker News

Registry Hack To Open Elevated Command Prompt With Right Click In Windows 7

How to open elevated command prompt in right click context menu? In Windows Vista and Windows 7, there is this “Open command window here” option to execute cmd.exe with normal privilege if you press and hold the SHIFT key followed by right click on a folder.

An admin-level Command Prompt in Windows Vista or Windows 7 shows Administrator keyword in the window title explicitly to denote it is running with elevated privilege.However, there is a trick to open true administrator Command Prompt by just right click on the folder without having to press SHIFT key or whatever.

Trick to open elevated Command Prompt with right click

A Windows Registry hack enable right click to open elevated Command Prompt in Windows Vista and Windows 7.

The trick is tested on Windows Vista SP2 and Windows 7 (should be applicable to Windows Server 2008).

In addition, this trick is actually a Registry hack, i.e. you have to make change in Windows Registry (leave now if you are not comfortable with it):

1) Press Windows key or click the Start button, type cmd and press CTRL+SHIFT+ENTER key to open a elevated Command Prompt window. Not get it? Try this:

How to open a true administrator, elevated privilege Command Prompt in Windows Vista or Windows 7?Alternative: Click Start button, type cmd, right click the cmd.exe shortcut appears atop the Start menu and select “Run as Administrator”.

2) Copy these lengthy reg.exe commands, one by one, paste it to the opened elevated Command Prompt and press ENTER key to execute (see also “How to enable copy and paste in Windows 7 Command Prompt“):

Using command line tool to make change in Windows Registry.

To display new option in the right click context menu of directory:
reg add HKCR\Directory\shell\Runas /ve /t REG_SZ /d "open ELEVATED command prompt at this working directory" /f

The action or command to execute when that new option is selected:
reg add HKCR\Directory\shell\Runas\Command /ve /t REG_SZ /d "cmd.exe /k \"pushd %L ^&^& title Elevated Command Prompt Window\"" /f

To display new option when right click on a disk drive, CD/DVD-ROM drive, USB drive, etc:
reg add HKCR\Drive\shell\Runas /ve /t REG_SZ /d "open ELEVATED command prompt at this working directory" /f

The command to execute when that new option in right click context menu is selected:
reg add HKCR\Drive\shell\Runas\Command /ve /t REG_SZ /d "cmd.exe /k \"pushd %L ^&^& title Elevated Command Prompt Window\"" /f

Easier one-click to apply Registry hack

If those commands look complicated to you, just download this Registration Entries (.reg) file and double it to run:
ElevatedCmd.zip
[ md5 checksum (.zip): e94fc460bf480265670330203cb0c3cc ]
[ md5 checksum (.reg): 8a76ef862374e65bc9229ad6c32a58fe ]

Custom Search

2017  •  Privacy Policy