FacebookTwitterLinkedIn

How to Fix "System error 5 has occurred" on Windows 10

How to Fix "System error 5 has occurred. Access is denied." Command Prompt Error in Windows 10 & 7

You can use the Command Prompt application to execute over 280 commands. When using Command Prompt, you may have encountered the "System error 5 has occurred" error, which states that access to execute a particular command is denied.

System error 5 has occurred

System error 5 has occurred. Access is denied

This error usually occurs when you execute a command requiring you to run Command Prompt with administrative privileges. It is sometimes not enough to be logged into a Windows account as an administrator - you also need to use an elevated Command Prompt.

It is easy to ascertain if the Command Prompt window you have opened is elevated or not. If the window title is "Command Prompt," it is NOT elevated; If the window title is "Administrator: Command Prompt," it IS elevated.

To launch an elevated Command Prompt, you need to perform one additional step (possibly more, depending on how you started Command Prompt).

This guide describes how to open Command Prompt as an administrator in Windows 7 & 10 and gain access to commands that require administrative privileges, thus bypassing the "System error 5 has occurred" error.

Note that these methods will only work if you use an administrative Windows account.

Video Showing How to Bypass "System error 5 has occurred" Error in Windows 10 & 7:

Table of Contents:

How to Bypass the "System error 5 has occurred" Error in Windows 10

The easiest way to run Command Prompt as administrator is probably by using Windows Search. Type "command prompt" in Search and right-click on the "Command Prompt" result. Choose "Run as administrator" to run it with administrative privileges.

fix system error 5 has occurred in windows 10

When you select "Run as administrator", a User Account Control prompt will appear asking if you would like to allow the Command Prompt to make changes to your computer.

Click "Yes". Now you can start executing commands, and the "System error 5 has occurred" error will no longer occur.

fix system error 5 has occurred in windows 10 step 2

Another way to run Command Prompt as administrator is to launch it from File Explorer. Open File Explorer (you can usually find its icon in the Taskbar). Navigate to "Local Disk (C:)", and then "Windows" and "System32". In this folder, look for the "cmd.exe" application.

Right-click on it and select "Run as administrator" to open Command Prompt with administrative privileges.

fix system error 5 has occurred in windows 10 step 3

The third way to run Command Prompt as an administrator in Windows 10 is to launch it using Task Manager. To open Task Manager, type "task manager" in Search or press Ctrl + Shift + Esc keys on the keyboard. Once Task Manager is opened, click on "File" and choose "Run new task" from the drop-down menu.

If you do not see the File menu, you may have to click on the "More details" arrow at the bottom of the Task Manager window to show a more advanced view of the program, including the File menu.

fix system error 5 has occurred in windows 10 step 4

The 'Create new task' window will appear. Type "cmd" in the dialog box and then mark the "Create this task with administrative privileges" checkbox. Click "OK", and it will open elevated Command Prompt.

fix system error 5 has occurred in windows 10 step 5

[Back to Table of Contents]

How to Bypass the "System error 5 has occurred" Error in Windows 7

If you are using Windows 7, click the Start menu icon on the left side of the Taskbar and type "command prompt" in search. The Command Prompt result will appear - right-click it and select "Run as administrator" from the contextual menu.

fix system error 5 has occurred in windows 7 step 1

User Account Control will ask if you want to allow the following program to make changes to this computer - click "Yes", and an elevated Command Prompt will be launched.

fix system error 5 has occurred in windows 7 step 2

Another way to run Command Prompt as administrator and bypass the "System error 5 has occurred" error in Windows 7 is to run Command Prompt from Windows Explorer. Go to "Local Disk (C:)" (or another disk where the Windows system files reside), and then go to the Windows folder and find the System32 subfolder.

In the System32 folder, scroll down until you find the "cmd" executable file. Right-click it and select "Run as administrator" from the contextual menu.

fix system error 5 has occurred in windows 7 step 3

We hope this guide was helpful and that you were able to bypass the "System error 5 has occurred" error and run Command Prompt as an administrator in Windows 7 & 10.

If you have any other questions relating to this topic, do not hesitate to leave a comment in the section below.

[Back to Top]

▼ Show Discussion

About the author:

Rimvydas Iliavicius

Rimvydas is a researcher with over four years of experience in the cybersecurity industry. He attended Kaunas University of Technology and graduated with a Master's degree in Translation and Localization of Technical texts. His interests in computers and technology led him to become a versatile author in the IT industry. At PCrisk, he's responsible for writing in-depth how-to articles for Microsoft Windows. Contact Rimvydas Iliavicius.

Our guides are free. However, if you want to support us you can send us a donation.

About PCrisk

PCrisk is a cyber security portal, informing Internet users about the latest digital threats. Our content is provided by security experts and professional malware researchers. Read more about us.

Malware activity

Global malware activity level today:

Medium threat activity

Increased attack rate of infections detected within the last 24 hours.