Are you saying typing the set path command actually fixed the problem? If so that's just a temporary solution, it will only work on the command prompt while its running, as soon as you close it the environment variables will be reset.
You need to change the path it seems manually under System Properties, Advanced System Settings, Environment Variables.. try changing the %sytemroot%\System32 in your path to manually reflect C:\windows\system32..
After that see if it works on a new command prompt, and let us know.