2010年2月6日 星期六

learn visual studio on vista

Error spawning 'cmd.exe'

Did two action and the program is able to run.
solution:


A

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.

B.
For Visual Studio 2008, it's tools->option->Project and Soltuions->VC++ Directories
$(SystemRoot)\System32
$(SystemRoot)
$(SystemRoot)\System32\wbem
Also, I leart how to add argument for running the program

Right click project(not solution)->properties->Configuration properties->debugging->command arguments->(input the argments)

沒有留言: