[Almost Solved] Unreal fails to read environment variable and fails to detect Visual Studio

When i first installed VS2013 and tried to run GenerateProjectFiles.bat i get an error saying msbuild.exe was not recognized as an internal command. So i modified the PATH environment variable and added C:\Windows\Microsoft.NET\Framework\v4.0.30319 (Thanks to Google). Then that error was gone.

2991-pathvariable.png

@Jamie Dale: I dont have that path. In this folder C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms i only have a folder called x64 and inside that theres only one file: Microsoft.Build.CPPTasks.x64.dll

I have this folder that contains only 2 files C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets\v120 and they are Toolset.props and Toolset.targets