Cant Install UE4 (cmd.exe is not recognized)

When I try to create my solution file by clicking on GenerateProjectFiles.bat file I get this error message:

‘cmd.exe’ is not recognized as an internal or external command,
operable program or batch file.
Setting up Unreal Engine 4 project files…

GenerateProjectFiles ERROR: We couldn’t find a valid installation of Visual Stud
io. This program requires either Visual Studio 2013 or Visual Studio 2012. Ple
ase check that you have Visual Studio installed, then verify that HKEY_LOCAL
_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\InstallDir (or HKEY_LO
CAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0\InstallDir on 32-bit machines)
registry value is set. Visual Studio configures this value when it is installed
, and this program expects it to be set to the '\Common7\IDE' sub-folder under
a valid Visual Studio installation directory.

Press any key to continue . . .

Anyone know how to fix this? Thanks!

Hey Makobrako77,

Do you have Visual Studio installed? If so, which version?

Yes, 2013 and it works perfect with other projects! Thanks for getting back to me, I appreciate!

I also just tested my cmd.exe from command prompt, so I opened command prompt ans typed in cmd.exe and here is message i get:

‘cmd.exe’ is not recognized as an internal or external command, operable program or batch file. ???

Ummmm somthing is serious wrong with my system, any ideas?

Fixed! Here is what was wrong:

environment variables weren’t set right :

Right click Computer → Properties → Advanced System Settings → Advanced (tab) → Environment Variables…
In System variables, double-click on Path (or single-click, and click on Edit…) to examine (and, if necessary, edit) variable.

You have to make sure that these directories are defined in Path variable:

C:\WINDOWS\system32;C:\WINDOWS

C:\WINDOWS\system32;C:\WINDOWS was missing from this string.

Thanks for your help!