Ask a questionAsk a question
 

AnswerError spawning 'cmd.exe'

Answers

  • Thursday, January 26, 2006 9:19 PMJaeger Mitchell Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    CMD.exe should have been found in your path. 

    I'm running into the same problem, but i've also found that system commands like ipconfig.exe won't run unless I'm in the system32 folder. 

    I'd say this is indicative of a bigger problem, potentially with path expansion.

     

    I found that on my machine, the regvalue HKLM\SYSTEM\CurrentControlSet\control\Session Manager\environment\path was set as a REG_SZ instead of a REG_EXPAND_SZ, and my path included environment variables.

    I suspect this occured when I installed NVideo Dev tools, as they were the last entry in my path string.

    the solution is to create a new Expandable string called "PathX", copy the path value string into it, then delete the old path value and rename "PathX" to "Path" and reboot.

    Fixed all my problems.

All Replies

  • Saturday, January 07, 2006 3:35 PMCat Herder Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I am also getting this error constantly.  Nothing in this forum (searching on this error) suggests an answer.  Help!!
  • Sunday, January 08, 2006 1:30 PMMagicPN Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer

    Hi all,

    I've got the same problem and i've found this solution...

    In the Options go into Projects and Solutions -> VC++ Directories page and place this rows:

    $(SystemRoot)\System32
    $(SystemRoot)
    $(SystemRoot)\System32\wbem

    Bye

    • Proposed As Answer bystegosaurus1 Monday, April 20, 2009 2:27 AM
    •  
  • Tuesday, January 10, 2006 12:09 PMCat Herder Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The "SystemRoot" commands seemed to do it.  No further problems yet with differing programs.
  • Thursday, January 26, 2006 9:19 PMJaeger Mitchell Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    CMD.exe should have been found in your path. 

    I'm running into the same problem, but i've also found that system commands like ipconfig.exe won't run unless I'm in the system32 folder. 

    I'd say this is indicative of a bigger problem, potentially with path expansion.

     

    I found that on my machine, the regvalue HKLM\SYSTEM\CurrentControlSet\control\Session Manager\environment\path was set as a REG_SZ instead of a REG_EXPAND_SZ, and my path included environment variables.

    I suspect this occured when I installed NVideo Dev tools, as they were the last entry in my path string.

    the solution is to create a new Expandable string called "PathX", copy the path value string into it, then delete the old path value and rename "PathX" to "Path" and reboot.

    Fixed all my problems.

  • Wednesday, August 02, 2006 4:48 PMThrasherNYC Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    Im getting the same problem, i tried using the
     $(SystemRoot)\System32
    $(SystemRoot)
    $(SystemRoot)\System32\wbem

    it didtn work for me :( any suggestions?


    • Proposed As Answer byAyyavu P Monday, October 05, 2009 11:29 AM
    •  
  • Wednesday, August 02, 2006 8:45 PMJaeger Mitchell Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Try using the solution I posted previously
  • Tuesday, October 24, 2006 10:31 AMX-Tatic Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The fix from Jaeger worked for me. No restart was required though.
  • Tuesday, November 14, 2006 4:40 PMredevil Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I tried Jaeger Mitchell's method of fixing, with no luck. Any ideas out there folks? 
  • Monday, April 30, 2007 3:38 PMtrobin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank you MagicPN, your "trick" worked for me either
  • Tuesday, August 28, 2007 9:08 PMslender_bamboo Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I'm getting this same problem too.
    Because I have the Professional version of VS 2005, maybe this is not the right forum to post, but my problem is that I can't find the following:
    Projects and Solutions -> VC++ Directories page

    This option is only in the express version?

    Projects and Solutions are there, but not the directories area.
    Is there somewhere else that I can enter this data?
    Or is there another solution to getting past this error?  -- It seems to happen at the end of the build when it tries to embed the manifest information.

    Thanks
  • Saturday, December 22, 2007 6:27 AMintrone Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Same here ... Maby this help ... earlier I hadnt probs and it happening after installed sdk 1 - needed for some apps.
  • Saturday, December 22, 2007 5:36 PMj.hu_sbcglobal.net Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    For Visual Studio 2008, it's tools->option->Project and Soltuions->VC++ Directories

  • Thursday, January 24, 2008 12:59 AMPiyush Soni Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks !!! The solution given by MagicPIN worked for me !!
  • Sunday, March 30, 2008 9:27 PMWintersrush Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    This solution did not work for me I am still getting this error out of both 2008 express and the 2005 studio. Any alternative or further discussion?
  • Thursday, April 10, 2008 8:45 AMYonatanBetzer1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    ThrasherNYC's soggestions works on VS 2008 !
  • Wednesday, July 23, 2008 3:26 PMfredccc Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I encountered this problem after installing Studio Plug Ins for xUnit and NUnit and searched for several hours to find the real answer.  In my case the Registry setting type was changed in the Studio's path environment.  Open the Studio Command Window and try to use cmd, then try cmd in the new window and it will fail.  This confirms the path is hosed in the Studio environment.
    I copied this from another post somewhere:
    ...a bigger problem, potentially with path expansion.I found that on my machine, the regvalue HKLM\SYSTEM\CurrentControlSet\control\Session Manager\environment\path was set as a REG_SZ instead of a REG_EXPAND_SZ, and my path included environment variables.
    I suspect this occured when I installed NVideo Dev tools, as they were the last entry in my path string.

    The solution is to create a new Reg Entry Expandable string called "PathX", copy the "Path" value string into it, then delete the old path value and rename "PathX" to "Path" and reboot.Fixed all my problems.

    Fixed my problems too.
  • Wednesday, October 08, 2008 8:01 PMcipher18 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thanks man..

    The solution works..

  • Wednesday, November 05, 2008 2:40 AMMISKSH Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks. It worked for me!!
  • Monday, April 20, 2009 2:28 AMstegosaurus1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks MagicPN. I just used a text editor on 'VCComponents.dat' and added the files to the 'Path Dirs' line.

    Worked ok!
  • Tuesday, June 23, 2009 4:30 AMvasu.vlsi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am new to this discussion...

    I got similar problem...

    Thnks....MagicPN and others.

    adding the paths......
    $(SystemRoot)\System32
    $(SystemRoot)
    $(SystemRoot)\System32\wbem


    it worked for me.


    Vasu
  • Friday, August 07, 2009 5:04 AMRam Raj Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank You very much Jaeger Mitchell ...it s working after made registry changes.
  • Tuesday, September 08, 2009 3:33 AMLiveICE Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Im getting the same problem, i tried using the
     $(SystemRoot)\System32
    $(SystemRoot)
    $(SystemRoot)\System32\wbem

    it didtn work for me :( any suggestions?



    Thank you. MagicPN
    Awesome!!!
  • Monday, October 05, 2009 3:30 PMMMAli Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    This worked for me. Follow this link: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=98658

    Workaround: Placing a physical copy of cmd.exe in the VC\Bin directory appears to resolve this problem.

    1. Copy cmd.exe from C:\WINDOWS\System32\cmd.exe

    2. Paste at C:\Program Files\Microsoft Visual Studio 8\VC\bin, or the appropriate installation folder on your system.
    • Proposed As Answer byMMAli Monday, October 05, 2009 3:31 PM
    •  
  • Sunday, October 25, 2009 2:56 AMKay Cheng Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    MagicPN, Jaeger, MMAli's solutions are all working. I got that error because I have changed the Path var for Java.