How to always run cmd as administrator. Launch the console as administrator. Command Prompt in Administrator Mode Using Task Manager

    Team RunAS used to run an 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 gain administrative privileges, as happens in the "Run as Administrator" mode. To run the application as an administrator, you will need to perform some system settings. Universal method running applications and batch files as an administrator without prompting UAC using the standard Task Scheduler is described in the article

RUNAS command line format:

RUNAS [ ] /user: username program

RUNAS [ ] /smartcard program

RUNAS /trustlevel: program trust level

Command line options:

/noprofile- Do not load user profile. This results in faster app loading times, but may cause some apps to not function properly.

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

/env- Use current environment settings.

/netonly- Credentials are for remote access only.

/savecred- Use credentials saved by the user. This option is not available in 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 USER@DOMAIN or DOMAIN\USER

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

/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 command interpreter cmd.exe as the user "administrator" of the computer "mymachine". When executing the command, you will be prompted for the password of the user on whose behalf the task should be executed.

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

runas /savecred /user:admin@mydomain regedit.exe- run the registry editor "regedit.exe" as the user "admin" of the domain "mydomain" and remember 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 that exist in the system. The response will display a list like:

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

In addition to the trustlevel value equal to 0x20000 you can use the values 0x10000, corresponding to the minimum set of privileges and 0x40000, standard for given user recruitment 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 cmd.exe command processor using the trust level obtained in the previous example.

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

Note: In a command line session started using the /trustlevel parameter, the list of privileges corresponding to each trust level can be obtained using the command whoami/priv, and full account details are whoami/ALL

Note: parameter /profile incompatible with parameter /netonly.

Note: parameter /savecred incompatible with parameter /smartcard.

To run applications as administrator using runas.exe needs to be changed standard settings system security:

Turn on account Administrator (by default, it is disabled);

Set a password for the 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 whether you have 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. Details can be found in the team description. whoami via the link from full list commands

runas /savecred /user:Administrator C:\scripts\who-amdmin.bat- run as administrator batch file who-amdmin.bat, located in the C:\scripts folder. At the first launch, you will be prompted for the Administrator password, at subsequent launches (with the parameter /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 Windows command line, use the utility

– Igor (Administrator)

It's no secret that a number of applications operating system Windows requires administrator rights. Therefore, sometimes it is necessary to run the command Windows string with administrator rights. In this sense, in Windows system XP everything was quite simple. If you have administrator rights, then all applications you launch will have them. Those. you don't have to do anything. If you didn’t have rights, then you could run the application on behalf of another user (of course, knowing the password and login).

However, starting from Windows Vista and Windows 7, the situation has changed somewhat. The so-called UAC (User Account Control) appeared. The idea is really interesting. Limit ordinary users from many mistakes. But, unfortunately, the implementation of such an idea made the work of most experienced users very inconvenient. Too many actions were required from the user to configure the system so that the huge number of warnings did not appear. Luckily, UAC can be disabled.

Running Command Prompt with Administrator Rights in Windows Vista/7 in the Normal Way

  1. Right-click on "cmd" or "cmd.exe" in the list of programs.
  2. Select "Run as administrator"
  3. If a UAC warning window appears, click "Yes".

Run Command Prompt with Administrator Rights in Windows Vista/7 with Keyboard Shortcut

  1. Open the "Start" menu
  2. Type "cmd" (without quotes) into the "Start search" (Vista) or "Search programs and files" (Win 7) box.
  3. Then press the key combination Ctrl + Shift + Enter (must be pressed simultaneously)
  4. If a UAC warning window appears, click "Yes". You can also use the combination Alt keys+ C to confirm the action.

Create a shortcut to launch command line in Windows 7 / Vista with elevated privileges

If you use the command line frequently, it's best to create a shortcut once rather than using keyboard shortcuts or the context menu every time. Although, this is more a matter of habit. However, the shortcut also has its advantages. At a minimum, it can be placed on the panel quick launch, and then you only need one click to launch. So let's get started:

  1. Right-click on an empty area of ​​your desktop
  2. Select "New" from the context menu
  3. Select "Shortcut"
  4. In the "Specify the location of the object" field, enter "cmd.exe" (without quotes)
  5. Click "Next". Give the shortcut a name, for example "cmd.exe", and click "Finish"
  6. Right-click on the created shortcut
  7. Select "Properties" from the context menu
  8. Click the "Advanced" button
  9. Check the box for “Run as administrator”
  10. Click "OK"

You now have a shortcut that will open a command prompt with administrative rights when double-clicked. Well, or you can pin it to the quick launch panel, as mentioned earlier. Agree that it is convenient. Please note that if UAC is enabled, a warning window will still appear when you open the console.

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 the graphical interface. 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 command line option is available from any folder Windows Explorer 10. Go to the location you need, go to the File menu -> Open command line -> 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 the desktop free space 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 run the command cmd line with administrator rights by simply launching a 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.

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

There are still ways to launch, but they are on behalf of a 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 can be performed in Windows 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.

Running Command Prompt as an administrator on Windows in elevated mode is not a difficult task. Some useful commands require execution with such privileges. If you open them in normal mode, then you will most likely see an error message.

It is advisable to have administrative access to Windows or know the admin password. When you try to call cmd as a user with limited rights, then a UAC window will open. Here you must enter the administrator password in the form; if entered correctly, you will launch a command line with administrator capabilities.

How can I find out what mode the console is open in? Look at the title of the window, if it says “Administrator”, then you have done everything correctly and can safely start writing commands.

There are many ways to launch the console as an administrator, and they are almost identical in different versions Windows. All methods can be used equally.

Open a command prompt with administrator privileges on Windows 7

Familiarize yourself with the process and choose for yourself a convenient way to launch cmd. For example, consider the shortcut:

1. Click "start".

2. Place “command line” in the search.

3. Wait for the list to be built. Place the mouse cursor on the very first object and right-click.

4. A menu will pop up, in it select the line “run as administrator”.

5. If the User Account Control option is enabled, click yes.

Note: Enter the admin password if you see an input field, and then click “yes”.

Run cmd on Windows 8 with administrator rights

1. Press the "start" button.

2. Move to the right all the way.

3. Click on the magnifying glass icon.

4. In the form, enter cmd.

5. Right-click on the “command line” object.

6. In the menu, click Run as administrator, as in the screenshot.

7. In the User Account Control window, click “yes”.

Like all modern operating systems, XP also has this function. Follow the steps in the links and recommendations above.

As you can see, there are not many steps you need to do to launch the command line as an administrator. With these rights, you can execute any written command in cmd. For example, this way you will have the opportunity to easily and quickly and more.

It happens in life, and even when working with a computer, it is not uncommon that you do not have enough rights to perform any actions. In Windows, when you run certain commands in the console (command line), just such an alert is issued. What to do? This is exactly what will be discussed below in this article: How to open the command line (console) with administrator rights in Windows. Once you have acquired your license, I advise you not to lose your head and still be clearly aware of what you are doing! ;)

Find the command line (console) in Windows search

To launch something you need, you first need to find it. And in order to find the command line (console), the smartest thing to do would be to use Windows search. How to do this is described in detail in → this article, so I will briefly:

1. Left-click on the “ Start» Windows, located in the lower left corner of the screen.

2. Type the treasured word cmd into the search field and admire the results. =)

Launch the command line (console) with administrator rights

If we just need the command line, then we launch it as described in → this article. But since we need administrator rights when executing commands in the console, we act a little differently:

3. Right-click on the icon or name of cmd.exe or just cmd (for whom, how is it configured display file extensions, now it doesn’t matter at all).

4. In the pop-up context menu left mouse button select the item “ Run as administrator»

5. We rejoice and rejoice =)

I took the time and drew step by step instructions what is described above - we rejoice and use it. ;)

Important note for administrators

In fact, it's not that important. And there are two of them:

  1. Windows, when you try to open the console as an administrator, will ask how drunk you are and require you to take a urine test, or simply ask you to confirm that you really want to open the command prompt with administrator rights.
  2. The appearance of the command line will be slightly different from the usual one. The picture below is an acumen test: “What is the difference between the command line with administrator rights?” ;)

Good luck as an administrator! =)