Contacts

How to open cmd console as administrator. Opening Command Prompt Using a Shortcut

Hello, my curious readers!

Today in our article we will talk about the command line (cmd.exe) in Windows 10. The command line allows you to perform a variety of tasks that are not always possible to perform through GUI. And when working in cmd, elevated rights may often be required. Now we will learn 8 ways how to open cmd with administrator rights in windows 10. This does not mean that in the rest Windows versions these methods will not work. I personally tested all the methods described below to open cmd with administrator privileges on Windows 10 and they are fully working. If you have Windows 7 or 8, then check them on your system.

So, let's go!

1. Launch cmd from the Start context menu

Click on Start with the right mouse button or press the combination Win+X, and the keys are faster, I guarantee it;) A context menu will appear in which we select the item Command Line (Administrator). Ready!

2. Via task manager

If you have Task Manager running, you can open cmd directly from it. To do this, go to the menu File -> Start a new task.

Enter cmd and check the box just below Create a task with administrator rights. And then OK.

3. Through the task manager (the tricky way)

The third method is very similar to the second, but a little faster and not so well known.

The beginning is the same, that is, in the Task Manager we select File -> Run a new task, but when you click on this item, hold down the key Ctrl. In this case, cmd is immediately launched in administrator mode, without unnecessary conversations.

4. Launch cmd from Windows 10 search

Press the Win+S combination or aim with the left mouse button at the magnifying glass icon to the right of the Start button. In the search field you can enter either in English ‘ cmd‘ or in Russian enter the first 5-6 letters of the name ‘ Command line‘. Then right-click on the search result and select Run as administrator.

5. Launch cmd from the All applications menu

Open Start, click on All applications and look for System - Windows. It's usually hidden at the very bottom, so scroll your mouse wheel all the way down.

So, we found the System tools group, opened the list of programs inside and found the Command Prompt. Right-click on it, then Advanced, then Run as administrator.

6. Run from the Windows\System32 system directory

You can launch the command prompt directly from its native system32 folder. To do this, go to Explorer / My Computer, find drive C, look for Windows folder, go there, find the System32 folder, go deeper and deeper into the rabbit hole and go into it. In the System32 folder we look for the file cmd.exe. Let's highlight it. And here two options appear.

The fastest and easiest: right-click on cmd.exe and select the one we already know Run as administrator.

The other option takes a little longer. When you select a file, Application Tools appears at the top. Click there with the left mouse button, another menu appears at the bottom, click on Run as administrator.

7. Launch cmd from any Explorer folder

This opening option command line accessible from any folder in Windows 10 Explorer. Go to the location you need, go to the File menu -> Open Command Prompt -> Open command prompt as administrator.

8. Create an admin shortcut for cmd.exe

For quick access To the admin command line we will do the following.

On an empty space on the desktop, right-click and select New -> Shortcut.

Enter cmd or cmd.exe, both options will work. Further.

Name the shortcut so that it is immediately clear, for example, cmd.exe (admin). Ready.

The shortcut has been created but not yet configured. Go to its properties (right-click on the shortcut and select Properties). Click the More... button

... and check the Run as administrator box. We save this whole thing and now we can always launch the cmd command line with administrator rights by simply launching the shortcut.

But you can speed up the launch even more ;)

Right-click the shortcut and select Pin to taskbar. Or Pin to home screen as an option.

I have described here exactly those options that allow you to launch the command line with admin privileges. There are other launch methods, but they are on behalf of regular user, which does not fit into the topic of this article. For example, via Win+R or hold Shift when right-clicking on an application.

As you can see, the same action in Windows can be performed in different ways. Depending on the current specific situation, I can choose the most appropriate cmd launch option.

Were you familiar with all these methods? Or were some of them new?) Tell us in the comments.

To perform many of the commands that are mentioned in various articles, you must be able to open the Command Prompt as an administrator. In this short article you can familiarize yourself with several ways how this can be done in the Windows 7 operating system.

Opening the Command Prompt via the Start Menu

If you want to open the Command Prompt in Windows 7, the easiest way to do this is to use the Start menu. Open the Start menu and go to All Programs. Here you need to open “Standard”, where the command line shortcut is located. Simply by clicking on the “Command Prompt” icon, you will open it in normal mode, without administrator rights.

If you need to open the command line as an administrator, then right-click on the icon and select “Run as administrator” from the menu that appears.

After this, a warning from User Account Control will appear. To confirm opening the command prompt as an administrator, click on the “Yes” button.

As a result, a command line will appear in front of you. In order to make sure that it is opened as an administrator, pay attention to the window title. It should say "Administrator". Also, the “system32” folder should be open on the command line.

In addition to the All Programs menu, you can use Search, which is located at the bottom of the Start menu, to open the Command Prompt. Enter search query“Command line” and the system itself will offer you the desired shortcut.

Right-clicking also works in search results. With it, you can open the command prompt as an administrator.

In addition, in search bar Some commands also work. For example, you can open the command prompt using the "CMD" command.

Opening the Command Prompt via the Run menu

This is a small window that can be called up using the Windows + R key combination. Using this window, you can quickly execute various commands. For example, if you need to open a command prompt, you can press Windows+R and enter the command “CMD”.

As a result, a command prompt will open in front of you. Unfortunately, this way you can only open the Command Prompt in normal mode, without administrator rights.

Opening Command Prompt Using a Shortcut

If you regularly need to open the command line, the easiest way is to make a shortcut on your desktop. To do this, right-click on the desktop and select the menu item “Create – Shortcut”.

After this, you need to enter the “CMD” command, which is responsible for opening the command line, click on the “Next” button and confirm the creation of the shortcut by clicking on the “Finish” button.

As a result, a shortcut will appear on your desktop with which you can quickly open the command line at any time.

If necessary, you can right-click on the shortcut and open a command prompt as administrator.

If you want the shortcut to always be opened as an administrator, then you need to right-click on it and go to “Properties”. There, on the “Shortcut” tab, you need to click on the “Advanced” button.

After this, a window will open in which you need to enable the “Run as administrator” function.

After enabling this function, close all windows using the “Ok” button. Now, using this shortcut, the command prompt will always open as administrator.

Often a situation arises when you need to run cmd with administrator rights. However, this is not so easy to do for an untrained user. The whole problem is that by default, cmd is launched as the current user; to run as an administrator, you either need to log into the system under the admin username, or do some trick.

There is a certain nuance that needs to be done before running the command line as an administrator. You need to check whether the administrator account is enabled, if it is enabled, assign a password to it. Now let's take a closer look.

First, you need to check whether your administrator account is enabled. To do this, open “ Computer management

go to the item “ Local users and groups” — “Users“. As you can see, in my case the account “ Administrator” is disabled (there is an arrow on the icon).

Double click to open properties account and uncheck the “ Disable account

Click “ OK“. The arrow from the admin account icon has disappeared, which means it is enabled. Now let's set a password. To do this, right-click on the account “ Administrator” and select the menu item “ Set password...

On the password change warning, click “ Continue” and enter the password twice

Ready! You now have an administrator account and know the password for it. Let's move on to the next stage.

Launch CMD with administrator rights

Open the command line by clicking “ Start” — “Execute“, or keyboard shortcut “ Win+R” and enter the command cmd. In the window that opens, write the following:

runas /profile /user:mymachine\Administrator cmd

(Where mymachine– this is the name of your computer)

and press Enter. The Command Prompt will ask you for an administrator password, enter it and wait for Command Prompt to launch with administrator rights. Everything would be fine, but after entering I got an error:

This error can appear in two cases. The first is that you entered the wrong password. Second, I have never logged in under an administrator account (my version).

You need to log out and log in as an administrator, so that's what I did

You can now log out and log in again using your account. Once you are logged in with your account, try running cmd again as an administrator.

And voila! A second command prompt window opened under the administrator account. Now you can browse directories, and even run applications as an administrator.

In Windows 8, as in previous versions Windows, a number of system administration and management tasks are performed through the command line interface ( cmd.exe). However, as in previous versions of Windows, a number of similar tasks require administrator rights to be performed. In this article we will talk about how open command prompt with. Due to the fact that Microsoft has slightly redesigned the interface of this operating system, this procedure will be slightly different from the one we are used to in Windows 7 (there is no menu Start). The problem is that when you right-click on a program shortcut on start screen Metro, menu " Runasadministrator" does not appear.

In Windows 8, you can launch the Command Prompt using administrator rights in several ways:

  1. From the start screen
  2. From the Explorer menu
  3. Using Task Manager
  4. Using the Win+X menu

Let's describe each of these methods of opening a command line with admin rights in Win8 in more detail.

Open the command line from the Metro UI interface

In the “Search” line of the Windows 8 Metro UI interface, you need to type cmd" (or "command prompt ”) , As a result, the found application will be displayed in the left panel. Then you need to right-click on the shortcut that appears and a line with additional launch options will appear at the bottom of the screen. Select “Run as administrator”

The same thing can be done by highlighting the found application and pressing the combination on the keyboard Ctrl + Shift + Enter.

Run Command Prompt from Explorer

Open the window Windows Explorer Explorer by pressing a keyboard shortcut Win+E. In the left window, select an element My computer, and on the right is a disk C:\. Then in top menu select File->Opencommandprompt ->Opencommandpromptasadministrator (Open command prompt as administrator).

Run Command Prompt from Task Manager

Open Windows 8 Task Manager by pressing the keyboard shortcut Ctrl + Shift + Esc. Then you need to create a new task by selecting the menu item “File -> Run new task”(“File -> New Task (Run)”), type in the window that appears cmd, check the box « Run a task with Administrator privileges "("Create this task with administrative privileges.") and click OK.

Launch from the Win+X shortcut menu

You can also open an elevated Command Prompt window using the Quick Launch menu by clicking on the Start screen. Win+X. In the menu that appears, select “Command Prompt (Admin)”.

Here are some ways to launch the command line with administrator rights in Windows 8 that we were able to discover. Suggest your options in the comments :)

Most operating room users Windows systems We are used to launching the desired application or game by double-clicking on a shortcut located on the desktop, or by finding it in Start. Alternatively, you can open the folder in which it is installed and run the exe file from there.

Since launching applications this way may not always be suitable, in this article let's look at a few in various ways, using which you can run the program from the command line.

Method 1: launch the system application

In order to run one of the following from the console system applications The “start” command is used and the desired name is indicated separated by a space. You need to enter the system name as the name. For Explorer - this is explorer, task manager - taskmgr, control panel - control, system configuration - msconfig.

To open a notepad, write notepad, Windows Media Player - wmplayer, Paint - mspaint, character table - charmap. If you type cmd , a new command prompt window will open.

For example, let's open the symbol table. Type in the line:

and press "Enter".

Method 2: specifying the full path to the file

If you need to run any other installed application, then you should specify the full path to the program executable file.

For example, in my Downloads folder there is a program for installing Film Studio, let's open it. I go into the folder and click on the field where the path is written. This entire line needs to be written on the command line (since copy-paste does not work there) and at the end add the name of the utility that we want to run.

The console will write:

c:\users\master\downloads\wlsetup-all

After pressing “Enter”, preparations for installing the Film Studio began. As you can see, when writing the path it is not necessary to use capital letters; you can only enter small ones.

If on the way to the required file there will be spaces, then a window will appear telling you what to find specified file does not work. The thing is that the command line recognizes the path up to the first space, and not the entire line you entered. In the example, it decided that I wanted to open c:\program .

Now let's move a little away from the topic and look at how to find out the full path to the program that we want to run.

To do this, find the executable file through the Explorer window desired application. To understand that this is it, make sure that “Application” is indicated opposite it in the “Type” field. Then click on the field at the top - this is the path.

For example, Total Commander is launched by the file “totalcmd”, and it is located along the path: "c:\program files\total commander".

Or another option. If there is a shortcut to the desired application on the desktop, you don’t have to search for it through Explorer. Just right-click on it and select "File location".

The window we have already looked at will open. It will highlight the file that launches the utility, and at the top you can find out the path to it.

Method 3: using path

Using this command, we will save the path to the folder in which the executable file is located, and then run it.

Let's consider the same Total Commander. In the console we write:

path c:\program files\total commander

Be sure to include a space after “path”. It is along this path that the “totalcmd” file we need is located. Press "Enter".

The specified program will be launched. It is not necessary to specify the extension at the end. Thus, you can run any executable file in the specified folder.

Method 4: using the cd command

This command will open the specified folder, and from it we will launch the file we need. For example, let's go to the TeamViewer folder:

cd c:\program files\teamviewer

After "cd" put a space. Press "Enter".

This folder contains the file that launches TeamViewer; it has the same name. So next I enter:

I press “Enter” and the utility starts.

If you need to open an application that is not installed on system disk, then you can use the path command. If I type:

path d:\program files\ccleaner

(after entering each line, press “Enter”), then CCleaner will open. It is installed in the specified path on drive D:.

But this cannot be done using the cd command.

Method 5: through the context menu

To do this, find the folder in which the executable file is stored and right-click on it, while holding down the Shift key. Next in context menu select "Open command window".

After this, the folder we need will immediately open in the command line. Enter the name of the file that runs the utility in the line and press Enter. We launched CCleaner, which is not located on the system drive (I have D:).

If you need to run a program that is installed in the same place as operating system, the actions are the same. Let's open the browser Google Chrome. We find the folder in which the file is stored that launches it, and select the item mentioned above.

Then enter the name of the file with the extension .*exe: chrome, and press “Enter”. The browser will be launched.

Method 6: path in quotes

At the beginning, I mentioned that if there are spaces in the specified path, the file will not open. But if you write it in quotes, the console will understand everything. Quotes must be double and straight, not commas. They are placed using the combination “Shift+E” with the selected English layout keyboards.

In them you need to write the full path and at the end indicate the file itself with the extension that will be launched:

"c:\program files\total commander\totalcmd.exe"

Did you like the article? Share it