Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Open Command Window Here as Administrator


Open Command Window Here as Administrator

Add or Remove "Open Command Window Here as Administrator" to Context Menu
Published by Brink
16 Dec 2009
Published by

Add or Remove "Open Command Window Here as Administrator" to Context Menu

information   Information
This will show you how to add or remove Open Command Window Here as Administrator to the context menu of a folder, drive, and desktop of all users to open an elevated command prompt with the focus at the library, folder, drive, and desktop location in Windows 7 and Windows 8.

You must be logged in as an administrator to be able to do the steps in this tutorial.

Note   Note
This is just like the Open Command Window Here context menu item, except that it opens an elevated "run as administrator" command prompt at the library, folder, or drive location instead.

When added, you can right click on a library, folder, or drive to see the Open Command Window Here as Administrator context menu item. You will then be prompted by UAC to click on YES or type in the administrator's password.

warning   Warning
This will not work with Library folders.

If you added the Take Ownership context menu item, then adding Open Command Window Here as Administrator will remove and replace it for folders and drives.


EXAMPLE: Open Command Window Here as Administrator
NOTE: This is the context menu with this added and you right click on a drive, folder, or on the desktop.
Name:  Drive.jpg
Views: 64639
Size:  34.8 KBName:  Folder.jpg
Views: 64047
Size:  37.1 KBName:  Desktop.jpg
Views: 63909
Size:  38.0 KB

Here's How:

1. Do step 2, 3, or 4 below for what you would like to do.

2. Add "Open Command Window Here as Administrator" to Context Menu
A) Click/tap on the download button below to download the file below, and go to step 5 below.

Add_Open_Command_Window_Here_as_Administrator.reg

download
3. Add Shift + Right Click "Open Command Window Here as Administrator" to Context Menu
A) Click/tap on the download button below to download the file below, and go to step 5 below.

Add_Shift+Open_Command_Window_Here_as_Administrator.reg

download
4. Remove "Open Command Window Here as Administrator" from Context Menu
A) Click/tap on the download button below to download the file below, and go to step 5 below.

Remove_Open_Command_Window_Here_as_Administrator.reg

download
5. Save the .reg file to your desktop.

6. Double click/tap on the downloaded .reg file to merge it.

7. When prompted, click on Run, Yes (UAC), Yes, and OK to approve merging the .reg file.

8. You can now delete the downloaded .reg file if you like.



That's it
Shawn



21 Mar 2010   #1
janmejaya

windows 7
 
 

thanks a lot
I was searching for it from a long tym to use attribute command line utility


My System SpecsSystem Spec
21 Mar 2010   #2
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Don't you find that intereferes with any other runas context menu items, e.g. Take Ownership?
My System SpecsSystem Spec
04 Apr 2010   #3
bertie11

Windows 8.1.1
 
 

Hi Brink

When I click on the unzipped reg file all I get is Notepad opening up showing the detail of the patch. I can't make it merge into the registry.
Thanks.
My System SpecsSystem Spec
.

04 Apr 2010   #4
z3r010

 

Quote   Quote: Originally Posted by bertie11 View Post
Hi Brink

When I click on the unzipped reg file all I get is Notepad opening up showing the detail of the patch. I can't make it merge into the registry.
Thanks.
If you open regedit (type regedit in the start search bar then press enter) then from the regedit file menu select import and then select the downloaded reg file.
My System SpecsSystem Spec
04 Apr 2010   #5
Brink
Microsoft MVP

64-bit Windows 10 Pro
 
 

Quote   Quote: Originally Posted by bertie11 View Post
Hi Brink

When I click on the unzipped reg file all I get is Notepad opening up showing the detail of the patch. I can't make it merge into the registry.
Thanks.

Hello Bertie,

It sounds like you have a improper association set for .reg file extensions. Double check in Default Programs to make sure that the .reg file extension has it's "Current Default" program set to Registry Editor (C:\Windows\regedit.exe).

Afterwards, see if you can merge the downloaded REG file.

Hope this helps,
Shawn
My System SpecsSystem Spec
05 Apr 2010   #6
bertie11

Windows 8.1.1
 
 

That fixed it!
Thanks Brink and Z3r010
My System SpecsSystem Spec
05 Apr 2010   #7
Brink
Microsoft MVP

64-bit Windows 10 Pro
 
 

You're most welcome Bertie.
My System SpecsSystem Spec
20 Apr 2010   #8
guiLe

win7
 
 

nice tutor
very useful ...
My System SpecsSystem Spec
10 Jun 2010   #9
rover3500

windows 7 Premium
 
 
I have an issue like brink

I know what brink means,if i put take ownership and this reg together,when i try to open a command prompt as admin,it just takes over the folder,and doesn't open a cmd window.
The reg entries are as follows if u have both installed:
@="cmd.exe /s /k pushd "%V""
and IsolatedCommand=cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t

It seems to use the last command all the time.Also it would not let me merge from the reg file when i have take ownership installed,i had to manually put it in.It still shows on menu,but that's outside the key that has the command in the registry.
The only way i can get the open cmd window to work is to take out the isolated command line.
I've no idea why it does it this way,but it does for me,and prob Brink aswell.
Thanx for the info by the way.If i use a different grant admin reg 'hack',i can have both installed,just not with the take ownership for directory 'hack'.

I hope everyone knows what the hell i'm talking about...


Edit : i was mistaken,it won't work with the grant admin reg either,just takes over folder when i do cmd as admin.Had to take out.
My System SpecsSystem Spec
Comment

 Open Command Window Here as Administrator




Tutorial Tools




Similar help and support threads
Windows 7 Tutorial Category
Open Command Window Here - Add or Remove
How to Add or Remove "Open Command Window Here" from Context Menu in Windows This will show you how to add or remove Open Command Window Here from the context menu of the desktop, folders, and drives in Vista, Windows 7, and Windows 8. You must be logged in as an administrator to be able to...
Tutorials
Open Command Window Here
How to Use "Open Command Window Here" in Windows 7 This will show you how to use the Open Command Window Here context menu item of a folder or drive to open a command prompt with the focus at the folder or drive location in Windows 7. This will make it easier to perform a command task at...
Tutorials
Open Network window with a command?
Hi there, i would like to know if its possible to open up this window with a command in the commandprompt? I was planning on putting it in a batch file and execute the batchfile with a button made in rainmeter. Would be very handy for people who have a customized taskbar. At the moment I've only...
Customization
Open Command Window Here
For all DRIVES, <shift>|right-clicking displays OPEN COMMAND WINDOW HERE in the context menu, above the first separator. That item opens the command prompt. But for all other folders the OPEN COMMAND WINDOW HERE item displays below the first separator in the context box, and clicking on it...
General Discussion
Problem open command Window(administrator)
I'm trying to create some auto setup procedures but can not setup a CMD administrator command ( non administrator seems to work) registry tweak ; //run administrator command from explorer @="Open Command Window Here (Administrator)"
Network & Sharing
Open elevated command window here
I could prolly figure it out but does anyone know offhand how to add an "Open elevated command window here" option in addition to the "Open command window here" shift+context menu for a folder?
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 03:49.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App