Your ComSpec environment variable is wrong. It should be ComSpec=C:\WINDOWS\system32\cmd.exe.

You have to fix it using the environment variable UI. In the start menu type 'environment`, you should get this option

Click on the following button:

You should see ComSpec in the System Environment variable section:

Fix that, then close and re-open all instances of VS Code.
Originally posted by @karrtikr in #20339
Originally posted by @karrtikr in #20339