Are you getting the “system error 5 has occurred” error message when you try to run a command in command prompt?
If yes, this post will help you fix the problem.
The error message that flashes on your screen will be something like this.
This error occurs when you don’t have the privileges or access to run the command that you’re trying to run. As a result you get the error instead of a confirmation that the command was successfully executed.
This error occurs with more intrusive and intricate commands. An example is net user commands. You can also get this error with commands associated with network shares.
Windows 7 is the first version with which this error was reported. It also occurs with later versions, including Windows 10.
In nearly every case, the root cause is lack of administrative privileges to run the necessary command. Kindly note that occurrence of this error doesn’t mean you’re not logged in with the administrative account. It implies the Command Prompt doesn’t have administrative rights. And that’s the reason why the command couldn’t run.
Some commands require you to use not only an administrator account but also command prompt with administrative rights or privileges.
More often than not, users open the Command Prompt by typing cmd in the run dialog box. However, doing so opens Command Prompt without administrative privileges.
To fix the issue, all you need to do is run the command in an elevated command prompt with administrative privileges. You can open an elevated command prompt by following the steps listed below.
For Windows 7
- Click the Windows icon in the task bar
- Type cmd in the Start Search box, right-click the cmd.exe entry in the search results and click Run as administrator
- In case you are asked to confirm this action, do that.
For Windows 8, 8.1, and 10
- Press Window + X on the keyboard to open WinX Menu
- Find and click Command Prompt (Admin)
- A pop-up window may open on your screen. If it does, just confirm your action