Project : error PRJ0003 : Error spawning 'cmd.exe'.
-
Thursday, January 12, 2006 1:05 PM
When i compile a project MFC (Visual studio 2005) with the default setting, Ihave this error message but my .exe is done and work.
Build Log Build started: Project: SuperviseurGesma, Configuration: Debug|Win32
Command Lines Creating temporary file "d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\RSP00001A24003812.rsp" with contents [ /out:.\Debug\SuperviseurGesma.exe.embed.manifest /notify_update /manifest .\Debug\SuperviseurGesma.exe.intermediate.manifest ] Creating command line "mt.exe @d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\RSP00001A24003812.rsp /nologo" Creating temporary file "d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\BAT00001B24003812.bat" with contents [ @echo Manifest resource last updated at %TIME% on %DATE% > .\Debug\mt.dep ] Creating command line "d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\BAT00001B24003812.bat"
Output Window Embedding manifest... Project : error PRJ0003 : Error spawning 'cmd.exe'.
Results Build log was saved at "file://d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\BuildLog.htm" SuperviseurGesma - 1 error(s), 0 warning(s)
All Replies
-
Thursday, January 12, 2006 1:57 PMModerator
Does this link help?
http://www.interact-sw.co.uk/iangblog/2005/09/12/cmdspawnerror
-
Friday, July 28, 2006 2:19 AMI'm seeing the exact same problem as the parent message, and I've already made sure that the path to cmd.exe is in VC++ Directories list. Any other ideas?
-
Friday, April 13, 2007 2:58 PM
The date on this post is pretty ancient. Anyway, here's what I found:
If you set your environment variables (Start > Control Panel > System : Advanced tab; click Environment Variables) to use %SystemRoot% instead of explicit paths (say, C:\Windows), MSVS 2005 does not understand %SystemRoot% or it resets its entries... ...or both. Don't just believe what the list box says; Edit the item and you'll see the differences.
What you must do is change MSVS 2005 options (Tools menu > Options > Project and Solutions > VC++ Directories) to ensure that
$(SystemRoot)
$(SystemRoot)\System32
$(SystemRoot)\System32\wbem
are specified BEFORE $(PATH).
Setting your system's environment variables to use $(SystemRoot) rather than %SystemRoot% (indeed, even using %SystemRoot%) is not a good idea: too much (MSVS 2005 as well as other applications) seems to break.- Proposed As Answer by ajinkya.kulkarni Sunday, June 14, 2009 5:51 PM
-
Thursday, September 27, 2007 3:06 PM
This Worked for me
thanks.. -
Monday, October 01, 2007 2:51 AM
Yes it worked..
Thanks.
-
Wednesday, December 12, 2007 3:19 PM
This fixed the problem I was having too.
I would like to point out to other complete noobs like myself however that if
are not in your 'Show directories for: Executable files' list in your Tools > Options > Projects and Solutions > VC++ Directories tab you have to ADD them to the list and then use the arrow button to move them up above the $(PATH) variable. (Duh!)$(SystemRoot)
$(SystemRoot)\System32
$(SystemRoot)\System32\wbem
I've done lots of projects before and I've never run into this problem until now (trying to use a new library) so I just assumed that they were already in there somewhere. When I went in to check it out after reading WeBMartians post and I saw that $(PATH) thing on the bottom of the list I just figured everything was all hunky-dory. Then I got all frustrated because it still wasn't working and I cursed the forums for the hundred millionth time for giving me information that worked for everyone but myself. (The gods of technology truly hate me.)
Then, after much gnashing of teeth, I reread his post and I actually understood what he was saying: I realized that I actually had to add these variables if they weren't there. (Doh!)
Point is: if they're not there, just add them and see if that works.- Proposed As Answer by Svenster Wednesday, December 02, 2009 11:41 PM
-
Saturday, January 12, 2008 2:06 AM
FYI, this problem arose for me after installing MSXML 4.2 SP2 SDK. It seems that installer not just added paths to the executable list in VC++ Directories, but actually removed paths as well( as the "$(SystemRoot)\system32" used to be there, then after the install, it was gone....and it's added SySWow64 in it's place, which doesn't make sense, as I'm not running x64 Windows XP and don't even have that directory on my machine.
-
Thursday, January 24, 2008 12:34 PMI have a big problem, I'm working with opengl libraries and when I compile the system saw many errors
1>Project : error PRJ0003 : Error spawning 'cmd.exe'.
Spintz wrote: FYI, this problem arose for me after installing MSXML 4.2 SP2 SDK. It seems that installer not just added paths to the executable list in VC++ Directories, but actually removed paths as well( as the "$(SystemRoot)\system32" used to be there, then after the install, it was gone....and it's added SySWow64 in it's place, which doesn't make sense, as I'm not running x64 Windows XP and don't even have that directory on my machine.
-
Tuesday, March 25, 2008 9:27 AM
This works for me, too. Thanks a lot
-
Monday, May 19, 2008 9:24 AM
This helped me too....

Make sure that if no such entry found then please enter those under executable files option....
Thanks!!
-
Tuesday, July 15, 2008 9:00 PMYes, this still works even in VS 2008.
Good job.
However, it's too bad that these things aren't kept as part of a project's own settings, ie that get saved in source safe, instead of part of the SDK/IDE's environment variables saved on a machine.
That way, when a project was downloaded from source safe, it would compile correctly the firs time. -
Friday, September 12, 2008 10:58 AMdidier_g said:
When i compile a project MFC (Visual studio 2005) with the default setting, Ihave this error message but my .exe is done and work.
Build Log Build started: Project: SuperviseurGesma, Configuration: Debug|Win32
Command Lines Creating temporary file "d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\RSP00001A24003812.rsp" with contents [ /out:.\Debug\SuperviseurGesma.exe.embed.manifest /notify_update /manifest .\Debug\SuperviseurGesma.exe.intermediate.manifest ] Creating command line "mt.exe @d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\RSP00001A24003812.rsp /nologo" Creating temporary file "d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\BAT00001B24003812.bat" with contents [ @echo Manifest resource last updated at %TIME% on %DATE% > .\Debug\mt.dep ] Creating command line "d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\BAT00001B24003812.bat"
Output Window Embedding manifest... Project : error PRJ0003 : Error spawning 'cmd.exe'.
Results Build log was saved at "file://d:\Gesma2005\SuperviseurGesma\SuperviseurGesma\Debug\BuildLog.htm" SuperviseurGesma - 1 error(s), 0 warning(s)
Hi
i am using Qt with VS 2008 version , when i am trying to build an application it is giving following error
error
error PRJ0003 : Error spawning 'mt.exe'.
can any one help me out how to solve thi sissue -
Wednesday, October 15, 2008 7:50 PM
I had this problem too: Error spawning 'mt.exe'. My code was compiling before but today this problem appeared.
I searched the hard drive for mt.exe using Windows Explorer and added the path to the list:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
There must be a cleaner way to do this using variables...Aaron
-
Thursday, October 16, 2008 6:59 PMModeratorAnd there is. Tools + Options, Projects and Solutions, VC++ Directories. Upper right combo = Executable files. The list should contain $(WindowsSdkDir)\bin in the 2nd position in the list. If it is already there, your registry got zapped.
Hans Passant. -
Thursday, October 16, 2008 7:15 PMI believe the above post should have the word NOT in it, as in "if it's not already there".
Is this correct?
Joseph Doggie- Proposed As Answer by joseph_doggie Thursday, October 16, 2008 7:16 PM
- Unproposed As Answer by nobugzMVP, Moderator Thursday, October 16, 2008 8:10 PM
-
Thursday, October 16, 2008 8:09 PMModeratorNo. If it is not already there: add it. If it is already there: panic.
Hans Passant. -
Tuesday, July 28, 2009 5:56 AMThx. That did the trick also for VS 2008.
-
Tuesday, October 27, 2009 2:20 PMThx.... Worked for me as well....
-
Wednesday, December 02, 2009 11:43 PM
This fixed the problem I was having too.
Same here. I am actually on MS VS 2008. I think what broke it was that I installed MS VS 2010 beta 2, Putting the $(SystemRoot) etc back in did the trick.
I would like to point out to other complete noobs like myself however that if
are not in your 'Show directories for: Executable files' list in your Tools > Options > Projects and Solutions > VC++ Directories tab you have to ADD them to the list and then use the arrow button to move them up above the $(PATH) variable. (Duh!)$(SystemRoot)
$(SystemRoot)\System32
$(SystemRoot)\System32\wbem
I've done lots of projects before and I've never run into this problem until now (trying to use a new library) so I just assumed that they were already in there somewhere. When I went in to check it out after reading WeBMartians post and I saw that $(PATH) thing on the bottom of the list I just figured everything was all hunky-dory. Then I got all frustrated because it still wasn't working and I cursed the forums for the hundred millionth time for giving me information that worked for everyone but myself. (The gods of technology truly hate me.)
Then, after much gnashing of teeth, I reread his post and I actually understood what he was saying: I realized that I actually had to add these variables if they weren't there. (Doh!)
Point is: if they're not there, just add them and see if that works. -
Thursday, December 03, 2009 12:14 AMNow I know what happened: Look at PATH env var: C:\Program Files (x86)\CMake 2.8\bin;C:\Program Files (x86)\ZipGenius 6\Very genius, Zip genius! You destroyed my PATH! Npw how am I supposed to get _that_ back?
-
Thursday, February 11, 2010 7:16 PMThis worked for me. Thanks
-
Monday, April 05, 2010 8:23 AM
works fine. Thanks
-
Saturday, June 26, 2010 7:33 PMThanks... worked for mandarup@
-
Tuesday, September 07, 2010 1:50 AMI had the same problem whenever I start debugging my cpp files...Thanks God you have mentioned that if the $(SystemRoot)......are not there, it should be added for it to work. Mine worked just fine now, beacuse of that! Thanks again...;)
-
Friday, September 24, 2010 1:22 AM
What about if you have Visual studio 2008
-
Monday, November 08, 2010 7:42 PM
Read above posts. Adding these three (after seeing they didn't exist) where they belong worked for me--Visual Studio 2008. Just uninstalled Visual Studio 2010 (running side-by-side). %SystemRoot% type variables wasn't seen, but good to keep a close eye out for that, too.
$(SystemRoot)
$(SystemRoot)\System32
$(SystemRoot)\System32\wbemBump for great fix!
-
Tuesday, December 20, 2011 4:10 PM
i have same error "error spawning 'cmd.exe'" or whateva and i dont have the folders "Options > Projects and Solutions > VC++ Directories" but i do have the folders tools and that but in tools ihave only got a command prompt please help as soon as possible,
thankyou
-
Wednesday, January 04, 2012 5:18 PM
Hi to all guys,
i read this topic and some other related to this problem, but these solutions are not valid for my case.
I have this error only if i create a new VC++ project.
If i open some existing project i can build correctly as ever i do, so it means that all variables are correctly set.
Can someone help me to find a good way to approach this problem?
I cannot reinstall the OS or the Visual studio, so please, don't suggest me that..
Thanks in advance!
http://www.mrhyde.altervista.org -
Wednesday, January 04, 2012 9:11 PM
I found how to avoid that error, but i still don't understand why it appears.
The error is due to manifest tool. If i select to not embed the manifest, i can build my new project, else i cannot.
Any ideas?
http://myitside.blogspot.com -
Wednesday, February 01, 2012 6:11 PM
So I know this post is pretty old, but Im hoping someone will see this and offer another solution. Im getting the same error - "Project : error PRJ0003 : Error spawning 'cmd.exe'." but I've applied the above solutions and I still get the error message.
The last 5 lines of my directories list are:
$(SystemRoot)
$(SystemRoot)\System32
$(SystemRoot)\System32\wbem
$(SystemRoot)\SySWow64 (I've tried deleting this one, no help there)
$(PATH)I'm running Visual Studio 2008 on Windows 7 64bit
Anyone have any suggestions?
-
Wednesday, February 01, 2012 7:10 PMSo after much aggravation I figured out the problem and thought I should post it here in case someone else down the road is in the same situation as I am. If you are making a win32 console application like I am and you are running a 64bit version of windows you have to add the x64 platform to your project. Well when you are editing the directories like the posters above suggest you may notice a platform drop-down menu. When you switch to x64 the directories list changes and both directories have to have the path for cmd.exe so once i added them to x64 my project compiled.
-
Monday, June 11, 2012 11:58 AMThis is helpful!!!

