[Guide] Different Ways to Open Command Prompt as Administrator in Windows

Many times we need to open Command Prompt window as Administrator in Windows which is also called as "Elevated Command Prompt" window. By default when you launch a Command Prompt window, it opens in a restricted mode i.e. some advanced commands can't be executed in this mode. It happens to prevent accidental execution of some advanced commands which can interact with Windows boot loader, etc.

But there are situations when you might need to open Command Prompt window as Administrator so that you can execute those restricted commands such as enabling hidden Administrator account in Windows, fixing Windows 7 boot screen, etc.

Today in this tutorial, we are going to share some easy ways to quickly launch Command Prompt window as Administrator. There are methods available for almost all Windows versions including Windows XP, Vista, Windows 7, Windows 8 and later.

So without wasting time lets start the tutorial:

1. Open Command Prompt as Administrator from Start Menu

This method will work in all Windows versions except Windows 8 and later as Microsoft has removed Start Menu from Windows 8.

1. Click on Start button or Start ORB and go to All programs -> Accessories.

2. Now right-click on Command Prompt shortcut and select "Run as Administrator" option.


You can do the same for any Command Prompt shortcut whether its pinned to Start Menu, Taskbar or placed at Desktop.

2. Open Command Prompt as Administrator using Start Menu Search

This method will only work in Windows Vista and Windows 7 as these are the only Windows versions which come with Start Menu search functionality.

1. Click on Start ORB and type cmd. It'll show cmd.exe in search results.


2. Don't click on the shortcut. Press and hold Ctrl and Shift keys and then press Enter. It'll open Command Prompt with Administrator privileges.

3. Open Command Prompt as Administrator using Windows 8 "Win+X" Menu

Both above mentioned methods will not work in Windows 8 but Windows 8 comes with some other easier methods to launch Command Prompt window as Administrator. One of them is using the new "Win+X" menu which can be accessed either by right-clicking on bottom-left corner of screen or by pressing Win+X keys together.


This menu contains a direct shortcut to launch Command Prompt as Administrator.

4. Open Command Prompt as Administrator using Windows 8 Start Screen

This is another method to open Command Prompt as Administrator in Windows 8. We all know that Microsoft has replaced Start Menu with new Start Screen in Windows 8. We can launch Command Prompt as Administrator using this new Start Screen as well.

1. Go to Start Screen in Windows 8 by pressing Win key and then type cmd.

2. Windows will show Command Prompt in search results page. Right-click on the shortcut and select "Run as administrator" option given at the bottom.


5. Open Command Prompt as Administrator using Windows 8 Explorer

Windows 8 Explorer comes with Office 2010 style Ribbon UI and Microsoft has added an option to launch Command Prompt in this ribbon.

1. Open Windows Explorer and go to a drive or folder.

2. Now click on File menu present in the ribbon and select "Open command prompt -> Open command prompt as administrator" option.


6. Open Command Prompt as Administrator using Secret Task Manager Trick

This method works in all Windows versions. Its a hidden feature of Windows which allows you to launch Command Prompt with Administrator privileges using Task Manager.

Check out following tutorial to learn more about this secret feature:

Hidden Secret Trick to Open "Command Prompt" Window Using Task Manager

7. Always Open Command Prompt as Administrator

If you want to always open Command Prompt window as Administrator, you can follow these simple steps:

1. Right-click on Command Prompt shortcut and select Properties.

2. Now click on "Advanced" button present in "Shortcut" tab.

3. Enable "Run as administrator" option and apply the changes.


4. That's it. Now Command Prompt window will always open with Administrator privileges.

PS: If you want, you can enable hidden built-in Administrator account in Windows and then you'll always have Administrator privileges for all tasks:

How to Enable / Activate Hidden Administrator Account in Windows?

That's it. These are the different ways to open Command Prompt as Administrator in Windows. If you know about any other method, feel free to share it in your comment...

Share this article: Facebook | Twitter | Google+ | Reddit | Tell a friend

Posted in: Windows 7, Windows 8 / 8.1, Windows Vista, Windows XP

Other similar articles that may interest you


  • Nice Ways VG~
    but I have a problem with CMD
    every time I use cmd, it showing an error message like
    " 'copy' is not recognized as an internal or external command,operable program or batch file."

  • VG

    ^^ Does the same error appear every time you open Command Prompt? Or does it appear only when you try to execute copy command?

  • how about the easiest way: hit the Windows key, type cmd, right click and select run as administrator

  • Yes, It appears every time. but the error never shows when I open Command Prompt Directly (double click) from the "System32" folder.

  • VG

    ^^ It seems some extra parameters have been added to Command Prompt shortcut in your Windows. Try to create a new shortcut.

    Its mentioned in point 2 in an easier way. ;)

  • "Press and hold Ctrl and Shift keys and then press Enter."
    So handy using cmd daily so running it as admin by holding 2 keys is extremely handy :P
    Thanks for this info :D

  • On taskbar (pinned win8 win7)
    Type cmd after pressing start button in keyboard Ctrl Shift Enter.
    Ctrl Shift Enter to shortcut in quick launch -vista- (not sure about it...)


    Use batch to exe converter programs (one of them shared here before...)
    -Open notepad type start and save it as admin.bat
    -Put it to batch-to-exe program, check run as admin button in program
    -Convert it and copy admin.exe file into windows directory (%windir%)
    -type admin and hit enter in startmenu-run box-task manager-

    Easiest Way To Open As Admin
    *** Turn off User Account Control ***

  • VG

    ^^ Thanks for your input. :)

    You are welcome. :)

    Open Command Prompt shortcut Properties and post here what values following fields contain:

    Start in

  • Thanks VG, But I don't use Shortcuts for cmd,
    I Execute CMD from the Folder Context Menu.

  • VG

    ^^ What value following key contain:


  • HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command cmd.exe /s /k pushd "%V"

    HKEY_CLASSES_ROOT\Directory\shell\cmd\command cmd.exe /s /k pushd "%V"

  • VG

    ^^ Looks fine. Need to investigate more. Do you get that error message only when you select Command Prompt shortcut from folder context menu or are there other locations too such as files context menu, etc?

  • VG

    ^^ What do you mean by yes? Please provide proper details.

  • Sorry!. I mean the error comes in all other locations context menu.

  • VG

    ^^ Please post the value of PATH environment variable. You'll find this variable in same location of TEMP variable:


  • Your Right VG~
    The PATH Environment Variable has been set to "C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\"

    and I Was changed the value to "C:\Windows\System32" . now the problem is solved ..

    Lots of Thanks VG~!
    Good Luck.

  • I m facing a prblm that whenever i plug in pendrive and try to open it opens C drive why this is happening help me plz...

  • VG

    ^^ Right click on the drive icon and select Explore command. Does it also open C: drive?

  • Yes... By exploring it again open C drive.

  • VG

    ^^ Try to disable AutoPlay from Control Panel and it should fix the problem. I think an autorun.inf file exists in your USB drive which is causing this problem.

  • I was searching different ways to open CMD and finally found them ...Thanks for the post...

  • can windows8 be reinstated via command promt

  • I have the problem where I use a batch file to create a directory on the C:\Program files. In Win-7 is gives an "Access Denied" error. If I use the Admin cmd prompt it works fine. Is htere a way to set the CMD promt with a batch file to allow an admin to open a CMD window in Admin mode, create the folder in the program files, copy the application into the new folder, then set the regestery key back as it was originally?

    I hat to start putting our company applications in other locations than the Program Files folder just because they load easier... This was not an issue in XP.

    Thanks for any help...!

  • VG

    ^^ Did you try to enable "Run as Administrator" option in batch file Properties?

  • but i have no access of administrator so how can i unlock?

  • Hi VG is there a way we can have multiple runas items in registry.

    Like have Folder\shell\runas

    But command in the Folder key take precedence over and right click only shows the command in Folder key.

  • my system cannot find the path specified. how to solve this

  • hi!

    I wanna ask that can I pass domain user ID and Password to call and exe with domain admin right on limited acess user account.

    It like Run As Administrator option in windows. But I dont wanna user interaction to put user id and password.


  • It could be demostrated mit graphic. Steps 1.2.3. etc

  • so my gramps was on his computer yesterday and it just shut down. he restarted it and came to find out that his password for his admin account is not working. i have no idea how to fix it. i can't run anything as an admin

  • Hey VG,
    So I like method 7. Always Open Command Prompt as Administrator.
    Now how to bypass UAC prompt without turning it off? Is it possible?

  • VG

    ^^ You can try following:


  • Hi VG...
    The first link is what I was looking for! Thanks so much for your nice and helpful advices as always!

  • Just an addendum to this command prompt problem.
    The Shift + Right Click or even File, command prompt does not work if the user is actually in the Library Folders. I originally thought I had a bug in Win 8 until I navigated down through the tree to the real file location. As a 40 year + veteran of computers it still makes me wonder why the 'Libraries' were introduced at all. I have come unstuck a few times trying to do something commonplace only to discover those actions don't apply to 'Libraries"

  • i ma trying to know my pc details through cmd. i have typed systeminfo in command application but every time same thing display like 'systeminfo is not recognized as an internal or external command.
    kindly help me asap.
    kindly send me a mail for this solution.

  • Your instructions are no help at all. I used #2 above for Windows 7, but you give no clue as to what I do next once the administrator box appears. What the hell do I do then???

  • I have forgotten my administrator password, now I want to remove it but I am stuck nobody can do that. Please guide me

  • Hello VG...
    please how i can open CMD from BIOS 'cause i've deleted my Windows 8 partition and i've faced a problem in installing Windows 7
    Plzzzzzzzzzzz help me

  • VG

    ^^ You cant open CMD from BIOS but you can boot using Windows setup disc or USB drive and then you can access Command Prompt.

  • Thanks for replying VG :) ...
    yeah by holding Shift+F10 in the opening of the setup BUT that's Command prompt and i need to access to " Command Prompt Administrator privileges "
    Please any help ...

  • VG

    ^^ I think if you open Command Prompt using repair options in Setup, it launches it as Administrator.

  • Yep you're so right....i've fixed the problem....thank u so much for your help VG
    i really apperciate that...thanks alooooooooot !!

  • 2 days trying to find the solution, so I want to thank very much for your help.

  • hi, please i need help.i have a toshiba laptop and just upgraded to windows 10.I need something to enter into the administrator command prompt dialogue box.Please can you give me.Thank you

  • I am having one issue with running a command prompt as administrator and cannot seem to find an answer. I have startup scripts that run when I log in (batch files in Startup folder). When I open a command prompt normally, everything from my startup scripts has already happened. But if I right click and select run as administrator, nothing from my startup scripts has occurred.

    For example, suppose one of the things my startup script does is mount a drive T. When I open a command prompt and type T:, it goes to the T drive. When I open a command prompt and type T: it says "The system cannot find the drive specified". I have tried everything I can find and nothing works other than manually triggering the scripts (either by typing the command or by creating a shortcut with as admin and the /k to execute the script).

    Note that once I login and open a command prompt as administrator and manually force the scripts to run I am able to close the command prompt and later open it again without needing to manually do this again. It appears that the startup scripts run for my user when I log in but are not also applied to the elevated version of my user on startup.

    Is there an automated way to make all of my startup scripts not only apply to my user but also to my user with elevated privs so that when I open a command prompt as administrator the first time after rebooting all of my startup scripts have already run?

    I am by no means a Windows expert, so I apologize if the answer is obvious. I am used to a WinXP environment and am not familiar with these aspects of Windows.

    Thanks in advance for any advice.

  • VG

    ^^ Did you try to enable the option "Run as Administrator" in batch script shortcut's properties?

  • But how can I have a batch script to run cmd or any other program as admin, and which will work in all other PCs???

  • Right click Winlogon.exe process in Task Manager -> Services and choose "Perform Administrative Tasks".

    Now Control -> New Task or New Task -> cmd -> Enter opens Command Prompt in administrative mode.

    There is no other way.

  • ahoj funguje metoda 4,stahnete si soubor fix a restartujte pc a uz to pujde

  • I have locked my pc up so bad that I ran system recovery now I have to start my pc with a power on pass word than it tells me that it cant reinstall windows because it is locked in safe mode I can get back to command prompt but it needs my administrator pass word put in every pass word I know but thay are all incorrect any help would be great !!!

  • VG

    ^^ Try method 3 of following tutorial:


    You can also try method C given in following article:


  • Stick this at the beginning of your cmd or batch file and it will pop up the UAC box and you just click ok and away you go. I do not take credit for creating this...only for finding it ;)

    REM --> Check for permissions
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
    ) else ( goto gotAdmin )
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    exit /B
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"

Leave a Comment