How to Open Elevated or Admin Command Prompt in Windows?

Command Prompt is one of the most used tools in Windows. For tasks requiring administrator privileges, we need to start Command Prompt as administrator (“elevated”). This article describes different ways to open an elevated or administrator Command Prompt window.

How to Open Elevated or Admin Command Prompt

From the Win-X menu in Windows 10 and Windows 8.1

Press Win + X key, or right-click the Start button. Click Command Prompt (Admin)

Using Ctrl + Shift + Enter in Windows 10

  1. Right-click Start, and click Run.
  2. Type cmd.exe in the Run dialog
  3. Press Ctrl + Shift and Enter.

This launches a Command Prompt window as administrator.

RELATED: Start Programs Elevated (as Administrator) from Run Dialog in Windows 10 [Ctrl + Shift]

Using Start Search – Windows 10 and earlier

  1. Click Start, type cmd.exe
  2. When the search results are shown, right-click the cmd.exe entry and choose Run as administrator.

    Alternately, select the cmd.exe in the search results using the UP/DOWN arrow and press Ctrl + Shift and Enter on the keyboard. Ctrl + Shift and Enter runs the program as administrator.

Using Task Manager – New task

  1. Right-click on the taskbar and click Task Manager. Or, press Ctrl + Shift and Esc
  2. In Task Manager, click the File menu and click Run new task
  3. Type cmd.exe in the text box.
  4. Enable Create this task with administrative privileges
    task manager -run command prompt elevated - create new task
  5. Click OK.

Task Manager method offers an advantage. In Windows 10, as Task Manager runs as administrator by default, it doesn’t show you the UAC prompt when you launch a program using it from an administrator account.

Run as administrator using Shortcut Properties

Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator. You can even pin the Command Prompt shortcut to the taskbar for easy reach.

Or you can create a new desktop shortcut to cmd.exe. Right-click on the shortcut and choose Run as administrator. To run the shortcut as an administrator by default:

  1. Right-click the Command Prompt shortcut you created on the Desktop
  2. Click Properties
  3. In the Shortcut tab, click Advanced.
  4. Enable the checkbox for Run as administrator
  5. Click OK and OK.

Now, every time when you double-click the shortcut Command Prompt window will open elevated.

If you’re a frequent user of the Command Prompt, you can Pin it to the Start menu or Taskbar.

Run as Administrator via the folder and desktop right-click menu

To add the Open Command Window Here (Administrator) option to the right-click menu for folders and the Desktop, use the following .reg file:



Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open Command Window Here (Administrator)"

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\directory\Background\Shell\runas]
@="Open Command Window Here (Administrator)"

[HKEY_CLASSES_ROOT\directory\Background\Shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

To add the entry to This PC (Computer) context menu, use the following REG file:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\runas]
@="Open Command Prompt (Administrator)"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\runas\command]
@="cmd.exe"

Note that the .reg files above replace the runas command in the registry if one was added manually earlier. For example, if you’ve added something like “Take Ownership” to the right-click menu for folders, it will be replaced by Command Prompt (Administrator).

How to Use .reg Files

Make a .reg file out of the above contents, and double-click the .reg file and apply the settings to the registry.

You can now open an elevated Command Prompt from the context menu of a folder, This PC or on the Desktop. It adds an Open Command Prompt here (Administrator) option in the context menu for folders and This PC (Computer) and the Desktop. Here are the screenshots:

Screenshots

open elevated command prompt desktop

Elevated Command Prompt
Regular Command Prompt

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

Leave a Comment