Launch cmd exe with administrator rights. RUNAS command - running an application as another Windows user

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 completed before launching command line on behalf of the 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 the account properties 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. First, you entered the wrong password. Second, you have never logged in to the system. account administrator (my option).

You need to log out and log in as an administrator, 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.

Sometimes when working in Windows, you need to run the command line as an administrator. By default, Command Prompt runs in restricted mode, and some commands may require administrator rights to run. This is done to prevent accidental execution of commands that could make major changes to the operating system.

So let's look at a few simple ways to run command prompt as administrator. Some of these methods only work in certain situations. Windows versions.

Method 1: Open the command line as administrator through the menu Start

This method will work in all versions of Windows except Windows 8, 8.1, because... these versions lack the classic button Start.

1. Click the button Start, select item All programs -> Standard

2. Find the item in the list Command line and right-click on it.

3. Follow the steps for the appropriate system

ForWindowsXP:

Select an item Running on behalf of...

As a result, a window will load in which you need to select the item The specified user account, select the Administrator user, enter the password and click OK.

For Windows Vista, 7:

Select an item Run as administrator.


If you have User Account Control enabled, a window will appear in which you need to allow the program to make changes on your computer.

Method 2: Open Command Prompt as Administrator using the search menu bar Start

This method will only work on Windows Vista and Windows 7.

1. Click the Start button and type cmd. The search results will display cmd.

2. Press and hold the keys Ctrl And Shift and then click Enter. As a result of these steps, Command Prompt should start as an administrator.

Method 3: Open the command line as an administrator using the “Win+X” menu in Windows 8, 8.1

In Windows 8, 8.1, there are several ways to run Command Prompt as an administrator. One of them is using the “Win+X” context menu, which can be obtained either using a keyboard shortcut Windows+X, or by right-clicking in the lower left corner of the screen.

As you can see in the picture, this menu has separate item to run command prompt as administrator.

Method 4: Open the command prompt as administrator using the start screen of Windows 8, 8.1

In version 8 of Windows, a Start screen appeared, using which you can also launch the command line as an administrator. This method works in Windows 8 and Windows 8.1 almost identically. The only difference is in the design of the context menu.

1. Go to the home screen by pressing the key Windows in Windows 8, 8.1 or the Start button (if you can call it that) in Windows 8.1.

2. Type on the keyboard cmd. A shortcut should appear as a result of the search Command line.

3. Right-click on the found shortcut and select Run as administrator.

This is what the action looks like Windows 8:

and so on Windows 8.1:

Method 5: Open the command line as administrator using Windows Explorer 8, 8.1

In Windows 8, it became possible to launch the command line through the Explorer menu.

1. Open in Explorer Windows disk or folder.

2. From the menu, select File, then Open command line And Open command prompt as administrator.

Method 6: Open the command line as an administrator using the task manager

This method only works on Windows 8, 8.1.

1. (key combination Ctrl+Shift+Esc)

2. In the dispatcher menu, select File, then Start a new task.

3. In the field Open enter cmd, check the box next to the item Create a task with administrator rights and click OK.

There is also an easier option to run the command line as an administrator using this method. To do this, before selecting the item Start a new task, press and hold the Ctrl key. As a result, the window will not open Create a task, and a command prompt with administrator rights will immediately open.

That's all. If you know any other way to run the command line as an administrator, I will be glad if you describe it in the comments.

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 “Local users and groups” - “Users”. As you can see, in my case the “Administrator” account is disabled (there is an arrow on the icon).

Double-click to open the account properties and uncheck the “Deactivate account” option.

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 “Administrator” account and select the menu item “Set password...”

When prompted to change your password, click “Continue” and enter your 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, to do this, click “Start” - “Run”, or the key combination “Win ​​+ R” and enter cmd command. In the window that opens, write the following:

runas /profile /user:mymachine\Administrator cmd

(where mymachine 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. First, 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, 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. You can now browse directories, delete files, and even run applications as an administrator.

faqpc.ru

How to run Windows 7 command line with administrator rights?

Running Windows 7 Command Prompt with Administrator Rights

The principle of the command line is that it allows you to perform tasks without the help of the windows GUI. Typically, the command line is only used by advanced users.

Often, to maintain Windows 7, you have to go to the command line, and you need to perform tasks in the context of administrator account rights.

So, how to run the command line with administrator rights operating system Windows 7? To accomplish this task there are several simple and effective options. Let's look at them.

Option number 1 - launch the command line through the START menu

  1. Open the Start menu and enter "cmd" in the search bar;
  2. Right-click on the search results and select "Run as administrator";
  3. The Windows 7 command line will start with administrator rights!

Option No. 2 - by creating a shortcut indicating the parameters

  1. On the desktop, call up the context menu with the right mouse button, select “Create” - “Shortcut”;
  2. In the file location line, write “cmd.exe” and click “Next”, then “Finish”;
  3. Right-click on the created shortcut and select “Properties”;
  4. In the properties window, click the "Advanced" button;
  5. In the window additional properties check the box "Run as administrator", then click OK;
  6. Now, when you launch the shortcut, the Windows 7 command prompt will launch with administrator rights.

I would like to note that to run the command line as administrator in Windows 10, a special tab has appeared in context menu"Start". Read the life hack on the website by following the link provided!

Cmd4Win.ru

Command line for administrator in windows 7

In Windows 7, a regular user cannot even sneeze without permission. What can we say about the command line, which you often have to work with system administrator rights. There are several ways to open a command prompt with these rights.

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

Method 1

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

Method 2

Click the Start button and type cmd again. After that, press the key combination. The command prompt will open immediately in administrator mode.

Method 3

Click the Start button and select All Programs > Accessories.

Method 4

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

Select Start > Run or press a key combination.

windata.ru

8 ways to open cmd as administrator in windows 10

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 to open cmd with administrator rights in Windows 10. This does not mean that these methods will not work in other versions of Windows. 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

Right-click on Start or press the Win+X combination, and the keys are faster, I guarantee it;) A context menu will appear in which we select Command Prompt (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 -> Run 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 Ctrl key. 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 to the bottom.

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 cmd.exe file. Let's highlight it. And here two options appear.

The fastest and easiest: right-click on cmd.exe and select the already familiar 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 option for opening the command line is available from any folder in Windows 10 Explorer. Go to the location you need, go to the menu File -> Open Command Prompt -> Open Command Prompt as Administrator.

8. Create an admin shortcut for cmd.exe

To quickly access the admin command line, do the following.

On the desktop free space Right-click and select New -> Shortcut.

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

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 Start 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 can be performed in Windows in various ways. Depending on the current specific situation, I can choose the most appropriate option launch cmd.

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

softwarius.ru

Run command line (cmd) with administrator rights

Running command prompt as administrator on windows in elevated mode does not work difficult task. Some useful commands require execution with such privileges. If you open them normally, 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 under 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 of Windows. All methods can be used equally.

Open a command prompt with administrator privileges on Windows 7

Familiarize yourself with the process of calling the command line in Windows 7 and select 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”.

The command line (console) allows you to run programs, configure your computer, and automate many computer management actions. By default it runs with user rights. This protects the system from accidental changes and inexperienced users who, through their actions, can disrupt the operation of the system.

Therefore, in cases where major changes need to be made to the system, the command line must be launched with administrator rights. This will give full access to all operations and files. With administrator rights, you can execute any command in the console.

In this article, we will look at several ways to run the command line as an administrator in the Windows 7 and Windows 10 operating systems. It is unlikely that you will need all of these methods at once, just select the ones that are most convenient for you and use them if necessary.

Launch the command line using search

In the context menu of programs there is always a “Run as administrator” function. This function can be used on behalf of an administrator. To do this, open the Start menu and enter the “cmd” command into the search. After the command line (the “cmd.exe” file) appears in the search window, you need to right-click on it and select “Run as administrator” in the context menu that opens.

It should be noted that search in the Start menu works the same in both Windows 7 and Windows 10. Therefore this method can be used in both of these systems.

After this you will see a warning about . Click on the “OK” button and a command line will open in front of you.

Also, the command line can be launched as an administrator without calling the context menu. To do this, open the Start menu and enter the command “cmd” into the search. After the command line (file “cmd.exe”) appears in the search window, you need to press the key combination CTRL+SHIFT+ENTER.

Launch the command line using the program list

In the operating room Windows system 7 The command line can be found in the menu in the “All Programs - Accessories” section. To run it as an administrator, call the context menu and select “Run as administrator.” After this, you will see a warning about running the program as an administrator. Click on the “Ok” button and a command line will open in front of you.

Due to differences in the design of the Start menu, this method will only work on Windows 7.

Executing a CMD command using the Run menu

Another option for opening a command prompt with administrator rights is to execute the “CMD” command in the “Run” menu. To do this you need to press the combination Windows-R keys, enter the command “CMD” and press CTRL+SHIFT+ENTER. You need to run the command this way. If you simply press ENTER or the “OK” button, the console will start in normal mode.

You can also open the Run window from the Task Manager window, which is opened using CTRL-SHIFT-ESC or CTRL-ALT-DEL. To do this, open the "File" menu and select the "Run new task" option.

After this, the “Run” window will appear in which you can enable the “Create a task with administrator rights” option. When using this option, the “CMD” command will be launched immediately with administrator rights.

This option will work on both Windows 7 and Windows 10.

Create a command line shortcut

You can use a shortcut to run Command Prompt as an administrator. To do this, call the context menu on the Desktop and select “Create shortcut”.

In the window that opens, you need to enter the “cmd” command and click on the “Next” button.

After that, you need to enter the name of the shortcut and click on the “Done” button.

As a result, a shortcut to launch the command line should appear on your Desktop. Now open the properties of this shortcut and click on the “Advanced” button.

After that, close all windows by clicking on the “OK” button. That's it, after this, when you run this shortcut, the command line will be launched as administrator. This startup method works the same in both Windows 7 and Windows 10.

Opening a Command Prompt Using Windows-X

The Windows 10 operating system has additional menu with a list of useful system utilities. There, among other things, there is a command line with and without admin rights. This menu can be opened using the Windows-X key combination or by right-clicking on the “Start” button.

In some cases, the entire command line in this menu is the PowerShell console. If this is the case for you, then you can switch to using the classic command line. To do this, open the “Options” menu, go to the “Personalization - Taskbar” section and turn off the “Replace the command line with Windows PowerShell” option.

The Windows-X menu is only available in Windows 10, so this method is only for this operating system.

Opening a command line from a folder

It is unlikely that this method should be used, but the command line can be launched from the “Windows\System32” folder (or from the “Windows\SysWOW64” folder if you have a 64-bit version of the operating system). To do this, go to the system drive, open the “Windows\System32” (or “Windows\SysWOW64”) folder and find the “cmd.exe” file in it.

The file “cmd.exe” is the Windows command line. To run it with administrator rights, right-click on it and select the “Run as administrator” option. You can also make a shortcut to cmd.exe on your desktop.

The location of the cmd.exe file does not differ between versions of Windows. Therefore, this method will work in both Windows 7 and Windows 10.

How to understand that CMD is running as administrator

After you have launched the command line, you should make sure that you did everything correctly and that it is running as administrator. To do this, you need to pay attention to the title of the window; it should contain the inscription “Administrator”, it indicates that the console is running as an administrator.

If there is no “Administrator” sign, then the console is working normally, close the console and try opening it again. If that doesn't work, you can try another opening method.

– Igor (Administrator)

It's no secret that a number of Windows operating system applications require administrator rights. Therefore, sometimes it is necessary to run the Windows Command Prompt with administrator rights. In this sense, everything was quite simple in Windows XP. 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 with Windows Vista and Windows 7, things have 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 amount warnings. 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 keyboard shortcut Alt + C to confirm the action.

Create a shortcut to launch the 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 use 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 Quick Launch panel, and then you only need one click to launch it. 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 administrator rights when double click. 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.