We are using Windows Terminal, PowerShell or CMD and suddenly it appears Process closed with error code 1 What can we do? Solving this annoying inconvenience is relatively simple, we have several methods to achieve it and a little further down we will tell you about all the ones that we can apply.

Fix Process closed or terminated with code 1 error in Windows Terminal, PowerShell or CMD

Update Windows Terminal, PowerShell or CMD

The first thing we have to try when the process with error code 1 appears on our computer is this. If Windows Terminal has some internal conflicts, the same error can happen. For example, if we use Windows Terminal in a Beta, Dev, or Release Preview channel, etc. In these situations it is best to check if there is an update available, thanks to an update we can solve this problem quickly.

In order to check if your installed version of Windows Terminal is the latest available or there is a new one, go to Settings (Windows + i) then Terminal > About, and the last version from GitHub should be installed, if it is not, we will update if necessary.

In the case of PowerShell and Command Prompt, they are updated along with Windows updates. Therefore, the only thing we need to do is keep the operating system up to date. Although we can also download PowerShell directly from GitHub from this link.

Run with administrator permissions

Various commands cannot be executed without administrator privileges. Therefore, it is feasible that we will find this error if it is the case. For this reason, the ideal is to run the Terminal, PowerShell or CMD with administrative privileges, this is achieved easily.

  • We press Windows + X.
  • We choose Windows Terminal (Admin).
  • Now let’s click the “Yes” button on the UAC prompt.
  • We can now enter the command we want.

In the same way we can do with PowerShell or CMD to execute them with administrator permissions.

Clear autorun registry

One of the main reasons behind this problem is the totally unnecessary value of Autorun Sting in Registry Editor. That’s why we recommend removing it to solve the problem.

  • Press Windows + R to open the “Run” window.
  • Now we are going to type “regedit” without the quotes and press “Enter”.
  • In the Registry Editor, we are going to have to navigate to the following path from the left sidebar.

HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor

  • Next, we will right-click on the Autorun Strig value and choose Delete.
  • We click on “Yes”.

To finish, we are going to have to restart the computer and check if the error is gone, which is quite likely.

Remove autorun string value with PowerShell

We can remove the Autorun String value using PowerShell. In this case we do not need to open the Registry Editor, we are simply going to open PowerShell with administrator privileges as mentioned above, copy and paste the following command.

C:WindowsSystem32reg.exe DELETE “HKCUSoftwareMicrosoftCommand Processor” /v AutoRun /f

To finish, we close the PowerShell Window and proceed to restart the computer to solve the problem.

Write A Comment