How to open cmd as administrator. Run command line (cmd) with administrator rights. Open CMD from windows system folder

💖 Like it? Share the link with your friends

Hello friends! Are you looking for how to run command prompt as administrator? Looking for a simple and working method?! I think you have come to the right place. Ask why, but the fact is that I just decided to write an instruction on how, without any problems, the user could independently launch cmd as an administrator.

The idea of ​​writing the material was a question from a good friend. Of course, I told him how to do it better. A few days passed, and I thought, why not write an instruction so that any user can easily run cmd as an admin and execute the necessary commands in it.

I will try to tell in a simple, accessible language all possible ways to start command line in windows 7. And, believe me, there are quite a few of them. Eat simple ways, is a little more complicated. All methods are arranged in ascending order. That will make it much easier to choose the right and suitable in your case.

Ideally, you don't have to use all listed methods, take a couple and go. It would be enough. My advice to you, run your eyes through all the ways, for general development, and suddenly it will come in handy. There is a situation when it is convenient for the user to start from the shortcut of the desktop, rather than looking in the OS. Choose only for you.

Why you need to run commands as administrator

From time to time we have to run cmd in windows with administrator rights or in other words privileged window. By default, this window opens with limited functionality and some commands cannot be executed, that is, no changes can be made.

This was done for a reason, it's a kind of protection operating system, because some commands affect the boot and the normal operation of Windows.

The situations are different, and the needs are different, there are situations when the execution of a particular command requires to be done on the command line, and not just like that, but so that you have administrator rights. To make changes.

Note: Be careful when executing commands, as changes are made directly to the OS. And it can disrupt its performance! If you do not know what this command is responsible for, do not execute it with admin rights.

Because running cmd in all versions windows different, we are with you and consider in more detail several ways.

Rushed)

Starting with search

This method will work in windows 7 and windows vista operating systems, since they are the only versions of windows that support searching in the start menu.

Right-click on the icon and select from the context menu

As a result, a command prompt window should open with the title - "Administrator: Command Prompt or Administrator: C:\Windows\System32\cmd.exe"

Open Command Prompt with Start Menu

This method is most likely a double of the first method, a slightly different launch location, but as a launch method it has a place to be and I also decided to talk about it.

We open "Start > All Programs > Accessories" are looking for "Command line"

Right-click and select from the context menu "Run as administrator"

As a result, we get the opened privileged window for entering commands.

Open CMD from windows system folder

The command line can be run as regular program in windows, this means that we can find the startup file in the system folder and run from there.

Define and search for a file cmd.exe in the corresponding folder:

For windows 32 bit cmd.exe is located: \Windows\System32

For windows 64 bit cmd.exe is located: \Windows\SysWOW64

Note: Command line, namely the startup file inWindowsx64 is also insystem32 and inSysWOW64. So you can run it from any folder, the main thing is on behalf of the admin.

Once you find it, right-click on the file and select the item from the menu "Run as administrator"

That's all.

Command Prompt in Administrator Mode Using Task Manager

You can use the launch method just as easily as the previous ones, to do this, press on the keyboard Ctrl+Alt+Del and select start task manager, in the window that opens, select File - New Task

In the line, type cmd then check the Create task with administrator rights checkbox. Click OK. The command line will start which will be with privileged rights, or in other words, administrator rights. With which you can make changes to the system.

For a way to start from the task manager, you can also use a simplified launch, in which you do not need to type anything, just open the task manager, then press and hold the key on the keyboard ctrl click File - New Task (Run....) after which the command prompt will open with administrator rights.

Create a command line shortcut on the desktop

And in the end, as a bonus, I decided to tell interesting way, in terms of implementation. And maybe not with the implementation, but with the availability of the launch method. In order to create a cmd shortcut on the desktop and always run with administrator rights in the future.

Right-click in an empty area on the desktop, in the context menu select Create > Shortcut

In the next window, you need to specify a name for the created shortcut, in my case, I specified Command Prompt (Admin), and press Ready. But that's not all, you need to set the value to run, in our case with administrator rights.

Right-click on the newly created shortcut, select Properties. Click on the button in the window Additionally which is located below. And check the box Run as administrator, Next, click 2 times on the OK button and try to run.

A cmd window with administrator privileges will open. What you will see in the title of the window. This method will be useful if you often use the command line and make changes to the system.

P.S. Let's sum up what has been done. As a result, we get 5 easy ways to run the command prompt with administrator rights. All methods are completely working and applicable, so you can choose the one that suits you and use it, plus you can tell your friends and relatives, anyone. It's just that some do not know what the command line is and how it starts.

If you know more ways to run cmd with admin rights, write in the comments or through feedback, we will add the article useful information. And also leave your comments and suggestions on the article. Always Glade.

    Command Run AS is used to run the application under a user account whose name is passed as a command line parameter. In Windows 7 and later, this command, with standard security settings, does not allow you to get administrator privileges, as it happens in the "Run as Administrator" mode. To run the application as an administrator, you will need to perform some system settings. Universal way running applications and batch files as an administrator without prompting the UAC system using the standard Task Scheduler is described in the article

RUNAS command line format:

RUNAS [ ] /user:program username

RUNAS [ ] /smartcard program

RUNAS /trustlevel: program trust level

Command line options:

/noprofile- Do not load user profile. This results in faster application loading, but may cause some applications to not work properly.

/profile- Download user profile. This option is set by default.

/env- Use the current environment settings.

/netonly- Credentials are for remote access only.

/savecred- Use credentials saved by the user. This option is not available on Windows 7 Home or Windows 7 Starter editions and will be ignored.

/smartcard- A smart card is used to provide credentials.

/user- username must be in the form [email protected] or DOMAIN\USER

/showtrustlevels- Display a list of trust levels that can be used as arguments to the /trustlevel option.

/trustlevel- The value "trust level" must be listed in the list of trust levels.

program- Command line for EXE. See examples below.

Examples:

runas /user:mymachine\administrator cmd.exe- run the cmd.exe command interpreter as the "administrator" user on the "mymachine" computer. When executing the command, the password of the user on behalf of which the task should be performed will be requested.

runas /noprofile /env /user:mydomain\admin "mmc %windir%\system32\diskmgmt.msc"- run the mmc console with the "Disk Management" snap-in as the "admin" user in the "mydomain" domain. The user profile is not loaded and the current environment variables are used. Loading a user profile is only necessary when a task will be performed that requires any data from it. If the parameter "/env" is set then environment variables are inherited from the current user's environment.

runas /savecred /user: [email protected] regedit.exe- run the registry editor "regedit.exe" on behalf of the user "admin" of the domain "mydomain" remembering the entered password. If the "/savecred" parameter is present, the entered password is stored in the registry in encrypted form and will not be requested in the future.

runas /showtrustlevel- display the levels of trust existing in the system. In response, a list will be displayed in the form:

The following trust levels are available in the system:
0x20000 (Normal user)

In addition to the value of trustlevel equal to 0x20000 you can use the values 0x10000, corresponding to the minimum set of privileges and 0x40000, the standard set for the given user. To view the differences between different trust levels, you can use the command Whoami, executing it in a shell session launched with each of the levels trustlevel

runas /trustlevel:0x20000 cmd.exe- run command processor cmd.exe using the trust level obtained in the previous example.

runas /trustlevel:0x40000 cmd.exe- run command processor cmd.exe using standard level trust.

Note: in a command line session started using the /trustlevel option, the list of privileges corresponding to each trust level can be obtained using the command whoami /priv, and full account information - whoami /ALL

Note: parameter /profile incompatible with parameter /netonly.

Note: parameter /savecred incompatible with parameter /smartcard.

To run applications as administrator using runas.exe need to change standard settings system security:

Enable the Administrator account (by default, it is disabled);

Set a password for a user Administrator;

To check for administrator rights, a batch file named who-admin.bat the following content:

WHOAMI /PRIV | find /i "SeRemoteShutdownPrivilege"

If %ERRORLEVEL% == 0 goto admin

Echo NOT have admin rights!

ECHO!!! ADMIN!!!

The principle of privilege analysis is based on the use of the command whoami with parameter /priv. Depending on the presence of administrator rights, the batch file displays the message "NOT have admin rights!", Or - "!!! ADMIN !!!" and waits for a key to be pressed on the keyboard. See the team description for details. whoami from the link from complete list commands.

runas /savecred /user:Admin C:\scripts\who-amdmin.bat- run as administrator batch file who-amdmin.bat, located in the C:\scripts folder. At the first start, the Administrator password will be requested, at subsequent starts (with the /savecred) - No password required.

Passwords that are remembered when using the RUNAS.EXE utility with the /savecred parameter can be changed or deleted using the saved password management snap-in:

%systemroot%\system32\rundll32.exe" keymgr.dll,KRShowKeyMgr

When typing key values, you must respect the case of characters.

To manage saved accounts in the command Windows line utility is used

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 a graphical interface. And when working in cmd, elevated rights can often be required. Now we will learn 8 ways, how to open cmd as administrator in windows 10. This does not mean that the rest Windows versions these methods won't 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. Launching 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;) It will appear context menu, in which we select the item Command Prompt (Admin). Ready!

2. Through the 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 below Create task with admin rights. And then OK.

3. Through the task manager (cunning way)

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

The beginning is the same, that is, in the Task Manager, 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 further ado.

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, select Run as administrator.

5. Run cmd from the menu All applications

Open Start, click on All Apps and look for System Tools - Windows. It usually hides at the very bottom, so scroll all the way down with your mouse wheel.

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 run the command line directly from its native system32 folder. To do this, go to Explorer / My Computer, find the C drive, look for the Windows folder, go there, find the System32 folder, go deeper and deeper into the rabbit hole, go into it. In the System32 folder, look for the file cmd.exe. We select it. And here there are two options.

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 a file is selected, the inscription Tools for working with applications appears at the top. Click there with the left mouse button, another menu pops up from the bottom, click on the item Run as administrator.

7. Launch cmd from any Explorer folder

This command line option is available from any folder Windows Explorer 10. Go to the place you need, go to the menu File -> Open command line -> Open command prompt as administrator.

8. Create an admin shortcut for cmd.exe

For quick access to the admin command line, do the following.

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

We 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 configured yet. We go into its properties (right-click on the shortcut and select Properties). Click the Advanced...

... and tick the box Run as administrator. 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 on the shortcut and select Pin to taskbar. Or Pin to Home Screen as an option.

P.S.: In the comments, another method of launching the command line with admin rights was indicated. Click WIN+R, enter cmd and press the key combination Ctrl+Shift+Enter. And voila.

There are other ways to launch, but they are on behalf of ordinary user, which does not fit into the topic of this article. For example, through Win + R or hold Shift while right-clicking on the application.

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

Are you familiar with all these methods? Or some of them turned out to be new?) Tell us in the comments.

In this article, we will cover all possible ways run the cmd console with the highest rights in Windows 7, 8 and 10. Read about what this very run as administrator means in ours.

Run Command Prompt as Administrator in Windows 7

1 Press the button Start, in field Find programs and files enter cmd

2 Right-click on cmd.exe

3 Select :

Run Command Prompt as Administrator in Windows 8.1

Method 1. The easiest:

  1. Right click on the button Start;
  2. Click on :

Method 2

1 Open the sidebar and select Search:

2 In the search field, enter cmd;

3 Find an item in the search results. Command line and click on it with the right mouse button;

4 Select Run as administrator

Launch console as admin in Windows 10

The first way is fast, convenient and familiar since Windows 8.1:

  • right click on the button Start;
  • select Command Prompt (Admin).

The second way is through the search bar on the taskbar.

  • Enter cmd;
  • Right click on the search result;
  • Select Run as administrator:

Running CMD.exe

1. Open the location of the cmd.exe file. It may be located in the following folders:

\Windows\System32\ \Windows\SysWOW64\

2. Right click on the file and select Run as administrator:

Create a shortcut

You can create a shortcut to the cmd.exe file, where you choose to run as administrator only:

When you click on such a shortcut, you will be prompted to elevate and the console will start with the highest rights.

Some Features

If the current user does not have administrative rights to this computer, you will need to enter a password for any account, which has such rights, and click Yes:

If the command line is launched with administrator rights, then the title of the console window should read Administrator: Command line:

Which method do you prefer to use and why? Write in the comments.

The command line (cmd) is known to be a very powerful tool that allows you not only to use some of the undocumented features of the operating system, but also to fix many errors if Windows crashes or even does not boot. However, to perform some actions, the console must be run exclusively with admin rights. How to run cmd with administrator rights will be discussed further. For acquaintance, several methods are offered, each of which is convenient in its own way for different situations.

CMD: run as administrator using the classic method

Most Windows users are accustomed to running command console by the well-known method, which consists in first calling the Run menu (Win + R), and then entering the desired abbreviation cmd in its field. But after all, this is a normal start, and not with admin rights, although in some Windows builds in the Run console, just below the field for entering commands, you can see the start point with administrator rights.

Launching the Shell from the Start Menu

In principle, the start menu can also be used in different systems. To do this, in the Start menu, select standard programs, and open the command line via RMB, selecting the desired start type.

In Windows 10, running cmd as an administrator is even easier. As a rule, in “clean” systems immediately after installation, in the RMB menu on the “Start” button, you can find two cmd launch lines: normal and with administrator rights, which you need to use.

Using the Task Manager

An equally common, albeit more time-consuming, method of launching cmd as an administrator is from the standard "Task Manager", which is called either with three-finger combinations or from the "Run" console with the taskmgr command.

In the dispatcher window, through the file menu, you must specify the creation new task, enter cmd in the execution field and mark the creation item with administrator rights.

Launching cmd via search engine (Windows 10)

Tenth version of the operating Windows systems in a sense, it is unique in that it has simplified access to some system tools, although it has also not been without unforeseen difficulties.

However, it is in this modification of Windows that cmd can also be launched through search engine. To do this, you need to use RMB on the "Start" button, select search, enter "Command line" in the field (naturally, without quotes), and on the displayed result, again, through RMB, select start on behalf of the admin.

Start from Explorer

But these were methods that, by and large, duplicate one another. Now let's see what can be done using the standard "Explorer". First you need to open the "File" menu.

It will immediately contain a console launch line with a transition to extra menu, in which, as in the case of the Windows 10 Start section, there will be both a normal launch and a start with administrator rights.

Calling the console directly from the system directory

If anyone does not know, the Run menu was originally designed to run executable files that are located in the System32 system directory.

Thus, launching cmd as administrator can be done via PCM on the desired cmd.exe file from just this folder (it is located in the root Windows directories). Paradoxically, in 64-bit systems, almost all components of the System32 folder are duplicated in the SysWOW64 directory. In other words, exactly the same file responsible for starting the command line can be found here, and the launch steps will be completely identical.

Being in the system folder and selecting the file you are looking for, you can use the application tools. After clicking on the link "Management" will open additional panel, which will contain a start button with admin rights.

Acceleration of access

We figured out the main ways to start the command line. Now let's see how to simplify your task and speed up its launch. Here you will need to enter the System32 system folder, and through RMB on the cmd.exe file, select sending a shortcut to the "Desktop" (you can immediately choose to create a shortcut directly on the "Desktop", specifying the file you are looking for as an object).

Now, through RMB, already on the created shortcut, you need to select the properties of the object, on the shortcut tab, click the "Advanced" button and check the box for permanently run as administrator. If desired, the shortcut from the "Desktop" can be moved to the panel quick start or through RMB use pinning in the taskbar. This technique is the best solution if you have to work with the Shell very often.

Instead of total

That, in fact, is all that concerns the start of the command line with administrator rights. Of course, only the simplest and most commonly used methods have been described here. Cases were not considered when in some menus, instead of the command line, there is a link to Windows PowerShell. In fact, this is a tool very similar to the command console, but more complex for the average user and has a few more features.



tell friends