How To Open Command Prompt Always In Administrative Mode

We all use Command Prompt in our day-to-day work for executing commands, downloading, installing applications, etc. Few tasks require the command prompt to be opened in administrative mode since it will have full permissions to execute the commands successfully. So we follow step by step process like type cmd in the search bar, once appears right click on it, and then click on Run as administrator. This process takes a little time and if a user needs to use a command prompt in administrator mode multiple times in a day then it would be frustrating as well. Normally when we use the terminal it will be opened in the current user mode which has restricted permissions on a few executive commands. There are solutions for this problem so let us discuss how to run the command prompt in administrator mode by default in this article.

How To Set The Command Prompt To Run in Admin Mode Always

There are different methods through which we can open the command prompt and run on administrator mode. Follow either of these methods.

Method 1: Use Command Prompt Shortcut

If you are using the command prompt always with admin mode then follow this method since we will set the command prompt to run on admin mode until we go and revert to the settings.

Step 1: Open File Explorer using the keys (Windows + E) and copy the below line and paste it into the address bar.

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





Step 2: This lists the shortcuts of all applications, find the Command Prompt shortcut. Right-click on it and click on Properties. If you do not have a shortcut for cmd then you should create one.


Cmd Properties Min



Step 3: Under the command, prompt properties click on the Shortcut tab. And click on the Advanced option present below.


Cmd Advancedoption


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


Run As Admin


Step 5: Now when you open the command prompt it will be on Administrator mode. And also before the command prompt window is opened it will ask for confirmation whether to make changes to the app or not so click on Yes.


Cmd Prompt

Method 2: Change The Settings In Registry Editor

Step 1: Open the Registry editor by typing regedit.exe in the windows search bar and click on it. A pop-up window will appear asking to allow changes, click on Yes.




Step 2: Navigate to the following path or copy the following path and paste it into the address bar of the registry editor. You will find the Layers folder

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers





Step 3: Once you are in the layers folder, right-click on it, and on the list, click on New. Then click on String Value. Give the name as C:\Windows\System32\cmd.exe this is the path where the cmd.exe will be present. If you have it in a different location give its full path.




Step 4Right-click on the name you have created now and click on Modify to add the value. Type RUNASADMIN in the Value data and click on OK.


Registry Value


Once done, the name and data look like below.

Registry Window

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


Method 3: Use the Shortcut keys

Type cmd in the search bar of windows and click on Ctrl + Shift + Enter keys simultaneously. This pops up a window asking if you need to allow changes to the app. Click on Yes. Now the command prompt will be opened in admin mode.


Cmd Prompt


That’s it!! Hope this article was useful to solve your problem. Let us know which method helped you. Thank you and Happy Reading!!!