System error 5 has occurred error is a Windows-related error that is generally related to the unmet privileges for the specified command. Some commands or operations require Administrative privileges in order to complete successfully. If the Administrative privileges are not provided this “system error 5 has occurred” error displayed.
“System error 5 has occurred” Error
The most well known case for this error is trying to create a new user via the MS-DOS command line interface. If the current user is not Administrator or not running the MS-DOS command line interface as Administrator, this error occurs.
net user test /add
Solve For MS-DOS Command Line Running As Administrator
As the main cause for the “System error 5 has occurred” is non-Administrative privileges we should start the MS-DOS command line interface as Administrator to solve it.
- Click to the Start Menu like below.
ms-dosto the search bar.
- The Command Prompt or MS-DOS listed like below.
- Click to the
Run as administratorlike below.
For alternative ways and more detailed usage take a look to the following tutorial.
Solve For Batch File Running As Administrator
It is not always an interactive way using the MS-DOS command line interface. In some cases we may execute the batch file which throws the “system 5 error has occurred”. So to solve this error in batch files the batch files should be executed as Administrator.
- First right click to the batch file which has extension
*.bat.In the context menu click to the
Create shortcutin order to create shortcut.
- Then right click to the created shortcut and select the
- In the
Shortcuttab click to the
Advanced...button like below.
- Then check the
Run as administratorcheckbox like below and click
- In the Properties windows click to
Applyto make the new configuration effective.