How to open a Windows 11 Command Prompt as Administrator

  • June 11, 2022
  • Read 164,412 times
 

Windows 11 administrator command prompt

The Windows 11 Command Prompt is an application that allows you to launch programs and change settings by typing commands into a window.

Compared to similar features in the Windows GUI interface, command-line applications that run from the command prompt typically provide more options and granular features when performing a task.

For example, you can copy folders and files, execute PowerShell scripts, or even query specific network and computer configuration information from the command prompt.

When you open a Command Prompt, any command you execute will run under the security privileges of the logged-in user. Therefore, if you try to run a command-line program that requires Administrator privileges, you will not be able to do so and will be shown an 'Access denied' or other error, as shown below.

A program requiring Administrator privileges
A program requiring Administrator privileges

However, it is possible to open a Command Prompt with Administrator privileges that allow you to run any command you wish, which we can explain below.

How to launch a Windows 11 Administrator Command Prompt

To open Windows 11 Command Prompt with Administrator privileges, you need to open the Command Prompt in a certain way.

First, click the Start Menu and type cmd into the search field. Then, when the 'Command Prompt' search result is shown, right-click on it and select Run as adminsitrator, as shown below.

Opening a Windows 11 Command Prompt with Administrative privileges
Opening a Windows 11 Command Prompt with Administrative privileges

When you select Run as administrator, Windows 11 will display a User Account Control prompt asking if you would like the 'Windows Command Processor' to make changes on your device.

At this prompt, click on the Yes button.

User Account Control Prompt
User Account Control Prompt

Once you click on the Yes button, a Windows 11 Administrator Command Prompt will be opened.

You can tell that the Command Prompt is running with Administrator privileges because the window title will state "Administrator: Command Prompt," and you will be in the C:\Windows\System32 directory, as shown below.

Windows 11 Command Prompt with Administrator Privileges
Windows 11 Command Prompt with Administrator Privileges

As we previously noted, the Administrator Command Prompt will start in the C:\Windows\System32 folder rather than your User Profile (C:\Users\[account_name]).

As this is a very sensitive folder with files required for the proper operation of Windows, it is suggested that you change to your user profile instead.

To do this, type cd %userprofile% and press the enter key on your keyboard.

In this Elevated Command Prompt, you can now launch programs or access files that require Administrative privileges.

You can read our Introduction to the Windows Command Prompt tutorial for more information on the Command Prompt and how you can use it. 

Users who read this also read:

  • How to backup and restore the Windows Registry Image
    How to backup and restore the Windows Registry

    The Windows Registry is a crucial component of the Windows operating system that stores configuration settings and options. Therefore, it is always important to make a backup of the Windows Registry before making any changes.

  • How to see hidden files in Windows Image
    How to see hidden files in Windows

    By default Windows hides certain files from being seen with Windows Explorer or My Computer. This is done to protect these files, which are usually system files, from accidentally being modified or deleted by the user. Unfortunately viruses, spyware, and hijackers often hide there files in this way making it hard to find them and then delete them.

  • How to use the Windows Registry Editor Image
    How to use the Windows Registry Editor

    The Registry Editor is a powerful application that allows you to access and edit the configuration settings of the Windows operating system. Here's how to use it.

  • How to enable Kernel-mode Hardware-enforced Stack Protection in Windows 11 Image
    How to enable Kernel-mode Hardware-enforced Stack Protection in Windows 11

    Kernel-mode Hardware-enforced Stack Protection is a security feature introduced in Windows 11 22H2 that protects systems from various memory attacks, such as stack buffer overflows.

  • How to show hidden files in Windows 7 Image
    How to show hidden files in Windows 7

    Windows 7 hides certain files so that they are not able to be seen when you exploring the files on your computer. The files it hides are typically Windows 7 System files that if tampered with could cause problems with the proper operation of the computer. It is possible, though, for a user or piece of software to set make a file hidden by enabling the hidden attribute in a particular file or ...

 

Comments:

blog comments powered by Disqus
search tutorials

Login