search
HomeCommon ProblemHow to always open command prompt in administrative mode

We all use the command prompt in our daily work to execute commands, download, install applications, etc. Few tasks require opening the command prompt in administrative mode as it will have full permissions to successfully execute the command. So we follow the step by step process like enter cmd in the search bar and once it appears right click on it and click on run as administrator. This process takes a little time and can also be frustrating if the user needs to use the command prompt in administrator mode multiple times a day. Normally, when we use the terminal, it will be opened in the current user mode, which has restricted permissions for some execution commands. There is a solution to this problem, so let us discuss in this article how to run Command Prompt in Administrator mode by default.

How to set the command prompt to always run in administrator mode

We can open the command prompt and run in administrator mode through different methods. Follow any of these methods.

Method 1: Use the Command Prompt Shortcut

If you always use the Command Prompt in Administrator mode, follow this method as we will set the Command Prompt to be in Admin mode Run in operator mode until we restore settings.

Step 1: Open File Explorer using the key ( Windows E ), then copy the following lines and paste them into the address bar middle.

C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows System

How to always open command prompt in administrative mode

Step 2: This lists shortcuts for all applications, find the Command Prompt shortcut. Right click on it and click Properties. If you don't have a shortcut to cmd then you should create one.

How to always open command prompt in administrative mode

Step 3: Under Commands, prompt Properties click the Shortcutstab. Then click on the Advanced options below.

How to always open command prompt in administrative mode

Step 4: Under Advanced Properties, click the checkbox Run as administrator. Then click OK.

How to always open command prompt in administrative mode

Step 5: Now, when you open the command prompt, it will be in Administrator mode. And before opening the command prompt window, it will ask for confirmation to make changes to the application, so click Yes.

How to always open command prompt in administrative mode

Method 2: Change settings in the Registry Editor

Step 1: By typing # in the Windows search bar ##regedit.exeOpen Registry Editor and click on it. A pop-up window will appear asking if you want to allow changes, click Yes.

How to always open command prompt in administrative mode

Step 2 : Navigate to the following path or Copy the following path and Paste itGo to the address bar of the Registry Editor. You will find the layer folder

计算机\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

How to always open command prompt in administrative mode

Step 3: After entering the layer folder, right click Click on it, then click New in the list. Then click String value. Name it C:\Windows\System32\cmd.exe, this is the path where cmd.exe is located. If you put it in a different location, please give its full path.

How to always open command prompt in administrative mode

Step 4: Right-click on the name you created now and click Modify to add value. Enter RUNASADMIN in the numerical data and click OK.

How to always open command prompt in administrative mode

When completed, the name and data will look like this.

How to always open command prompt in administrative mode

Step 5: Now, when you open the command prompt, it will use administrator mode.

Method 3: Use the shortcut key

Type

cmd in the Windows search bar and click Ctrl Shift Enter## at the same time #key. This will bring up a window asking if you need permission to make changes to the application. Click Yes. Now the command prompt will open in administrator mode.

The above is the detailed content of How to always open command prompt in administrative mode. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:云东方. If there is any infringement, please contact admin@php.cn delete

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

Video Face Swap

Video Face Swap

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

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor