
Thanks google!
With the keyword "cannot spawn cmd.exe", the first hit taught me how to fix error spawning "cmd.exe" in Windows 7, which should also work for other windows versions.
Jaeger Mitchell post the fix method on Thursday, January 26, 2006 9:19 PM: the error is caused by changed Path property, which should be REG_EXPAND_SZ.
How to fix?
- run regedit.exe
- go to the folder of
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
- create a new expandable string (REG_EXPAND_SZ) called "PathX", copy "Path" value string into "PathX"
- delete the old "Path" and rename "PathX" to "Path"
- reboot
Works like a charm. Thank you.