1

I recently installed Visual Studio Code and as soon as I try to run a terminal window I get this error

The terminal process command 'C:\WINDOWS\System32\cmd.exe' failed to launch (exit code: 2)

This also happens for PowerShell terminals

I have read many forums where this is asked and try the "solutions" mentioned there but none of that work.

asked Feb 18, 2019 at 19:12

2 Answers 2

1

In my case the issue was with the antivirus since it doesn ́t allow a process (Visual Studio Code) to create/spawn a new process like the command prompt (Terminal)

To solve it make sure you configure your antivirus to exclude Visual Studio Code or stop all of the antivirus services --at you own risk--

To stop the Symantec Endpoint Protection use the following sequence of commands in a .bat file

cd C:\Program Files (x86)\Symantec\Symantec Endpoint Protection
smc.exe -stop
pause
answered Feb 18, 2019 at 19:12
0

Check if the machine has enough free memory. I had the same issue and it went away after closing some unnecessary application.

answered Mar 5, 2019 at 21:02

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.