While running a command in Windows Terminal, Command Prompt or PowerShell, if you get Process exited with code 1 error message, you can follow these suggestions to get it resolved.
What does Process exited with code 1 mean?
If Windows Terminal displays the Processes existed with code 1 error message, it implies that the corresponding process has shut down unexpectedly. A command always assigns itself to a process, and if the process stops running suddenly, you may find this error on your computer. That is why it can happen with any command and any app.
Process exited with code 1 error in Windows Terminal, PowerShell or CMD
To fix the Processes exited with code 1 in Windows Terminal on Windows 11/10, you need to follow the below steps. The primary solution is to remove the Autorun String value from the Registry Editor. However, there are other suggestions too:
- Update Windows Terminal, PowerShell or CMD.exe
- Try with Administrator rights
- Delete Autorun from Registry
- Delete Autorun String Value using PowerShell
To learn more about these steps, continue reading.
1] Update Windows Terminal, PowerShell or CMD.exe
It is the very first thing you need to do when you get the Process exited with code 1 error on your computer. If Windows Terminal has some internal conflicts, the same error might occur. For example, if you are using Windows Terminal on a Beta, Dev, or Release Preview Channel, a bug might be responsible for this error. In such situations, it is wise to search for an update if there is any. If an update is available, it is recommended to install it as soon as possible in order to get rid of this error. You may check your installed Terminal version from Terminal Settings > About, and the latest release on GitHub and update it if needed.
PowerShell and the Command Prompt are updated along with Windows Updates, and so all you need to do is keep Windows updated. However, you can also download PowerShell directly from GitHub by following this link.
2] Try with Administrator rights
Some commands cannot be executed without administrator privilege. If you are trying out such a command without administrator rights, you might encounter the same error. That is why it is recommended to open Windows Terminal with administrator permission and execute the same command. To open Windows Terminal with admin rights, follow these steps:
- Press Win+X to open the WinX menu.
- Select the Windows Terminal (Admin) option.
- Click on the Yes button on the UAC prompt.
- Enter the command you want to execute.
Similarly, you may run PowerShell or CMD as admin and see if it helps.
3] Delete Autorun from Registry
The main reason behind this error is the unnecessary Autorun Sting Value in the Windows Registry. That is why it is recommended to delete it in order to resolve the problem. To delete the Autorun from Registry, follow these steps:
Press Win+R to open the Run prompt.
Type regedit > press the Enter button > click the Yes button.
Navigate to this path:
Right-click on the Autorun String value and select Delete.
Click on the Yes button.
Restart your computer and enter the same command.
You won’t find any problem now.
4] Delete Autorun String Value using PowerShell
It is possible to delete the Autorun String value using PowerShell. In this case, you do not need to open the Registry Editor or find any value, as mentioned above. You can open the PowerShell with administrator privilege and enter the following command:
C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f
Finally, close the PowerShell window and restart your computer to get the change.
Termination behavior can be configured in advanced profile settings
If you see the message Termination behavior can be configured in advanced profile settings when Windows Terminal exits, you can open Terminal > Profiles > Defaults and under Additional settings > Advanced, you can change the profile termination behavior.
That’s all! Hope you have found it helpful.
Read: Windows cannot find wt.exe; Windows Terminal not opening.