Windows run cmd as admin

All you have to do is use the runas command to run your program as Administrator (with a caveat).

runas /user:Administrator "cmdName parameters"

In my case, this was

runas /user:Administrator "cmd.exe /C %CD%\installer.cmd %CD%"

Note that you must use Quotation marks, else the runas command will gobble up the switch option to cmd.

Also note that the administrative shell (cmd.exe) starts up in the C:\Windows\System32 folder. This isn’t what I wanted, but it was easy enough to pass in the current path to my installer, and to reference it using an absolute path.

Caveat: Enable the admin account

Using runas this way requires the administrative account to be enabled, which is not the default on Windows 7 or Vista. However, here is a great tutorial on how to enable it, in three different ways:

I myself enabled it by opening Administrative Tools, Local Security Policy, then navigating to Local Policies\Security Options and changing the value of the Accounts: Administrative Account Status policy to Enabled, which is none of the three ways shown in the link.

An even easier way to accomplish this:

C:> net user Administrator /active:yes

The best solution for me (W10):

1- Pin the taskmanager In Taskbar : C:\Windows\System32\Taskmgr.exe

Press Ctrl + Shift + Esc , richt click on the taskmanager in the taskbar and select «Pin to taskbar» and close the taskmanager.

2- Press Ctrl + Shift + Click on the pinned taskmanager

3- Type the administrator and password account

4- Click on File -> Run new task

6- Enter «cmd» and select «Create this task with administrative privileges.» check box

Let the Taskmanager open If you need to use other commands with admin rights by using the check box (regedit.exe, services.msc, mmc.exe, control userpasswords2…)

Как запустить командную строку от имени Администратора

Запуск командной строки от АдминистратораВ инструкциях на этом сайте то и дело одним из шагов является «Запустите командную строку от администратора». Обычно я поясняю, как это сделать, но там, где нет, всегда появляются вопросы, связанные именно с этим действием.

В этом руководстве опишу способы запуска командной строки от имени Администратора в Windows 10, 8.1 и 8, а также в Windows 7. Также на сайте доступны отдельные инструкции: Как открыть командную строку от имени Администратора в Windows 11, Как открыть командную строку в Windows 10)

Командная строка от имени администратора в Windows 10

Существует множество способов запуска командной строки от имени Администратора, многие из которых работают независимо от того, какая версия ОС у вас установлена. Но, пожалуй, самый удобный и быстрый способ запустить cmd.exe с правами администратора в Windows 10 — использовать поиск в панели задач:

Командная строка от имени администратора в Windows 10

Просто начните набирать «Командная строка» в поиске, а когда нужный результат будет найден, нажмите «Запуск от имени администратора» в правой части или, если такого не обнаружится (в ранних версиях Windows 10), нажмите по найденному результату правой кнопкой мыши и выберите нужный пункт контекстного меню.

Также, если в Windows 10 вы зайдете в Параметры — Персонализация — Панель задач и отключите пункт «Заменить командную строку оболочкой PowerShell», то пункт для запуска командной строки от имени администратора появится в контекстном меню кнопки пуск (открыть можно правым кликом по этой кнопки или сочетанием клавиш Win+X).

Запуск командной строки от администратора в Windows 8.1 и 8

Для того, чтобы запустить командную строку с правами администратора в Windows 8.1 есть два основных способа (еще один, универсальный способ, подходящий для всех последних версий ОС я опишу ниже).

Первый способ заключается в нажатии клавиш Win (клавиша с эмблемой Windows) + X на клавиатуре с последующим выбором из появившегося меню пункта «Командная строка (администратор)». Это же меню можно вызывать правым кликом мыши по кнопке «Пуск».

Командная строка от администратора в меню Win+X

Второй способ запуска:

  1. Перейдите на начальный экран Windows 8.1 или 8 (тот, который с плитками).
  2. Начните на клавиатуре набирать «Командная строка». В результате слева откроется поиск.
  3. Когда в списке результатов поиска вы увидите командную строку, кликните по ней правой кнопкой мыши и выберите пункт контекстного меню «Запуск от имени администратора». Командная строка в поиске Windows 8

Вот, пожалуй, и все по этой версии ОС, как видите — все очень просто.

В Windows 7

Чтобы запустить командную строку от имени администратора в Windows 7, проделайте следующие шаги:

  1. Откройте меню Пуск, пройдите в Все программы — Стандартные.
  2. Кликните правой кнопкой мыши по «Командная строка», выберите пункт «Запуск от имени Администратора». Запуск командной строки в Windows 7

Вместо того, чтобы искать во всех программах, вы можете ввести «Командная строка» в поле поиска внизу меню Пуск Windows 7, а потом проделать второй шаг из описанных выше.

Еще один способ, для всех последних версий ОС

Командная строка — это обычная программа Windows (файл cmd.exe) и запустить ее можно как любую другую программу.

Находится она в папках Windows/System32 и Windows/SysWOW64 (для 32-разрядных версий Windows используйте первый вариант), для 64-разрядных — второй.

Файл cmd.exe в Windows

Так же, как и в описанных ранее способах, вы можете просто кликнуть по файлу cmd.exe правой кнопкой мыши и выбрать нужный пункт меню, чтобы запустить его от имени администратора.

Есть и еще одна возможность — вы можете создать ярлык для файла cmd.exe там, где вам нужно, например, на рабочем столе (например, перетащив правой кнопкой мыши на рабочий стол) и сделать так, чтобы он всегда запускался с администраторскими правами:

  1. Кликните правой кнопкой по ярлыку, выберите пункт «Свойства».
  2. В открывшемся окне нажмите кнопку «Дополнительно».
  3. Отметьте в свойствах ярлыка «Запуск от имени администратора». Запуск ярлыка cmd.exe от имени администратора
  4. Нажмите Ок, затем снова Ок.

Готово, теперь при запуске командной строки созданным ярлыком, она всегда будет запускаться от администратора.

  • Home
  • News
  • How Can You Run Command Prompt as Administrator on Windows?

By Stella | Follow |
Last Updated

In some certain situations, you need to run Command Prompt as Administrator and then you can use some command line that requires administrative privileges. But, do you know how to run CMD as administrator on Windows 10? In this post, MiniTool Solution will show you 3 easy methods to do this job.

Why Do You Need to Run CMD as Administrator?

In most instances, you just use the Command Prompt as a regular user. This can meet your basic requirements. In some other cases, you need to run CMD as administrator so as to run command line that needs administrative privileges.

You can use different ways to open the Command Prompt on your computer. Accordingly, you can use numerous ways to run command prompt as administrator.

In the next part, we will walk you through three different guides on the run as administrator command line topic. You can use the one you prefer to use to perform the Windows 10 command prompt admin.

How to Run Command Prompt as Administrator?

Method 1: Use the Power Users (Windows+X) Menu

Windows 10 has a Power Users menu that contains many options that allow you to quickly access some certain utilities. Command Prompt (Admin) is included in it.

To do this job, you need to follow these steps:

  1. Press the Windows key and X key at the same time to open the Power Users menu.
  2. Select the Command Prompt (Admin) option from the menu to run Command Prompt as admin.

select Command Prompt (Admin)

You will see the Administrator: Command Prompt window as follows:

Administrator: Command Prompt

Then, you can type in the command and run it whether it requires administrative privileges or not.

Method 2: Use the Start Menu

The second way to run Command Prompt as administrator is to use the Start Menu. It is very simple to operate. You can follow these steps to do the job:

  1. Press the Start/Windows button on the lower-left corner of your computer.
  2. Type command prompt into the search box.
  3. Right-click on the first search result and select Run as administrator.

select Run as administrator

After these three simple steps, you can also see the Command Prompt Administrator interface.

Method 3: Use the Run Box

Some of you prefer to use the Run box to open applications on the computer. In this situation, you can run CMD as administrator via the Run box like this:

1. Press the Windows key and the R key at the same time to open Run.

2. Type cmd into the Run box.

type cmd into the run box

3. Press Ctrl+Shift+Enter at the same time to run the command as an administrator.

Now, this is the end of these three methods to run CMD as administrator. You can just select one way according to your own requirements.

After running Command Prompt as Administrator on Windows, you can then run certain command lines to solve some issues like mark the offline disk online to fix Error code 0xc000000e, check hard disk drive using CHKDSK, and more.

We hope this post can completely solve your issue.

About The Author

Stella

Position: Columnist

Stella has been working in MiniTool Software as an English Editor for more than 7 years. Her articles mainly cover the fields of data recovery including storage media data recovery and phone data recovery, YouTube videos download, partition management, and video conversions.

A small tip on how to run your command prompt as an administrator or in other words, open an elevated command prompt, in Windows 11/10/8/7. We have seen how to launch Command Prompt, and carry out many tasks. But some tasks required elevated privileges to be run. In such cases, you have to open an elevated command prompt window. So let us see how to launch, run or open Command Prompt as an administrator or an elevated CMD with administrative privileges & rights in Windows 11/10/8/7.

To run Command Prompt as administrator in Windows 11/10, follow these steps:

  1. Search for cmd in the Taskbar search box.
  2. Make sure the Command Prompt result is selected.
  3. Click on the Run as administrator option.
  4. Click the Yes button in the UAC prompt.

To learn more about these steps, continue reading.

At first, you need to search for cmd in the Taskbar search box and ensure that the Command Prompt result is selected or highlighted.

How to run Command Prompt as Administrator in Windows 11/10

If so, click the Run as administrator option. If your computer displays the UAC prompt, click the Yes option to find Command Prompt as administrator.

However, if you are using Windows 10 or Windows 8, you may not have to follow this aforementioned method. In Windows 10/8, you can open elevated Command Prompt from the Win+X menu.

In Windows 10 and Windows 8, follow these steps:

Take the cursor to the bottom left corner and right-click to open the WinX menu. Select Command Prompt (Admin) to open an elevated command prompt.

So you see, things have been made easier in Windows 10/8.1.

In Windows 7, follow these steps:

  • Type cmd in Start search.
  • In the results, you will see ‘cmd‘.
  • Right-click on it and from the context menu select Run as Administrator.

run cmd as admin

TIP: This post will help you if you can’t run Command Prompt as administrator.

Open Elevated Command Prompt using the System32 folder

open elevated command prompt using system32

The System32 folder contains the storage location of the Windows Command Processor (cmd.exe) application. You can access that location and then open an elevated Command Prompt window. Here are the steps:

  1. Press Win+E hotkey to open the File Explorer
  2. Go to C:\Windows\System32
  3. Under the System32 folder, look for the cmd.exe file
  4. Right-click on the cmd.exe file
  5. Click on the Run as administrator option.

In the UAC prompt, you need to use the Yes button, and then an elevated Command Prompt window will be in front of you.

Run Command Prompt as an administrator using the Run Command box

You can also use the Run Command box to open Command Prompt window as an administrator on your Windows 11/10 computer. For this, the steps are as follows:

  1. Use Win+R hotkey. This will open the Run Command box
  2. Type cmd or cmd.exe in the text field
  3. Press Ctrl+Shift+Enter hotkey.

If a UAC prompt appears, press the Yes button, and the Command Prompt window will open as an administrator.

Open Command Prompt as an administrator using PowerShell

Windows PowerShell can also help you open a Command Prompt window as an administrator on a Windows 11/10 PC. The steps are mentioned below:

  1. Open Windows PowerShell using the Search box or another way you like
  2. In the PowerShell window, enter and execute the following command:
start-process cmd -verb runas

This will open the UAC prompt box in which you can click on the Yes button. Finally, an elevated Command Prompt window will be there.

Other ways to open an elevated command prompt:

There are more other ways to open an elevated Command Prompt in Windows 11/10. Some of the ways are:

  1. Press Ctrl+Shift+Esc to open the Task Manager. Click on File menu > Run new task. To open a command prompt window, type cmd. Remember to check the Create this task with administrative privileges check-box. Then hit Enter.
  2. You can also open an elevated Command Prompt from the Task Manager using CTRL key.
  3. Or then simply open the Start Menu or Start Screen and start typing the command line. Next, hold the Shift and Ctrl keys, and then hit Enter to open the command line in an elevated command prompt.
  4. Open an elevated command prompt using CMD
  5. Run Commands from Windows Start Search Box as an Administrator
  6. How to always run Command Prompt as Administrator
  7. Run commands from Explorer address bar.

How do I get Command Prompt in Windows 11/10 as administrator?

There are a lot of ways using which you can open Command Prompt as an administrator in Windows 10 as well as Windows 11 OS. You can use the Search box, Win+X menu, Windows PowerShell, Run Command box, and other options to open an elevated Command Prompt. All such options are covered in this post above. Check them.

How do I force Command Prompt to run as administrator?

You can use the keyboard shortcut to force Command Prompt to run as administrator. For that, you need to search for cmd in the Taskbar search box and press the Ctrl+Shit+Enter button together.

How do I open Command Prompt in Windows 11?

Although Microsoft removed Command Prompt from the Win+X menu in Windows 11, you can use the Taskbar search box to open Command Prompt on your computer. You need to search fox cmd and hit the Enter button. It will open Command Prompt on your PC. Alternatively, you can open Windows Terminal to perform the same job.

How do I run cmd as administrator in standard user?

To run cmd or Command Prompt as administrator in Standard user, you need to follow the steps mentioned above. In other words, you need to search for cmd in the Taskbar search box, click the Run as administrator option, and click the Yes option.

Now see how to open an elevated PowerShell prompt in Windows 11/10.

  • Windows script host ошибка выполнения microsoft vbscript
  • Windows scan app windows 10
  • Windows sdk можно ли удалить
  • Windows run bat from bat
  • Windows restart из командной строки