GenerateProjectFiles.bat doesn't recognize Visual Studio Ultimate 2013

I keep on getting this message:

GenerateProjectFiles ERROR: We couldn’t find a valid installation of Visual Studio.
This program requires either Visual Studio 2013 or Visual Studio 2012. Ple
ase check that you have Visual Studio installed, then verify that the 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 . . .
I have 64-Bit PC running Windows 7, UE4 is in ‘D’ Drive while Visual Studio is in ‘C’ Drive
ALSO visual studio keeps saying error 0x000007b when i launch it

im going to try every solution so if i dont reply im probably reinstalling/fixing…

Hi swordmac -

I am sorry to hear that you are experiencing this issue, and I will begin investigation into this as soon as possible. Thanks for your patience.

In the meantime, and for best results, please be sure to review our suggestions for how to report your issues, and feel free to edit your post if you have any additional information to provide:

Thank you.

Eric Ketchum

Hi swordmac -

Can you confirm that your registry is setup as specified by your message? Don’t change anything just let me know if it is correct. Here is an example of what you should be looking for…

Also do you have any other versions of Visual Studio installed.

Thank You

Eric Ketchum

I have InstallDir setup like yours but still have the same problem gonna reinstall Visual Studio and see if that helps (i dont have any other version of VS i only have ultimate 2013)

Hi swordmac -

If the re-install of Visual Studio does not fix your problem please make sure since you are using 2013 that you do not install the Optional.zip files which are only required for 2012 dependencies.

Let me know -

Eric Ketchum

In my case, the problem is the path, "C:\Windows\System32", which need to go into Path in environment variables, otherwise reg.exe was never been called correctly. It seems Windows 8.1 didn’t like such path going to environment variables.

It might be an idea that checking if reg.exe is available before calling it during generating project files.

I think the fast way might be that you have to debug batch file on your computer because almost every computer environment are different.

What I suggest to do is that using “REM” comment out the first line, “@echo off” , in GenerateProjectFiles.bat, then checking the which command is failed. You also need to comment out “@echo off” in “%~dp0Engine\Build\BatchFiles\XXXX.bat” files too.

Good luck.

so i renistalled it and it didn’t work + i didn’t install the optional.zip files

here’s the full text in the error :

‘D:\2nd’ is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
Setting up Unreal Engine 4 project files…
The system cannot find the path specified.
'Games\UnrealEngine\Engine\Build\BatchFiles' is not recognized as an internal o
r external command,
operable program or batch file.
‘GetVSComnToolsPath’ is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
'Games\UnrealEngine\Engine\Build\BatchFiles' is not recognized as an internal o
r external command,
operable program or batch file.
‘GetVSComnToolsPath’ is not recognized as an internal or external command,
operable program or batch file.

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 the 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 . . .

What is the full path of unrealengine? A screenshot will be helpful.

Hi swordmac -

frankmli is correct, a screenshot would be helpful. At least a listing of your installation directories as they exist on your computer. Going back to basics here, can you give us some generic information about your environment:

Where is Unreal Engine installed? (exact path)
Where is Visual Studio Ultimate 2013 installed? (exact path)
Which program was installed first?
What version of the Source build off of GitHub are you using?

Thank You

Eric Ketchum

Here’s a screenshot of where UE4 is:

Here’s a screenshot of where VS is:

Also i have UE 4.2 and i changed to Visual Studio express
I installed UE4 first then VS

Your path D:\2nd Program Files & Games cause the problem. Getting rid of space and ‘&’ in the path should solve the issue. For example “D:\2ndProgramFilesAndGames”

YAY! that’s the problem, its fixed now! thank you ! and thank you Eric for the help too!

This solved my problem where no one else could help me! Thank you a lot, it took me 6 days to figure this out!