How to Open Command Prompt as Administrator from Context Menu
This article will show you how to add an Open Command Prompt here (Administrator) option to the right-click context menu for folders, Desktop and to This PC. So that you can open Command Prompt as Administrator from the context menu in Windows 10.
How to Add Open Command Window here as administrator to the context menu
To add Open command window here as administrator to the context menu for file system folders. Here's how:
Step 1: Open the Notepad in Windows 10.
Press Win+R keys to bring up Run dialog, input notepad and hit Enter key.
Step 2: Copy the below contents to Notepad.
To add the Open Command Window Here (Administrator) option to the context menu for file system folders, use the following REG file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTDirectoryshellrunas]
@="Open Command Window Here (Administrator)"
[HKEY_CLASSES_ROOTDirectoryshellrunascommand]
@="cmd.exe /s /k pushd "%V""
To add the entry to the context menu for Desktop, use the following REG file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTdirectoryBackgroundShellrunas]
@="Open Command Window Here (Administrator)"
[HKEY_CLASSES_ROOTdirectoryBackgroundShellrunascommand]
@="cmd.exe /s /k pushd "%V""
To add the entry to This PC (My Computer) context menu, use the following REG file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTCLSID{20D04FE0-3AEA-1069-A2D8-08002B30309D}shellrunas]
@="Open Command Window Here (Administrator)"
[HKEY_CLASSES_ROOTCLSID{20D04FE0-3AEA-1069-A2D8-08002B30309D}shellrunascommand]
@="cmd.exe"
Step 3: Save the cmd.reg file.
Step 4: Then right-click the REG file and choose Merge to automatically add the registry entries.
And then confirm the operation and you are done by clicking Yes.
This change will take effect immediately. Test it by right-clicking on a folder, drive or desktop.
The above is the detailed content of How to Open Command Prompt as Administrator from Context Menu. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











KB5054979 is a cumulative security update released on March 27, 2025, for Windows 11 version 24H2. It targets .NET Framework versions 3.5 and 4.8.1, enhancing security and overall stability. Notably, the update addresses an issue with file and directory operations on UNC shares using System.IO APIs. Two installation methods are provided: one through Windows Settings by checking for updates under Windows Update, and the other via a manual download from the Microsoft Update Catalog.

Nanoleaf's Pegboard Desk Dock: A Stylish and Functional Desk Organizer Tired of the same old charging setup? Nanoleaf's new Pegboard Desk Dock offers a stylish and functional alternative. This multifunctional desk accessory boasts 32 full-color RGB

Unlocking Ryzen's Potential: A Simple Guide to Precision Boost Overdrive (PBO) Overclocking your new PC can seem daunting. While performance gains might feel elusive, leaving potential untapped is even less appealing. Fortunately, AMD Ryzen processo

ASUS ROG Zephyrus G14 Esports Laptop Special Offer! Buy ASUS ROG Zephyrus G14 Esports Laptop now and enjoy a $300 offer! Original price is $1999, current price is only $1699! Enjoy immersive gaming experience anytime, anywhere, or use it as a reliable portable workstation. Best Buy currently offers offers on this 2024 14-inch ASUS ROG Zephyrus G14 e-sports laptop. Its powerful configuration and performance are impressive. This ASUS ROG Zephyrus G14 e-sports laptop costs 16 on Best Buy

Turn your Windows 11 PC into a Bluetooth speaker and enjoy your favorite music from your phone! This guide shows you how to easily connect your iPhone or Android device to your computer for audio playback. Step 1: Pair Your Bluetooth Device First, pa

Unlock Hidden Windows Features for a Smoother Experience! Discover surprisingly useful Windows functionalities that can significantly enhance your computing experience. Even seasoned Windows users might find some new tricks here. Dynamic Lock: Auto

Windows 11's Start Menu Gets a Much-Needed Overhaul Microsoft's Windows 11 Start menu, initially criticized for its less-than-intuitive app access, is undergoing a significant redesign. Early testing reveals a vastly improved user experience. The up

Is your Windows laptop battery draining faster than you'd like? Don't worry, you can significantly extend its life with a few simple tweaks to Windows' built-in power management features. Here's how to maximize your laptop's battery life on a singl
