Error compiling Esp32 Wrover Board

The path in system variables is "ComSpec: C:\windows\system32\cmd.exe" where or what else would be required, or is there another path not known about? This is very baffling as it is in system variables, but still not found. The system is standard for win8.1 pro, and no restrictiions can be found.