spawning cmd.exe error in vs2008

12,385

Solution 1

yes i hav found where the proble. I unable to locate path of cmd.exe so go to visualstudio tools->options->projects and ->vc++ directories and specify ($SystemRoot)/system32 then it working fine.

Solution 2

Check if cmd.exe is in <Path> environment variable?

I just did a small test by removing the %SystemRoot%\system32 from path environment variable and I got the same problem what you are facing.

Error 4 Error spawning 'cmd.exe'. Project SEH

If it is the path issue then try adding below to Projects and Solutions -> VC++ Directories:

$(SystemRoot)\System32

Solution 3

If you get error like this

Just open Tools –> Options –> Projects and Solutions –> VC++ Directories

and add these lines :

  1. $(SystemRoot)\System32
  2. $(SystemRoot)
  3. $(SystemRoot)\System32\wbem
Share:
12,385
Cute
Author by

Cute

Updated on June 16, 2022

Comments

  • Cute
    Cute over 1 year

    I have created a simple vc++ console application and try to print "Hello World". I am using Windows Server 2003 machine.

    When I try to build this project I got the error as Error: spawning cmd.exe

    How do I fix this?