Open Command Window Here as Administrator

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

   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
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
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.
Drive.jpgFolder.jpgDesktop.jpg



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



 

Attachments

Last edited:
Thanks!
 

My Computers My Computers

  • At a glance

    Windows 11R5 3600X5700XT
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    Unknown
    OS
    Windows 11
    CPU
    R5 3600X
    Motherboard
    ASUS
    Graphics Card(s)
    5700XT
    Hard Drives
    1TB nvm.e SSD m2
    Antivirus
    Kaspersky
    Browser
    Edge
  • Computer type
    PC/Desktop
Thank you very much
 

My Computer My Computer

At a glance

Windows 7 Home Premium 32bitsIntel Core i54gbIntel HD Graphics (Core i5)
Computer type
Laptop
Computer Manufacturer/Model Number
Samsung
OS
Windows 7 Home Premium 32bits
CPU
Intel Core i5
Memory
4gb
Graphics Card(s)
Intel HD Graphics (Core i5)
Antivirus
Avast Free
Browser
Chrome
To those with the Take Ownership issue, I still have Take Ownership, but it's only available when you right click a file or folder. That's as good as any if you ask me. YOU don't open the option IN the folder, you right click THE file and Take Ownership.

I'm assuming this bit:
Code:
@="Open command window here as Administrator"

Can be changed to some other text instead of that long sentence? Like, "Open CMD Here" ?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
I can confirm that changing that part in the registry will do as I wanted.



fdbh.jpg
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
I can confirm that changing that part in the registry will do as I wanted.

Sorry mate. Correct, you can change that text to whatever you want to show in the context menu. :-)
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Just discovered that if you press and hold the Shift key and right click, the open command window here option is available.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
Back
Top