Hardware and software setup

Where is the admin string. How to run command prompt as administrator

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 desirable to have administrative access to Windows or to know the administrator's password. When you try to invoke cmd as a limited user, 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 to find out what mode the console is open in? Look at the name of the window, if “Administrator” is written there, then you have done everything right and you can safely start writing commands.

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

Open Command Prompt with Administrator Privileges on Windows 7

Familiarize yourself with the process and select for yourself a convenient way to launch cmd. For example, consider the fast path:

1. Press start.

2. In the search place the inscription "command line".

3. Wait for the list to be built. Place the mouse cursor on the very first object and click 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 the input field, and then click yes.

Run cmd on windows 8 with admin rights

1. Press the start button.

2. move to the right as far as it will go.

3. Click on the magnifying glass icon.

4. In the form, type cmd.

5. Right-click on the "command line" object.

6. In the menu, click the run as administrator item, as in the screenshot.

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

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

As you can see, not many steps need to be done to run the command prompt as an administrator. With such rights, you can execute any prescribed command in cmd. For example, this way you will have the opportunity to easily and quickly and not only.

    Command Run AS used to run the application under the user account whose name is passed as a parameter command line. On Windows 7 and later, given 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 leads to more fast loading applications, but may cause incorrect operation some applications.

/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 "/env" option is given, the 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, standard for this user set. 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 the cmd.exe command processor using the trust level obtained in the previous example.

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

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 complete information about account - 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 on the Windows command line, use the utility

On Windows 7 regular user and can't sneeze without permission. What can we say about the command line, which you often have to work with as a system administrator. There are several ways to open a command prompt with such rights.

As usual, in Windows in general and in Windows 7 in particular, the same action can be performed in a variety of ways. So let's see how to open a command prompt with administrator rights.

Method 1

Click the button Start and type cmd. The file will be shown at the top of the window. cmd.exe. Right click on it and select command Run as administrator.

Method 2

Click the button Start and enter again cmd. Then press the key combination . The command prompt will open immediately in administrator mode.

Method 3

Click the button Start and select command All programs > Standard.

Method 4

well and this method is universal and will be needed if you are already working with an administrator account.

Choose a team Start > Run or press the key combination .

The command line is a universal tool in any operating system. Over time, many people come to the conclusion that they need to use this tool. Usually this is necessary to solve some problem in the OS. Let's look at how to open the command prompt in Windows 7 as an administrator with all available methods.

Administrator privileges when calling the utility are necessary so that the user can perform virtually any action in Windows, even though he is working under an account with limited privileges. In such a case, if the administrator account is password protected, it will have to be entered each time to call the command line using any of the methods below.

This is a shell program that passes to the operating system the input entered into it. text commands. Physically, it is a cmd.exe file, which is located in the %windir%\system32 directory, and in Windows 7 x64 in the %windir%\SysWOW64 directory.

Although a lot of time has passed since the days of MS-DOS, and many operations in Windows are performed through GUI, no one is going to refuse the command line. Firstly, not all actions in Windows 7 can be performed through the console, and secondly, it is much faster to enter a text command and press Enter than to perform numerous clicks on window elements, various menus and other graphic elements.

Run window

In addition to the console, text commands to the operating system are also sent through the command interpreter. Its features are:

  • the window with the result of the command is not displayed after its execution;
  • after starting each of them, the interpreter has to be called again;
  • Commands require administrative privileges to run.
  1. We launch this tool using the button of the same name in the "Start" or the key combination Win + R.
  1. Enter the command "cmd", "cmd.exe" or the full path to the file: "%windir%\system32\cmd.exe" into the text form and execute the command.

Here the question may arise: how do you know that the necessary privileges have been obtained? We look at the window header - there should be an inscription: "Administrator: path to the cmd.exe file."

Many write: "I can not start the console on behalf of the administrator." This can be if your account is not allowed to do this by the administrator, and only he can solve the problem.

Shortcut in Start

  1. Open this drop-down menu and click "All Programs".
  2. Scroll down and click on the "Standard" folder.
  3. We call the context menu of the shortcut and select the appropriate item.

Search string

  1. Expanding the main windows menu 7 and enter part of the name of the utility in the search box.
  2. As in the previous case, open the context menu of the target object that appeared as a result of the search, and select "Run as ...".
  1. Set the location object to "cmd" and click "Next".
  1. Enter its name and press Enter.
  1. Open the properties of the object using the Alt + Enter combination or the right button.
  1. We click "Advanced".
  1. In the advanced properties window, check the first option and click on OK.
  1. We close all windows.

To add a shortcut to the Taskbar, drag it to desired area or when the utility is running, call the “Pin to Taskbar” command.

A shortcut is also created by dragging the executable file to the desktop or to the Taskbar.

Conductor

Open "Explorer" (go to any folder except "My Computer").

  1. The fastest way to do this is with the key combination Win + E.
  2. Hold down Shift and open the context menu (right-click) of the space free from files / directories.
  3. We perform a click on the item "Open a command window".

Direct call

The command line can be run as regular application- double click on executable file. Let's do it.

  1. We call the "Explorer" window: we used the combination of buttons Win + E for this.
  2. V address bar enter "%windir%\system32", and for 64 bit you can also "%windir%\SysWOW64", find our file and execute it as administrator.
  1. Enter the name of the utility and open it.

The method is suitable for cases when the explorer.exe file is damaged or replaced by viruses.

In the mass of author's assemblies of the operating system, there is the ability to open a console with extended permissions through the context menu of directories. We use the official version of the OS, so we cannot demonstrate this.

We have covered all the options for opening the command console in Windows 7 with administrator privileges, which is necessary to run most commands on the system. Without these rights, your ability to manage the Seven will be meager, and many problems simply cannot be solved without this.

Video instruction

In the selection of videos below, you can see some of the methods in action: after all, it is easier for people to perceive information in a visual rather than a textual form.

Command Windows string v latest versions has undergone many changes for the better. Without prejudice, I will say that now it has become really convenient to use. In terms of security, the console has also changed - now even from an administrative account, not everything can be done without additional actions. When you try to change a number of system parameters through the console, you will see a message about insufficient privileges. This behavior is typical for operating systems originating from the *nix world, where all critical actions must always be confirmed with the superuser password. In Windows, there is also such a user, he is called "Administrator".

In order to run command console with elevated privileges, do the following:


In Windows 8 and older, you can start the console as an administrator and simply right-click on the "Start" button, after which in context menu corresponding item is available

In addition, the user has the ability to activate the super administrator profile, making it possible to log in on his behalf. You can do it like this:


I note that full activation, and even more so permanent work using super administrator credentials in Windows, is an extremely undesirable step. If compromised, this data will give the attacker full, unrestricted access to the laptop, so the old recommendation “do not sit as root” is relevant at all times and on any operating system. That is why when buying a laptop http://www.moyo.ua/netebook_pc/notebooks/ in installed system the superadmin entry is always disabled.

Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!