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

8,209

Solution 1

I've fixed it by deleting the whole settings folder at %APPDATA%\Code\. Removing any reference about the terminal from %APPDATA%\Code\User\settings.json didn't do anything.

Of course doing this will completely reset VS Code but you won't have to reinstall the plugins.

Solution 2

if you facing the above problem then Sol is below:

  1. Uninstall your python from the windows,but when you uninstall the python then it completely not going to uninstall, so you have to separately uninstall "Python Launcher".

  2. Uninstall Microsoft visual code.

  3. Re-start your machine.

  4. again install the python with default setting.

  5. again install Microsoft visual code with default setting.

and then create the folder and file in visual code, create first program to for "Hello World" and click run your terminal get executed....

My Problem get resolved by this.......

Note :- don't for get uninstall "python launcher".

Share:
8,209

Related videos on Youtube

Kris1105
Author by

Kris1105

Updated on September 18, 2022

Comments

  • Kris1105
    Kris1105 over 1 year

    Yesterday while working in VScode an error suddenly popped up:

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

    Now I cannot use the integrated terminal of VScode anymore. It always crashes when I try to open it. When I enter cmd.exe in the windows command line it still works.

    I was working on a batch file (from which the code can be seen in in the first picture) when it first occured.

    Any ideas on how I might resolve this? I tried reinstalling VS code but this did not work. I browsed different forums but I have not found a solution yet. I am pretty new to programming in general and think I might have altered something with my batch file without me knowing?

  • Kris1105
    Kris1105 over 5 years
    Sorry for the late reply, this fixed it for me! thank you very much for your time.
  • Mauricio Gracia Gutierrez
    Mauricio Gracia Gutierrez about 5 years
    I have tried this and did not solve anything