How to run Command Prompt (cmd.exe) as administrator in Windows 10/11?

When I run chkdsk in cmd.exe, I get the "Access Denied as you do not have sufficient privileges or the disk may be locked by another process. You have to invoke this utility running in elevated mode and make sure the disk is unlocked." prompt. What does this mean and how can I fix it?

The Command Prompt (cmd.exe) is a command line interpreter on the Windows operating system, which is used to execute command line programs. Some command line applications (such as chkdsk) require us to run it in an elevated command prompt (cmd.exe), this tutorial will show you how to to run Command Prompt (cmd.exe) as administrator in Windows 10/11.

 

Tutorial to run Command Prompt (cmd.exe) as administrator in Windows 10/11.

1. Type "cmd" in the Windows search bar.

2. In the search results, right-click on "Command Prompt", and then select "Run as administrator".

rum cmd.exe as administrator

 

3. You will get the promp "Do you want to allow this app to make changes to your PC?".

allow cmd.exe to run

 

4. Click "Yes", and then the elevated Command Prompt will be opened.

elevated command prompt

 

 

Frequently Asked Questions

Q: What is an elevated Command Prompt and why do I need it?

A: An elevated Command Prompt runs with administrator privileges, giving you access to system files and commands that require elevated permissions. Some disk utilities like chkdsk, diskpart, and system repair commands require admin rights to function properly.

Q: How can I tell if Command Prompt is running as administrator?

A: An elevated (admin) Command Prompt window will display 'Administrator: Command Prompt' in the title bar. A regular Command Prompt just shows 'Command Prompt'. Additionally, the command prompt path will show 'C:\Windows\System32' for admin mode.

Q: Can I use keyboard shortcuts to run Command Prompt as admin?

A: Yes, press Win+X to open the power menu, then press A to open an elevated PowerShell (or you can configure Command Prompt in Settings). You can also press Ctrl+Shift+Enter after typing 'cmd' in the Start menu search.

Q: What should I do if the 'Run as administrator' option is grayed out?

A: This usually happens if your user account doesn't have admin privileges. Contact your system administrator to get elevated access. On home computers, you may need to enable the hidden Administrator account or ensure your account has admin rights.

Q: Can I run other programs as administrator using similar steps?

A: Yes, the same method works for any program. Right-click on any application in the Start menu or Windows Explorer and select 'Run as administrator'. Many system utilities and disk management tools require admin privileges to function.

Q: Why does Windows ask 'Do you want to allow this app to make changes to your PC?'

A: This is Windows User Account Control (UAC) prompt. It appears when you try to run something with elevated privileges. Click 'Yes' to proceed with admin-level commands. This security feature helps prevent unauthorized system changes.

Q: Is there a way to always run Command Prompt as administrator?

A: Yes, you can right-click the Command Prompt shortcut, go to Properties, then Shortcut tab, and click 'Advanced' to check 'Run as administrator'. Or you can create a shortcut with this setting for quick access to elevated cmd.

Q: What's the difference between Command Prompt and PowerShell?

A: Both are command-line interpreters, but PowerShell is more modern and powerful. PowerShell can run all cmd commands and has additional features. On Windows 10/11, right-clicking Start gives you quick access to Windows PowerShell (Admin) as the default admin terminal.