Engine Association issue

The IT Department in our company installed the .msi version of Unreal Engine 5.6 on multiple computers. We end up with a registry key at:

HKEY_CURRENT_USER/Software/Epic Games/Unreal Engine/Builds/{XXXXX-XXX-XXX-XX-XXXXXXX} that points to the Unreal Engine installation on our D drive.

These keys are different for each computer, which is creating the issue.

I have created a project and put it on perforce. The engine association is specified to my specific registry key. Anyone who downloads the project ends up having a project version mismatch. They can pass it by simply hitting “skip conversion” but it has to be done everytime, and the potential for accidentally creating a copy without realizing it is very high (most are new to perforce).

I notice there is also a key at:

HKEY_LOCAL_MACHINE/SOFTWARE/EpicGames/unreal Engine/5.6.standalone that says “InstalledDirectory” and points to the same location.

I have tried setting the project association in the .uproject file to “5.6” and “5.6.standalone” but neither worked for anyone else and it messed up the engine association for the person who made the project originally with their regedit key (me).

What are the best practices here? Or modify something in the .uproject file? Our IT department is hoping for some kind of environment variable or something, or the ability to use HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER

Please let me know if you have any questions or need more info!

Thank you

Hi!

I’ll provide a comprehensive explanation of how UnrealVersionSelector.exe works so that other users can refer to it for similar problems.

When you open a .uproject file, UnrealVersionSelector.exe runs to pick the right Editor version based on the EngineAssociation value in the .uproject file.

This happens because UnrealVersionSelector.exe should be the default file association for uproject files, which you can see in the Windows Registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unreal.ProjectFile\shell\open\command "C:\Program Files (x86)\Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe" /editor "%1"The registry will have the other .uproject right click commands there also.

If the file associations aren’t set up for you, for example, you’ve received the UE version from other sources than an installation, you can launch `UnrealVersionSelector.exe -fileassociations` and it will set them up for you. You don’t need to touch these manually.

When UnrealVersionSelector.exe launches, it queries the computer for the list of all Unreal Engine installations. It queries two locations for those installations.

The first one is where the Epic Games launcher keeps its installations. That’s stored in a json file: C:/ProgramData/Epic/UnrealEngineLauncher/LauncherInstalled.dat.

That file lists them in this format:

{ "InstallationList": [ { "InstallLocation": "D:\\Bin\\Epic Games\\UE_5.5", "NamespaceId": "ue", "ItemId": "1b3c549b6a724e90ad94d9c1f410bc96", "ArtifactId": "UE_5.5", "AppVersion": "5.5.4-40574608+++UE5+Release-5.5-Windows", "AppName": "UE_5.5" } ] }Notice that the AppName is “UE_5.5”, which would match a .uproject file’s EngineAssociation value of “5.5”. The “UE_” part in LauncherInstalled.dat is ignored.

That file should only contain installations that come directly from the Epic Games Launcher. I list this for information/debugging reasons.

The second location UnrealVersionSelector.exe queries is the Windows Registry. This is for users’ custom builds. The registry key is “HKEY_CURRENT_USER\Software\Epic Games\Unreal Engine\Builds”.

Those generally have generated GUIDs created by UnrealVersionSelector.exe as the engine association. However, there’s nothing stopping you from putting “5.5” as a registry value’s name. This would be the right place for you to put in a custom installation pretending to be a Launcher version.

There’s a third way a project can be associated with an engine: when the engine is installed in a directory relative to the project. In that case, the value of `EngineAssociation` is empty.

UnrealVersionSelector will then traverse up the parent folders, looking for an `/Engine` folder to open the project with. This is how it’s usually done when a project is using a source version of Unreal Engine. In that case, the project is a Native project. You can see more info on a Native project folder structure here in our documentation: https://dev.epicgames.com/documentation/en\-us/unreal\-engine/managing\-game\-code\-in\-unreal\-engine\#nativeprojects, and in this presentation: Setting up an Unreal Engine Studio the Epic Way | Tutorial.

We at Epic Games make most of our projects, including Fortnite, as Native projects using a source version of the engine, and we generally recommend studios use that workflow once they’re past a “small” size. That way they can use Unreal Game Sync and Horde, which only work with Native projects. You can see more about “The Epic Way” of setting up an Unreal Engine Studio in this article: Setting up an Unreal Engine Studio the Epic Way | Tutorial

If you’re not otherwise using the Epic Games Launcher, I think the easiest solution might be to just override the C:/ProgramData/Epic/UnrealEngineLauncher/LauncherInstalled.dat file.

But you can also compile a custom version of UnrealVersionSelector if you want to. In Visual Studio, you can use the Solution Explorer to find the Programs/UnrealVersionSelector project. You can right-click it and “Set as Default Project” and use Visual Studio to normally compile and launch, and even debug it. The function you want to modify is `FDesktopPlatformWindows::EnumerateEngineInstallations`. I recommend copying/pasting the registry enumerating code in that function to add a version that also checks in HKEY_LOCAL_MACHINE. The line:

if (RegOpenKeyEx(HKEY_CURRENT_USER, InstallationsSubKey, 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS)is the one you want to modify in the duplicated code. Replace `HKEY_CURRENT_USER` with `HKEY_LOCAL_MACHINE`.

Glad to hear!

Thanks Ari, this is great information! I’ll point my IT department to this, but just wanted to ask one follow up. They seem to want to use HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER if possible. Is there a way for us to compile a custom version of UEVersionSelector to look to registry locations on the HKEY_LOCAL_MACHINE instead?

OR. Could we spoof the launcher version check to trick the project into thinking we have the engine version with that json file? They hope not to install the Epic Games Launcher.

This is fantastic, I was able to spoof the LauncherInstalled.dat file as an easy solution. Thank you for your prompt and in depth responses!