Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spawning cmd.exe error in vs2008

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?

like image 273
Cute Avatar asked May 21 '09 12:05

Cute


3 Answers

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

like image 171
aJ. Avatar answered Nov 03 '22 23:11

aJ.


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
like image 3
silwar Avatar answered Nov 03 '22 22:11

silwar


http://www.interact-sw.co.uk/iangblog/2005/09/12/cmdspawnerror

like image 1
yesraaj Avatar answered Nov 03 '22 21:11

yesraaj