search
HomeSystem TutorialWindows SeriesHow 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.

How to Open Command Prompt as Administrator from Context Menu

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.

How to Open Command Prompt as Administrator from Context Menu

Step 4: Then right-click the REG file and choose Merge to automatically add the registry entries.

How to Open Command Prompt as Administrator from Context Menu

And then confirm the operation and you are done by clicking Yes.

How to Open Command Prompt as Administrator from Context Menu

This change will take effect immediately. Test it by right-clicking on a folder, drive or desktop.

How to Open Command Prompt as Administrator from Context Menu

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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
win11 activation key permanent 2025win11 activation key permanent 2025Mar 18, 2025 pm 05:57 PM

Article discusses sources for a permanent Windows 11 key valid until 2025, legal issues, and risks of using unofficial keys. Advises caution and legality.

Acer PD163Q Dual Portable Monitor Review: I Really Wanted to Love ThisAcer PD163Q Dual Portable Monitor Review: I Really Wanted to Love ThisMar 18, 2025 am 03:04 AM

The Acer PD163Q Dual Portable Monitor: A Connectivity Nightmare I had high hopes for the Acer PD163Q. The concept of dual portable displays, conveniently connecting via a single cable, was incredibly appealing. Unfortunately, this alluring idea quic

win11 activation key permanent 2024win11 activation key permanent 2024Mar 18, 2025 pm 05:56 PM

Article discusses reliable sources for permanent Windows 11 activation keys in 2024, legal implications of third-party keys, and risks of using unofficial keys.

Top 3 Windows 11 Gaming Features That Outshine Windows 10Top 3 Windows 11 Gaming Features That Outshine Windows 10Mar 16, 2025 am 12:17 AM

Upgrade to Windows 11: Enhance Your PC Gaming Experience Windows 11 offers exciting new gaming features that significantly improve your PC gaming experience. This upgrade is worth considering for any PC gamer moving from Windows 10. Auto HDR: Eleva

Mozilla Thunderbird 136 Is Here, Switching to Monthly Updates by DefaultMozilla Thunderbird 136 Is Here, Switching to Monthly Updates by DefaultMar 07, 2025 am 01:19 AM

Firefox 136 and Thunderbird 136: Enhanced Security and Performance The latest releases of Firefox and Thunderbird bring significant improvements in video playback smoothness, browsing security, and overall user experience. Let's delve into the key u

The Best Monitor Light Bars of 2025The Best Monitor Light Bars of 2025Mar 08, 2025 am 03:02 AM

Reduce eye strain and brighten your workspace with a monitor light bar! These handy gadgets adjust brightness and color temperature, some even offering auto-dimming. This updated review (03/04/2025) highlights top picks across various needs. BenQ

How to Create a Dynamic Table of Contents in ExcelHow to Create a Dynamic Table of Contents in ExcelMar 24, 2025 am 08:01 AM

A table of contents is a total game-changer when working with large files – it keeps everything organized and easy to navigate. Unfortunately, unlike Word, Microsoft Excel doesn’t have a simple “Table of Contents” button that adds t

This Wild Ultra-Wide Alienware Monitor is $300 Off TodayThis Wild Ultra-Wide Alienware Monitor is $300 Off TodayMar 13, 2025 pm 12:21 PM

Alienware AW3225QF: The best curved 4K display, is it worth buying? The Alienware AW3225QF is known as the best curved 4K display, and its powerful performance is unquestionable. The fast response time, stunning HDR effects and unlimited contrast, coupled with excellent color performance, are the advantages of this monitor. Although it is mainly aimed at gamers, if you can accept the shortcomings of OLED, it is also suitable for office workers who pursue high efficiency. Widescreen monitors are not only loved by gamers, but also favored by users who value productivity improvement. They are great for work and enhance anyone’s desktop experience. This Alienware monitor is usually expensive, but is currently enjoying it

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.