All you have to do is use the runas
command to run your program as Administrator (with a caveat).
runas /user:Administrator "cmdName parameters"
In my case, this was
runas /user:Administrator "cmd.exe /C %CD%\installer.cmd %CD%"
Note that you must use Quotation marks, else the runas command will gobble up the switch option to cmd.
Also note that the administrative shell (cmd.exe) starts up in the C:\Windows\System32 folder. This isn’t what I wanted, but it was easy enough to pass in the current path to my installer, and to reference it using an absolute path.
Caveat: Enable the admin account
Using runas this way requires the administrative account to be enabled, which is not the default on Windows 7 or Vista. However, here is a great tutorial on how to enable it, in three different ways:
I myself enabled it by opening Administrative Tools, Local Security Policy, then navigating to Local Policies\Security Options and changing the value of the Accounts: Administrative Account Status policy to Enabled, which is none of the three ways shown in the link.
An even easier way to accomplish this:
C:> net user Administrator /active:yes
A small tip on how to run your command prompt as an administrator or in other words, open an elevated command prompt, in Windows 11/10/8/7. We have seen how to launch Command Prompt, and carry out many tasks. But some tasks required elevated privileges to be run. In such cases, you have to open an elevated command prompt window. So let us see how to launch, run or open Command Prompt as an administrator or an elevated CMD with administrative privileges & rights in Windows 11/10/8/7.
To run Command Prompt as administrator in Windows 11/10, follow these steps:
- Search for cmd in the Taskbar search box.
- Make sure the Command Prompt result is selected.
- Click on the Run as administrator option.
- Click the Yes button in the UAC prompt.
To learn more about these steps, continue reading.
At first, you need to search for cmd in the Taskbar search box and ensure that the Command Prompt result is selected or highlighted.
If so, click the Run as administrator option. If your computer displays the UAC prompt, click the Yes option to find Command Prompt as administrator.
However, if you are using Windows 10 or Windows 8, you may not have to follow this aforementioned method. In Windows 10/8, you can open elevated Command Prompt from the Win+X menu.
In Windows 10 and Windows 8, follow these steps:
Take the cursor to the bottom left corner and right-click to open the WinX menu. Select Command Prompt (Admin) to open an elevated command prompt.
So you see, things have been made easier in Windows 10/8.1.
In Windows 7, follow these steps:
- Type cmd in Start search.
- In the results, you will see ‘cmd‘.
- Right-click on it and from the context menu select Run as Administrator.
TIP: This post will help you if you can’t run Command Prompt as administrator.
Open Elevated Command Prompt using the System32 folder
The System32 folder contains the storage location of the Windows Command Processor (cmd.exe) application. You can access that location and then open an elevated Command Prompt window. Here are the steps:
- Press Win+E hotkey to open the File Explorer
- Go to C:\Windows\System32
- Under the System32 folder, look for the cmd.exe file
- Right-click on the cmd.exe file
- Click on the Run as administrator option.
In the UAC prompt, you need to use the Yes button, and then an elevated Command Prompt window will be in front of you.
Run Command Prompt as an administrator using the Run Command box
You can also use the Run Command box to open Command Prompt window as an administrator on your Windows 11/10 computer. For this, the steps are as follows:
- Use Win+R hotkey. This will open the Run Command box
- Type cmd or cmd.exe in the text field
- Press Ctrl+Shift+Enter hotkey.
If a UAC prompt appears, press the Yes button, and the Command Prompt window will open as an administrator.
Open Command Prompt as an administrator using PowerShell
Windows PowerShell can also help you open a Command Prompt window as an administrator on a Windows 11/10 PC. The steps are mentioned below:
- Open Windows PowerShell using the Search box or another way you like
- In the PowerShell window, enter and execute the following command:
start-process cmd -verb runas
This will open the UAC prompt box in which you can click on the Yes button. Finally, an elevated Command Prompt window will be there.
Other ways to open an elevated command prompt:
There are more other ways to open an elevated Command Prompt in Windows 11/10. Some of the ways are:
- Press Ctrl+Shift+Esc to open the Task Manager. Click on File menu > Run new task. To open a command prompt window, type cmd. Remember to check the Create this task with administrative privileges check-box. Then hit Enter.
- You can also open an elevated Command Prompt from the Task Manager using CTRL key.
- Or then simply open the Start Menu or Start Screen and start typing the command line. Next, hold the Shift and Ctrl keys, and then hit Enter to open the command line in an elevated command prompt.
- Open an elevated command prompt using CMD
- Run Commands from Windows Start Search Box as an Administrator
- How to always run Command Prompt as Administrator
- Run commands from Explorer address bar.
How do I get Command Prompt in Windows 11/10 as administrator?
There are a lot of ways using which you can open Command Prompt as an administrator in Windows 10 as well as Windows 11 OS. You can use the Search box, Win+X menu, Windows PowerShell, Run Command box, and other options to open an elevated Command Prompt. All such options are covered in this post above. Check them.
How do I force Command Prompt to run as administrator?
You can use the keyboard shortcut to force Command Prompt to run as administrator. For that, you need to search for cmd in the Taskbar search box and press the Ctrl+Shit+Enter button together.
How do I open Command Prompt in Windows 11?
Although Microsoft removed Command Prompt from the Win+X menu in Windows 11, you can use the Taskbar search box to open Command Prompt on your computer. You need to search fox cmd and hit the Enter button. It will open Command Prompt on your PC. Alternatively, you can open Windows Terminal to perform the same job.
How do I run cmd as administrator in standard user?
To run cmd or Command Prompt as administrator in Standard user, you need to follow the steps mentioned above. In other words, you need to search for cmd in the Taskbar search box, click the Run as administrator option, and click the Yes option.
Now see how to open an elevated PowerShell prompt in Windows 11/10.
You are here:
Home » Windows 10 » 8 Ways To Open Command Prompt As Administrator In Windows 10
The majority of Windows users will never need to open Command Prompt as an administrator or elevated Command Prompt as most of the commands can be executed without the elevated Command Prompt.
That said, some tasks can only be performed from Command Prompt running with administrator rights, and you get “You may not have permission to perform this operation” or “Access is denied” error when you try to execute certain commands without admin rights.
In Windows 10, there are multiple ways to open Command Prompt as an administrator or run elevated Command Prompt. You can follow one of the below-mentioned methods to launch Command Prompt as an administrator in Windows 10.
NOTE: If you’re wondering how to know that the Command Prompt has been launched as an administrator, it’s easy. When the Command Prompt is launched with admin rights, the “Administrator” text will appear on the title bar (see the picture above) of the Command Prompt window.
Anyways, below are the methods to open Command Prompt as an administrator in Windows 10.
Method 1 of 8
Use shortcut keys to open elevated Command Prompt quickly
This is probably the easiest and fastest method out there to open Command Prompt as an administrator.
Step 1: Press the Windows logo key on the keyboard or click/tap the Windows logo button on the bottom-left corner of the screen to open the Start.
Step 2: Type CMD in the Start/taskbar search box (search box is automatically selected when you open Start) or in the Run command box, and then simultaneously press Ctrl+Shift+Enter keys.
Step 3: Click the Yes button when you get the User Account Control dialog box. That’s it!
Note: If you are using a non-admin account, you’ll be asked to enter the admin account password to open the Command Prompt as an administrator.
Method 2 of 8
Another easy way to open Command Prompt as admin in Windows 10
Step 1: Right-click on the Start menu (or use Windows logo + X keys) and then click the Command Prompt (Admin) option.
NOTE: If you cannot see Command Prompt entry, navigate to Settings > Personalization > Taskbar and then turn off Replace Command Prompt with Windows PowerShell in the menu when I right-click the Start button or press Windows key + X option.
Step 2: Click the Yes button when you get the User Account Control screen to open Command Prompt as admin.
Method 3 of 8
Use search to open elevated Prompt from Start
Step 1: Open the Start by either clicking the Windows logo key on the bottom left corner of the screen or by pressing the Windows logo key on the keyboard.
Step 2: Type Command Prompt or CMD in the search box to see Command Prompt entry in the result, right-click on the Command Prompt and then click Run as administrator.
Method 4 of 8
Open admin Command Prompt from Start menu
Step 1: Open the Start by clicking the Windows logo button on the extreme left on the taskbar (bottom left corner of the screen) or by pressing the Windows logo key on the keyboard.
Step 2: In the Start menu, scroll the apps list to see the Windows System folder, expand the Windows System folder to reveal the Command Prompt entry, right-click on Command Prompt entry, click More and then click or tap Run as administrator.
Click or tap the Yes button when you see the User Account Control box or enter the password of the admin account if you’re using the Admin account.
Method 5 of 8
CMD as administrator from File Explorer
Step 1: Open the Run command dialog box by simultaneously pressing the Windows logo and R keys.
Step 2: In the Run command box, type %windir%\System32\ and then press Enter key to open the System32 folder.
Step 3: Locate the file named cmd.exe, right-click on the same, and then click the Run as administrator option.
Click the Yes button or enter the admin account password when asked to do so.
Method 6 0f 8
Step 1: Open the Run command box by simultaneously pressing the Windows logo and R keys (Windows + R).
Step 2: In the Run command box, type CMD and then simultaneously press Ctrl + Shift + Enter keys to open Command Prompt as administrator. Click on the Yes button when you get the UAC prompt.
Method 7 of 8
Open Command Prompt from Task Manager
This method is useful and works only if you signed in to an admin account.
Step 1: Open Task Manager. To do so, you either right-click on the Start button or taskbar and then click Task Manager. Task Manager can also be launched using Ctrl+ Shift+Esc hotkey.
If the Task Manager is launched with fewer details is launched, click More details to open the full version.
Step 2: Once the Task Manager is launched, click the File menu.
Step 3: Now, hold down the Ctrl key and then click Run new task open Command Prompt as administrator. In this method, you’ll not see the User Account Control dialog box.
That’s it!
Method 8 of 8
Open Command Prompt window here as administrator
UPDATE: This method no longer works.
As you likely know, when we hold down the Shift key and right-click on a folder, Open Command Prompt window here option appears in the context menu. If you want to open the Command Prompt as an administrator from a folder, you can use this method.
Step 1: Click the File menu, hover the mouse cursor over Open Command Prompt to see Open Command Prompt as administrator option. Click on the same option to run Command Prompt as administrator.
That’s all we know. If there is an easier way to open Command Prompt as an administrator, do let us know by leaving comments. You can also let us know if any of the methods mentioned above are not working for you.
Tip: You can configure Windows 10 always to open Command Prompt as administrator. Please go through our how to always run Command Prompt as an administrator guide for detailed instructions.
Some commands require an administrator-level Command Prompt to run. Here’s how to set it up properly on Windows.
The Command Prompt is a text-based interface on Windows that allows you to issue commands to perform various tasks. People usually refer to it as a command line, shell, or even by its filename. And although the Command Prompt might not be as user-friendly as Windows’ graphical user interface, it offers you more control over your system.
Some commands, however, require administrator-level privileges to run properly. As such, here are some quick and easy ways to open Command Prompt as an administrator in Windows.
To run Command Prompt as an administrator, you can use the Windows Search feature. Here’s how to do it:
- Press Win + Q on your keyboard to open Windows Search.
- Type «Command Prompt» into the search box.
- Select Run as administrator from the right pane.
- You may be prompted to confirm your identity; in that case, click Yes.
Once you’ve done that, Command Prompt will open with administrative privileges. From there, you can enter any commands you like; just keep in mind that they will have full system access, so use them wisely!
2. How to Run Command Prompt as an Administrator Using the Run Dialog
If you need to run Command Prompt as an administrator in Windows 11, you can do so by using the Run dialog box. The steps are as follows:
- Press the Win + R on your keyboard.
- In the Run dialog box, type “cmd” into the field and then press Ctrl + Shift + Enter.
- This will open Command Prompt with administrative privileges. From here, you can enter any commands that you need to run.
If you need to close Command Prompt, simply type “exit” and press Enter on your keyboard. This will close the program and return you to the desktop.
3. How to Run Command Prompt as an Administrator via the Quick Access Menu
If you’re using the Command Prompt on a regular basis, there’s a good chance you need to run it as an Administrator from time to time. Fortunately, Microsoft has made it easy to do this in Windows 11.
To run the Command Prompt as an Administrator, do the following:
- Press the Win + X keys on your keyboard.
- Then select Terminal (Admin) from the menu that appears.
- If you see a User Account Control message, click Yes.
- Next, press Ctrl + Shift + 2 to bring up the elevated Command Prompt page.
4. How to Run Command Prompt as an Administrator From the Start Menu
This is one of the most popular methods of opening almost every Windows program. To open a command prompt with admin access, follow these steps:
- Click the Start button in the lower-left corner of your screen.
- Next, click on «All apps» in the upper right corner.
- Scroll to the bottom and select Windows Tools from the list.
- Now right-click on Command Prompt and select Run as administrator.
- If UAC appears on the screen, click Yes to continue.
5. How to Run Command Prompt as an Administrator Through Task Manager
Task Manager is a tool that every Windows user should know about. It’s a great way to see what programs are running on your computer and how many resources they’re using at the same time. If you ever need to run a command prompt as an administrator, you can do so by opening Task Manager.
All you need to do is follow the below steps:
- Open the Task Manager (see how to open the Task Manager) and select Run new task.
- In the «Create new task» window, check the «Create this task with administrative privileges» box.
- Type «cmd» (without the quotes) into the «Open» field.
- Click OK to launch the command prompt as an administrator.
6. How to Run Command Prompt as an Administrator Using the Control Panel
Another way to run Command Prompt as an administrator is by using the Control Panel. You can do this by performing these steps:
- Start the Control Panel. For this, you can search for it and select the result from the top of the list. You can also refer to our guide on the different ways to open the Control Panel on your Windows device.
- Once you’re in Control Panel, set View by Large icons or Small icons.
- Locate Windows Tools and click on it.
- Next, right-click on Command Prompt and select Run as administrator.
7. How to Run Command Prompt as an Administrator Via File Explorer
There is an address bar in the File Explorer window that can be used to open Command Prompt as an administrator. In order to do this, follow these steps:
- Press the Win + E keys to launch File Explorer (see how to open Windows File Explorer for more methods.)
- In File Explorer, browse to: C:\Windows\System32.
- Go to the search bar next to the address bar and search for «cmd».
- Once you find the executable file, right-click on it and select Run as administrator.
- When UAC appears on the screen, click Yes to continue.
8. How to Run Command Prompt as an Administrator Using a Desktop Shortcut
Creating a dedicated shortcut for an elevated Command Prompt is a smart move if you often run commands requiring administrative privileges. To get started, follow these steps:
- Press the Win + E shortcut key to open the Fire Explorer window.
- In the File Explorer window, navigate to C:\Windows\System32.
- Next, type «cmd» in the search bar and hit Enter.
- Right-click on the search result, and select Show more options > Create shortcut.
- Windows will ask for your confirmation before creating it, so click Yes.
- There will be a shortcut on your computer’s desktop. To open the command prompt with admin access, right-click on it and select Run as administrator.
You can also create a custom shortcut on your Windows 11 PC. You can do this by right-clicking on your desktop and selecting New > Shortcut. In the «Create Shortcut» window, type «cmd.exe» and click Next. Specify the shortcut’s name and click Finish.
After creating the shortcut, right-click on it and select Properties. In the Shortcut tab, click on Advanced and check the box next to Run as administrator.
Once you have finished, click OK and then Apply. Your shortcut is now ready for use.
9. How to Pin the Command Prompt to the Taskbar and Open It With Admin Rights
If you’re looking for a way to make your life a bit easier when it comes to using the Command Prompt, be sure to try out this method in Windows 11.
- Open the Start menu and search for «cmd».
- Right-click on Command Prompt and select Pin to taskbar.
- Now go to the taskbar, and right-click on the Command Prompt icon.
- Right-click on Command Prompt again and select Run as administrator.
This way you will never have to worry about finding it again.
10. How to Run Command Prompt as an Administrator Using a Keyboard Shortcut
If you prefer a shortcut key, you can create it to open the command prompt as an administrator. Setting up a shortcut key is straightforward and involves a few steps. Here’s how to do it:
- Right-click on your desktop and select New > Shortcut.
- In the text box, type cmd.exe and click Next.
- On the next screen, give a name to this shortcut and click Finish.
- Now right-click on the shortcut and select Properties.
- In the Shortcut tab, go to the Shortcut key field.
- Press a key combination of your choice and click Advanced.
- Make sure to check the Run as administrator box and click OK.
- Finally, click Apply > OK, and your shortcut will be ready to use.
Just press the key combination you set to open the Command Prompt as an administrator. If you get a prompt asking to confirm the operation, click Yes to continue.
This is an easy and fast way of opening the Command Prompt as an administrator without using the search box.
Run Elevated Command Prompts Like a Pro
Running a command prompt is quite simple, but some tasks require elevated privileges. This guide will show you different methods for opening Command Prompt as an administrator without a hitch. So, check them out and let us know which method you find most useful.
Download Article
Quick guide to open the Command Prompt as an admin
Download Article
This wikiHow will show you how to open the Windows Command Prompt (also called the terminal window) as an administrator. This can be done easily if you’re logged in to a user account that has administrator privileges. Running the Command Prompt as an administrator gives you access to more commands and permissions.
Things You Should Know
- Press the Windows Key + S to open the search bar.
- Search for cmd and right-click “Command Prompt” in the results.
- Select Run as administrator.
-
1
Press the Windows Key (
) + S at the same time. This opens Windows search.
- If you’re not logged in as an administrator, check out our guide on how to log in as an admin in Windows.
-
2
Type cmd in the search bar.
Advertisement
-
3
Right-click Command Prompt
. It’s the option in the results list with a black terminal window icon.
-
4
Click «Run as administrator». This is the top option in the right-click menu.
- Click Yes when prompted, “Do you want to allow this app to make changes to this device?” This will open a window called “Administrator: Command Prompt”.
- You’re done! The Command Prompt has been opened.
Advertisement
Add New Question
-
Question
Is there a command to activate admin cmd while already in normal cmd?
You can launch a new elevated Command Prompt window with «powerShell -Command Start-Process cmd -verb RunAs». You cannot launch a new elevated prompt in the same window.
-
Question
When I click manage account on my admin account, it says manage another account and change password. What is going on?
Press the Windows key (Image titled Windowsstart.png) + S at the same time. This opens Windows search.
-
Question
How do I undo run as administrator?
Liam Townsley
Community Answer
Restart your command prompt and it will no longer be an administrator terminal.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
-
You can type help to see a list of various commands and what they do.
-
You can type /? after a command to see the help information about that command.
Advertisement
-
Be careful when running commands when running Command Prompt as an administrator. You can do permanent damage to your computer if you run the wrong command.
-
Don’t run any random command that you find on the internet. Some people will troll others by saying that you should run a command to fix a problem, but the command will actually damage your computer.
- Some commands that you should avoid running are «del», «rd», or «format», unless you know what you are doing. This list is not exhaustive though, and other commands can still be dangerous.
Advertisement
Things You’ll Need
- Administrator permissions
About This Article
Article SummaryX
1. Press the Windows Key + S.
2. Type cmd.
3. Right-click Command Prompt.
4. Click Run as administrator.
Did this summary help you?
Thanks to all authors for creating a page that has been read 183,612 times.