How to run the command line on behalf of the administrator

Anonim

Run a command line from the administrator
In the instructions on this site, then it's one of the steps "Run the command line from the administrator." I usually explain how to do it, but where there is no, there are always issues related to this action.

In this manual, I will describe how to run the command line on behalf of the administrator in Windows 10, 8.1 and 8, as well as in Windows 7. A separate instruction for Windows 10 is also available on the site: how to open the command line in Windows 10)

Command line on behalf of the administrator in Windows 10

There are many ways to run the command line on behalf of the administrator, many of which work no matter which version of the OS is installed. But, perhaps, the most convenient and fast way to run cmd.exe with administrator rights in Windows 10 - use the search in the taskbar:

Command line on behalf of the administrator in Windows 10

Just start typing the "command line" in the search, and when the desired result is found, click "Run from the administrator" on the right side or, if this is not found (in earlier versions of Windows 10), click on the result by right-click and select The desired item of the context menu.

Also, if you enter the parameters in Windows 10 - Personalization - Taskbar and turn off the "Replace the PowerShell Shell Command Line" item, the item to start the command line on behalf of the administrator will appear in the Start button context menu (you can open the right click on this button or The combination of the Win + x keys).

Running the command line from the administrator in Windows 8.1 and 8

To start a command prompt as an administrator in Windows 8.1, there are two basic ways (yet another universal method suitable for all the latest versions of the OS, I will describe below.)

The first method is to press the WIN keys (key with the Windows emblem) + x on the keyboard, followed by a selection from the menu that appears "Command Line (Administrator)". The same menu can be invoked by right-clicking the mouse on the "Start" button.

Command line from the administrator in the Win + x menu

The second way of launch:

  1. Navigate to the Windows 8.1 or 8 initial screen (one that with tiles).
  2. Start on the keyboard to type "Command Line". As a result, the search will open on the left.
  3. When you will see the command line in the list of search results, click on it right-click and select the Context menu "Run from the administrator name".
    Command Line in Windows 8 search

Here, perhaps, all by this version of the OS, as you can see - everything is very simple.

In Windows 7.

To run the command prompt on behalf of the administrator in Windows 7, do the following steps:

  1. Open the Start menu, go to all programs - standard.
  2. Right click on the "Command Line" button, select "Run on the administrator name".
    Running the command line in Windows 7

Instead of searching in all programs, you can enter the "command line" in the search field at the bottom of the Windows 7 Start menu, and then do the second step from those described above.

Another way for all recent versions

The command line is the usual Windows program (cmd.exe file) and you can run it as any other program.

It is located in Windows / System32 and Windows / SYSWOW64 folders (for 32-bit versions of Windows, use the first option) for 64-bit - second.

File cmd.exe in windows

Just as in the previously described methods, you can simply click on the cmd.exe file right-click and select the desired menu item to run it on the name of the administrator.

There is another opportunity - you can create a shortcut for the cmd.exe file where you need, for example, on the desktop (for example, dragging the right mouse button on the desktop) and make it always started with administrative rights:

  1. Right-click on the label, select "Properties".
  2. In the window that opens, click the "Advanced" button.
  3. Check in the Properties of the Launch of the Administrator.
    Starting a cmd.exe label on behalf of the administrator
  4. Click OK, then OK again.

Ready, now when running a command line created by a shortcut, it will always run from the administrator.

Read more