Windows run cmd exe as administrator

Содержание
  1. 8 способов открыть cmd от имени администратора в Windows 10
  2. 1. Запуск cmd из контекстного меню Пуска
  3. 2. Через диспетчер задач
  4. 3. Через диспетчер задач (хитрый способ)
  5. 4. Запуск cmd из поиска Windows 10
  6. 5. Запускаем cmd из меню Все приложения
  7. 6. Запуск из системного каталога Windows\System32
  8. 7. Запуск cmd из любой папки Проводника
  9. 8. Создаем админский ярлык для cmd.exe
  10. How to Run Command Prompt as Admin
  11. Contents
  12. Via List of programs
  13. Via Quick links menu
  14. Via Task Manager (quick)
  15. Via Task Manager (standard)
  16. Via Run menu
  17. Via Windows 10 Search
  18. From Windows folder
  19. Via PowerShell
  20. How do you run a command as an administrator from the Windows command line?
  21. 8 Answers 8
  22. Caveat: Enable the admin account
  23. 13 ways to use “Run as administrator” in Windows 10
  24. First things first: About UAC and Run as administrator
  25. 1. Run a program as admin from the contextual menu of its Start Menu shortcut or tile
  26. 2. Run as administrator using “Ctrl + Shift + Click” on its Start Menu shortcut or tile
  27. 3. Run a program as administrator from its desktop shortcut
  28. 4. Run a desktop app as administrator from its taskbar shortcut
  29. 5. Run a program as administrator from its right-click menu
  30. 6. Use “Run as administrator” from File Explorer’s ribbon
  31. 7. Run a desktop app as admin from the Search window
  32. 8. Run a program as administrator using “Ctrl + Shift + Enter” on its taskbar search result
  33. 9. Run a program as administrator from the Run window
  34. 10. Run as admin from the Task Manager
  35. 11. Run a desktop app as admin using the RunAs command in Command Prompt (CMD) or PowerShell
  36. 12. Always run a program with administrator permissions
  37. 13. Run a program with administrator permissions and without a UAC prompt
  38. Which method(s) do you plan to use?

8 способов открыть cmd от имени администратора в Windows 10

Здравствуйте, мои любознательные читатели!

Сегодня у нас в статье пойдет речь о командной строке (cmd.exe) в Windows 10. Командная строка позволяет выполнять разнообразные задачи, которые не всегда возможно выполнить через графический интерфейс. И при работе в cmd часто могут требоваться повышенные права. Сейчас мы с вами узнаем 8 способов, как открыть cmd с правами администратора в Windows 10. Это не значит, что в остальных версиях Windows эти методы не сработают. Все нижеописанные способы открыть cmd с привилегиями администратора я проверял лично на Windows 10 и они полностью рабочие. Если у вас Windows 7 или 8, то проверяйте их на своей системе.

1. Запуск cmd из контекстного меню Пуска

Нажмите на Пуск правой кнопкой мыши или нажмите комбинацию Win+X, причем клавишами быстрее, я гарантирую это;) Появится контекстное меню, в котором выбираем пункт Командная строка (администратор). Готово!

2. Через диспетчер задач

Если у вас запущен Диспетчер задач, то можно открыть cmd прямо из него. Для этого зайдем в меню Файл -> Запустить новую задачу.

Вводим cmd и ставим галочку чуть ниже Создать задачу с правами администратора. И затем ОК.

3. Через диспетчер задач (хитрый способ)

Третий способ очень похож на второй, но чуть более быстрый и не такой известный.

Начало такое же, то есть, в Диспетчере задач выбираем Файл -> Запустить новую задачу, но когда кликаете мышкой по этому пункту — удерживайте клавишу Ctrl. В этом случае сразу запускается cmd в режиме администратора, без лишних разговоров.

4. Запуск cmd из поиска Windows 10

Нажмите комбинацию Win+S либо прицельтесь левой кнопкой мышки в значок лупы справа от кнопки Пуск. В поле поиска можно ввести либо на английском ‘cmd‘ либо на русском введите первые 5-6 букв от названия ‘Командная строка‘. Затем правой кнопкой мыши нажимаем на результате поиска, выбираем Запустить от имени администратора.

5. Запускаем cmd из меню Все приложения

Открываем Пуск, кликаем на Все приложения и отыскиваем пункт Служебные — Windows. Обычно он прячется в самом низу, так что промотайте колесиком мышки до самого конца.

Итак, нашли группу Служебные, раскрыли список программ внутри и обнаружили Командную строку. Правой кнопкой по ней кликаем, затем Дополнительно, потом Запуск от имени администратора.

6. Запуск из системного каталога Windows\System32

Можно запустить командную строку прямо из ее родной папки system32. Для этого заходим в Проводник / Мой компьютер, находим диск C, ищем папку Windows, идём туда, находим папку System32, углубляемся все дальше и дальше в кроличью нору заходим в неё. В папке System32 ищем файл cmd.exe. Выделяем его. И тут появляется два варианта.

Самый быстрый и простой: правой кнопкой мышки кликаем на cmd.exe и выбираем уже знакомый нам Запуск от имени администратора.

Другой вариант чуть больше времени занимает. При выделении файла сверху возникает надпись Средства работы с приложениями. Нажимаете туда левой кнопкой мыши, снизу вылезает еще одно меню, нажимаете на пункт Запустить от имени администратора.

7. Запуск cmd из любой папки Проводника

Этот вариант открытия командной строки доступен из любой папки Проводника Windows 10. Заходите в нужное вам место, заходите в меню Файл -> Открыть командную строку -> Открыть командную строку как администратор.

8. Создаем админский ярлык для cmd.exe

Для быстрого доступа к админской командной строке сделаем следующее.

На рабочем столе на свободном месте кликаем правой кнопкой, выбираем Создать -> Ярлык.

Вводим cmd или cmd.exe, оба вариант будут работать. Далее.

Назовите ярлык так, чтобы сразу было понятно, например, cmd.exe (admin). Готово.

Ярлык создан, но еще не настроен. Заходим в его свойства (правой кнопкой на ярлыке и выбрать Свойства). Нажимаем кнопку Дополнительно…

… и ставим галочку Запуск от имени администратора. Сохраняем все это дело и теперь мы всегда сможем запустить командную строку cmd с правами администратора простым запуском ярлыка.

Но можно еще больше ускорить запуск;)

Нажмите правой кнопкой на ярлыке и выберите пункт Закрепить на панели задач. Или Закрепить на начальном экране как вариант.

Читайте также:  Docker desktop windows containers

P.S.: В комментариях указали еще один метод запуска командной строки с админскими правами. Нажимаем WIN+R, вводим cmd и нажимаем комбинацию клавиш Ctrl+Shift+Enter. И вуаля.

Есть еще способы запуска, но они от имени обычного пользователя, что не вписывается в тему этой статьи. Например, через Win+R или удерживать Shift при клике правой кнопкой мыши на приложении.

Как видите, одно и то же действие в Windows можно выполнить различными способами. В зависимости от текущей конкретной ситуации я могу выбирать наиболее подходящий вариант запуска cmd.

А вам все эти методы были знакомы? Или какая-то часть из них оказалась в новинку?) Расскажите в комментариях.

How to Run Command Prompt as Admin

This basic guide details 8 ways how to run a command prompt as an administrator on Windows.

Contents

💡 On Windows 10, 8.1, 8 – instead of the command prompt, you can use PowerShell, which supports all cmd.exe commands.

Via List of programs

Run the command prompt as admin from the list of standard Windows programs.

💡 Suitable: Windows 10, Windows 8.

  1. Open the Start menu (Ctrl + ESC);
  2. Open the Windows System;
  3. Right-click Command PromptMoreRun as administrator.

Run the Command prompt as administrator from the Start menu

We enable the ability to run the command prompt as administrator on the menu on the Start button.

💡 Suitable: Windows 10, Windows 8.

  1. Right-click on the Taskbar, select – Taskbar settings;
  2. Disable the Replace Command Prompt with Windows PowerShell in the menu…;
  3. Right-click on the Start button (Windows + X), select Command Prompt (Admin).

Run the Command prompt as administrator via Quick links

Via Task Manager (quick)

Running a Command Prompt as administrator via the Windows Task Manager (quick way).

💡 Suitable: Windows 10, Windows 8, Windows 7.

  1. Call Task Manager (Ctrl+Shift+ESC);
  2. Click on the File;
  3. Hold down the Ctrl key and click Run New Task.

Run the Command prompt as administrator via Task manager

Via Task Manager (standard)

Running the Command Prompt as administrator via the Windows Task Manager (standard way).

💡 Suitable: Windows 10, Windows 8, Windows 7.

  1. Call Task Manager (Ctrl+Shift+ESC);
  2. Click on the File;
  3. Click Run New Task;
  4. Select the Create this task with administrative privileges check box;
  5. Type cmd and click OK.

Via Run menu

💡 Suitable: Windows 10, 8.1, 7.

Open the Run menu.

  1. Press the Windows+R key combination (or right-click on the Start button, select Run);
  2. Enter the cmd command;
  3. Press the keyboard shortcut Ctrl+Shift+Enter.

Run the Command Prompt as administrator via Windows 10 Search.

💡 Suitable: Windows 10.

  1. Press the combination Windows+S (or right-click the Start button, select Search);
  2. In the search bar write the command prompt (the result will be displayed earlier than you type completely);
  3. In the right part of the window, select Run as administrator.

From Windows folder

Running cmd.exe from the utility location folder is another way to run the command prompt as administrator.

💡 Suitable: for all versions of Windows.

  1. Open the System32 folder to the Windows folder (usually C:\Windows\System32);
  2. Right-click on the cmd file and select Run as administrator.

Via PowerShell

Another way to run Command Prompt as administrator is from PowerShell.

Run the command in the PowerShell console:

🟢 This article discussed how to run Command Prompt as admin Windows. I hope you were able to run the Command Prompt as as administrator with the chosen method. However, if you encounter any problems when starting the command prompt, feel free to write in the comments. I will try to help.

How do you run a command as an administrator from the Windows command line?

I have a small script that performs the build and install process on Windows for a Bazaar repository I’m managing. I’m trying to run the script with elevated, administrative privileges from within the Windows shell (cmd.exe)—just as if I’d right-clicked it and chosen Run as Administrator, but without using any method that requires use of the graphical interface.

8 Answers 8

A batch/WSH hybrid is able to call ShellExecute to display the UAC elevation dialog.

Press the start button. In the search box type «cmd», then press Ctrl + Shift + Enter

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

In my case, this was

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.

13 ways to use “Run as administrator” in Windows 10

In Windows 10, knowing how to run programs as administrator is very important. By default, apps and games in Windows 10 run without administrator permissions, to prevent unauthorized changes to your system. However, there are times when some programs require administrator permissions to work properly or to run specific commands. Windows 10 offers you the ability to run programs as admin without having to disable anything. Here are all the methods to use “Run as administrator” on any desktop app in Windows 10:

Читайте также:  Windows 10 контрастный режим как отключить

First things first: About UAC and Run as administrator

In early versions of Windows, applications had system-wide privileges, which was a security risk. All of Microsoft’s operating systems from Windows Vista onward, including Windows 10, include UAC or User Account Control, a security feature that prevents unauthorized changes to the operating system. Trying to run an application as administrator is one of the changes that require administrative privileges. Before the selected program is launched, a UAC prompt is triggered, asking for permission. If you run the application from an account without administrator permissions, the UAC prompt asks you to enter an administrator password. Without the admin password, the program does not launch.

In Windows 10, you can only run a program with administrator permissions if it is a desktop app. Some of these applications, like security software, cannot run correctly without having administrative permissions. Windows apps that are installed from the Microsoft Store cannot be run with administrative privileges in Windows 10. Furthermore, they have the same level of permissions as a normal user account, so they are not allowed to make changes to advanced system settings or the Windows Registry.

You can learn more about the difference between desktop apps and UWP apps and figure out which ones you can “Run as administrator” by reading What is a Windows app? How is it different from a desktop app or a program?.

1. Run a program as admin from the contextual menu of its Start Menu shortcut or tile

In Windows 10, you can launch a program with administrative permissions by using the contextual menu of its Start Menu shortcut. First, open the Start Menu. Then, find the shortcut of the program you want to launch in the All apps list, and right-click or press-and-hold on it to open a contextual menu. Click, tap, or hover over the More option, and then click or tap on “Run as administrator.

If you have a tile for your desktop app available in the Start Menu, right-click or press-and-hold on it to open a contextual menu. Access More and then click or tap on “Run as administrator.

2. Run as administrator using “Ctrl + Shift + Click” on its Start Menu shortcut or tile

Open the Start Menu and locate the shortcut of the program you want to launch as administrator. Hold down both the Ctrl and the Shift keys on your keyboard and then click or tap on that program’s shortcut.

You can also use the “Ctrl + Shift + Click/Tap” shortcut on an app’s Start Menu tile to run it with administrator permissions in Windows 10.

During our tests, this method did not work every time, so if that is the case for you, either try again or consider running the app as administrator another way.

3. Run a program as administrator from its desktop shortcut

Find the desktop shortcut for the program you want to run as admin or create one yourself. Then, right-click or press-and-hold on it to open a contextual menu. Click or tap on the “Run as administrator” option.

4. Run a desktop app as administrator from its taskbar shortcut

In Windows 10, you can also run a desktop app with administrator permissions from its taskbar shortcut. Right-click or press-and-hold on the shortcut, and then right-click or press-and-hold again on the program’s name. Then, from the menu that opens, choose “Run as administrator.”

You can also use the “Ctrl + Shift + Click/Tap” shortcut on an app’s taskbar shortcut to run it with administrator permissions in Windows 10.

5. Run a program as administrator from its right-click menu

Although easier to find, shortcuts are not the only way to run a program as administrator in Windows 10. You can perform the same action from the main executable file’s contextual menu.

Open File Explorer and find the desktop app’s executable. Right-click or press-and-hold on it to open the contextual menu, and then click or tap on “Run as administrator.

6. Use “Run as administrator” from File Explorer’s ribbon

Find the program’s main executable in File Explorer. Select it, and then click or tap on the Manage tab from the ribbon.

The option you need is displayed in the Run section of Application Tools. Click or tap on the upper half of the “Run as administrator” button to give the selected app admin permissions.

As an alternative, you can also press the lower half of the “Run as administrator” button and then click or tap on the “Run as administrator” option from the drop-down menu.

In the taskbar search field, type in the name of the program that needs to run with administrator permissions. Then, click or tap on the “Run as administrator” option displayed on the right side of the Search window.

Obviously, when you see the UAC prompt asking for permission to run the app as admin, click or tap Yes.

8. Run a program as administrator using “Ctrl + Shift + Enter” on its taskbar search result

Type the name of the program in your taskbar’s search field. If there are multiple results, use the arrow keys on your keyboard to highlight the program you want to run as administrator. Then, simultaneously press the Ctrl + Shift + Enter keys on your keyboard.

Читайте также:  Windows start error handle

9. Run a program as administrator from the Run window

Open the Run window and type in the name of the executable for the program you want to run as administrator. Then hold down the Ctrl and Shift keys on your keyboard and click or tap on OK.

Alternatively, after typing in the name of the program’s main executable, press the Ctrl + Shift + Enter keys on your keyboard at the same time.

10. Run as admin from the Task Manager

Another way to launch a program as administrator in Windows 10 is to start it using the Task Manager. To begin, open the Task Manager. Then, if it opens up in its compact view, click or tap on the More details button.

In the expanded Task Manager, open the File menu and click or tap on “Run new task.

This opens the “Create new task” window. You can use its Open field to enter the path to the program you want to launch as administrator, or you can click or tap on Browse to navigate to it. Then, make sure to check the “Create this task with administrative privileges.” option and click or tap on OK.

TIP: An advantage of using this method to launch programs as administrator is that you skip the UAC part of the process. That is because the app automatically inherits the permissions of the Task Manager – in our case, administrator permissions – so all you have to do is check the box to enable the option, as seen above. The option is missing if you only have standard user permissions on the device.

11. Run a desktop app as admin using the RunAs command in Command Prompt (CMD) or PowerShell

If the command line is your favorite way of asking your computer to do what you want, you can also access Command Prompt or PowerShell to run a program as administrator. Enter the following command in the CMD or PowerShell window, adjusting it to fit your needs:

runas /user:”your_computer_name\administrator_name”C:\path\program.exe

Replace your_computer_name with your computer’s name, administrator_name with the name of a user account that is an administrator on your system, and C:\path\program.exe with the complete path to the program that you want to run as administrator.

As seen in the image below, if you enter the command correctly, you are also asked to enter the administrator’s password. Then, press Enter on your keyboard once again.

TIP: Using this method to launch programs as administrators, you skip the UAC part of the process.

12. Always run a program with administrator permissions

To avoid constantly having to use the methods illustrated above on desktop apps accessed on a regular basis, you can set a program to always run with administrator permissions.

First, open File Explorer and find the main executable of the program you want to run. Right-click or press and hold on it to open the contextual menu. Then, click or tap on Properties.

In the Properties window, go to the Compatibility tab. At the bottom of the window, check the box next to the “Run this program as an administrator” option, and then click or tap on Apply or OK.

This setting is applied, and, from now on, the program always runs with administrator permissions. Follow the same steps if you want to disable the option. You can also edit the Properties of a program’s shortcut to avoid tampering with its main executable. To begin, right-click or press-and-hold on a program’s shortcut to access its contextual menu, and click or tap on Properties.

Then, in the shortcut’s Properties window, select the Shortcut tab. Click or tap on the Advanced button to open Advanced Properties.

In the Advanced Properties window, check the box next to “Run as administrator” and then click or tap OK.

Finally, you are returned to the Properties window, where you have to click or tap on OK or Apply, and you are done.

The settings are applied, and your program works with administrative permissions as long as you open it using the same shortcut. When you use the methods in this section, the UAC prompts you as soon as you try to launch the app.

13. Run a program with administrator permissions and without a UAC prompt

Using the Task Scheduler, you can run a program as administrator without being prompted by the UAC (User Account Control) every time. It is simple, and you don’t have to disable UAC, thus compromising Windows 10’s security. We put together a detailed step by step guide to help you: Use the Windows Task Scheduler to run apps without UAC prompts and admin rights.

Which method(s) do you plan to use?

In Windows 10, there are fewer apps that need to run with administrator permissions than in older versions of Windows. However, a few legitimate programs still require elevated privileges. The main thing to remember is that even if you are logged in with an administrator account, you regularly run apps as a standard user. This means that if you need to run a program that requires administrator permissions, you can just use one of the methods described above and then approve it in the UAC prompt. Which of the method(s) illustrated do you plan to use? Did you already use some of them? Let us know in a comment.

Оцените статью