Skip to main content

If you’re fighting with deploying Unreal Engine 4, or just curious how we went about it, welcome aboard!

So Unreal Engine 4 is great, and the launcher is an awesome way for users to install and keep the engine up to date, but it’s a pain for sysadmins to deploy. Over the years at Staffordshire University I’ve trialled many different ways of running Unreal Engine with our students – from manually updating each machine, to binary builds which the students need to download a copy of.

What we’ve settled on is a halfway house, and a bit of a hack. If you want a TLDR – we take a copy of the launcher build, copy it to over 400 lab machines and then trick the launcher into thinking it’s one of it’s own builds. This gives the native launcher build experience but without the manual updates and engine conflicts!

Disclaimers first – this may completely stop working at any point in the future, but more likely than not we’ve had to find a work around, so if you’re in a school, college or university and need a hand, just send me a message on the contact page!

Down to it!

We found the easiest way for students to learn UE4 was to keep them locked on a single engine version. Luckily for us, we know Epic’s release cycle – Once a minor version is released as non-alpha (e.g. 4.20.1) then the previous version will no-longer receive updates (e.g. 4.19.4). This is great for us as the students can download it easily at home using the standard launcher, and we don’t need to host files for them, and neither of us will ever need to update. Cool!

So what happens in the labs? We build our lab PC images between May and August, with teaching starting in September. The ideal scenario for us is to use the latest possible “stable” (non-updating) build of the engine, which means deploying at the last moment – just after the image has been deployed in the labs.

The deployment can be broken down into a few parts:

  1. Download the engine build needed from the launcher
  2. Zip up the build files
  3. Create the version config file (explained later)
  4. Create a desktop shortcut
  5. Update the deployment batch script with current version numbers
  6. Test Deploy though SCCM or by hand if needed

Step 1 – Grab the Example files

Before we go though creating a deployment of your own build, have a quick look through the example files attached. You may need to change some parts for your own policies, such as firewall rule installations, and the user group granted write permissions. The main script is the Deploy_UnrealEngine_4.20.3.cmd which uses the other files in common and UE_4.20. Included is a copy of 7za, a command line version of 7zip used to extract the engine on the target machine.

All these files should be put on a shared storage server – we have these on an open-read network share so if a computer’s build goes “wonky” then any user can re-copy whatever they need and fix it. Bare minimum is permissions for your deployment system.

Step 2 – Download the Engine

So this is the easiest bit – Just run the normal launcher from our friends over at Epic and install the second to latest version – this one shouldn’t update anymore (at least it hasn’t yet!). For the sake of this guide I’ll be assuming the version we’re installing is 4.20.3

Pick the same location to install now as you want on the deployment as we’ll make a shortcut to it later. We use the C:\Epic\ directory as it allows separate permissions than the Program Files directory.

This will take a little while to install. Feel free to read ahead or, well, procrastinate.

Step 3 – Add Your Engine Plugins

If we want the users to have access to any plugins, such as the substance plugin, now is the time to install it. This is done just as normal, though the launcher and added to our newly downloaded engine build.

Step 4 – Zip up the Engine

We want to zip up the engine files, as copying the tens of thousands (literally) of small files will take forever over the network. Your SAN will thank you.

What we’ve found is using 7Zip to split to 700MB is a nice balance between number of files, and time lost when inevitably the copy fails and has to restart. Using a single 20GB zip file failed on around half the machines during early versions. No fun!

If you don’t already have 7zip, you can download it at 7-zip.org

Lets zip up the UE4.20 directory in C:\Epic\. The easiest way to do this and to keep the file structure correct inside the zip is to right click the UE4.XX folder and “add to archive”.

The following settings work well:

Copy these on a shared storage server – we have these on an open-read network share so if a computer’s build goes “wonky” then any user can re-download it and fix it easily.

Step 5 – Create The Version Files

So this is where the magic happens! The Launcher gets details of what it has installed from the LauncherInstalled.dat file in C:\ProgramData\Epic\UnrealEngineLauncher this is a json file which contains an entry for each installed engine, game, plugin etc.

The one for 4.20.3 with the substance plugin looks like this:

{
	"InstallationList": [
		{
			"InstallLocation": "C:\\Epic\\UE4\\UE_4.20",
			"AppName": "Substance_4.20",
			"AppID": 0,
			"AppVersion": "4.20.0-4234380+++depot+UE4-UserContent-Windows"
		},
		{
			"InstallLocation": "C:\\Epic\\UE4\\UE_4.20",
			"AppName": "UE_4.20",
			"AppID": 20040003,
			"AppVersion": "4.20.3-4369336+++UE4+Release-4.20-Windows"
		},
	]
}

What we want to do is extract the installation data for the engine version we want, and then rebuild this file on each machine, depending on what is actually installed to it.

For now, this boils down to just extracting the middle section for the engine we’re using and saving it out alongside our zip of the engine build, titled UE_4.21.dat. Make sure to keep the “,” after the final curly brace and the indentations.

		{
			"InstallLocation": "C:\\Epic\\UE4\\UE_4.20",
			"AppName": "Substance_4.20",
			"AppID": 0,
			"AppVersion": "4.20.0-4234380+++depot+UE4-UserContent-Windows"
		},
		{
			"InstallLocation": "C:\\Epic\\UE4\\UE_4.20",
			"AppName": "UE_4.20",
			"AppID": 20040003,
			"AppVersion": "4.20.3-4369336+++UE4+Release-4.20-Windows"
		},

What happens in the installation script is it wraps a header and footer around each of the engine, plugin and game .dats we’re creating and rebuilds it on any new deployments. Note that you must use the exact information from the dat created by the launcher when you downloaded and zipped your version. The example files may differ in minor version numbers!

The deployument script will flag the newly created Launcherinstalled.dat file as read-only to stop the Launcher from overwriting the installation as “it” didn’t create it. This is the hack I alluded to earlier.

Step 6 – Create a Desktop Shortcut

One of the drawbacks for using this method is you’re not able to run the engine from the launcher anymore. One of the ways we simplify this is to add a shortcut to the desktop and start menu for launching the engine.

Sadly in windows, there’s no simple way to automate the generation of shortcuts for a file without third party programs, so for simplicity, we just make one now. This is the importance of having the launcher install to the desired final location – we can’t create a shortcut to a location that doesn’t exist yet. Once this is made, copy it alongside the other deployment files.

Step 7 – Update the Batch Deployment Scripts

In all likelihood you’ll be using a newer build than the one described in this guide, so change the major and minor version in the Deploy_UnrealEngine_4.20.3.cmd batch script to match the engine build you’re deploying, and rename it. The script references the version from the top of the script, so it’s easy to update as needed. Also included here are options to change the network share directory, install location (make sure your shortcut matches!) and shortcut location.

Step 8 – Test Deployment!

So we should be ready! We have our build files and now we can do a test deployment. The script will work fine ran locally when elevated (check your share permissions if you hit issues). It will copy the files to a temporary location, extract them, install the engine specific pre-requisites for x86 and x64, add firewall rules, copy the shortcuts and finally delete the temporary zip files.

And That’s that!

If this has been useful to you, or you’re stuck and need a hand, please do give me a shout on the contact form!

If anyone at Epic reads this, PLEASE, give us a command line flag for the launcher to update builds, this would make literally anyone teaching games in education so happy!

Rich Harper

I’m a Creative Technologist. I build, create, hack, reverse-engineer, design and develop pretty much anything related to visual media.

37 Comments

  • Aaron Maller says:

    Hey Rich!

    Great writeup! This saved my bacon deploying Unreal 4.25 on a bunch of machines for a large Architectural Firm. I might be able to actually get someone at Unreal to read this. If i do, ill report back. :)

  • George Salambassi says:

    Hey Rich

    I just wanted to check if your way of deploying unreal Engine with SCCM still works, any changes that I should be made aware of?
    thanks for your help

    George

  • Roberto Marsach says:

    I am unable to download the Unreal Engine 4 Deployment Example. The link is not working.

  • a says:

    Hi Rich,

    I’ve tried to have a look at your example files but unfortunately have been met with a dead link!

    Is there any chance you still have these?

    Thanks,

  • Hello !
    I’m your script download link don’t work for me !
    Could you maybe upload it somewhere else i would like to check it pls.

    Thanks in advance !

  • Oscar Taracena says:

    Hello and greetings. I wanted to download the zip file to see the work you did but it seems the link is not working correctly. Could you please point me to where i can download that zip file to see if the contents.

    Thank you,

    Oscar

  • Chris Daly says:

    This looks like exactly what I am looking for. My only question is the Deploy_UnrealEngine_4.20.3.cmd batch script. is it possible to see the whole script? I am not sure if it was part of the Unreal Engine 4 Deployment Example but it is no longer available

  • alan martyn says:

    Hi Rich,
    It seems I cannot download the example files anymore. Any chance they can be made available again?

    Regards.

  • Michael says:

    Hi Rich,

    How do you extract the 7z files?
    If I try to download your “Unreal Engine 4 Deployment Example” the site just says “Server not found”

  • Adam Straker says:

    Hi Rich, great article, I wanted to check the files you uploaded but I cannot download them, are they still available?? I think we are going to have an issue here at the University of Southampton as the academic that wants this installed also wants it to be able to be updated, not sure how we will allow this on a non admin account, are you ok if I contact you if I get stuck??
    Kind regards
    Adam

    • Rich Harper says:

      Hello again! You can absolutely update the engine – we made installers for each point release at the end of term as there was always a handful of students working to various updated versions. You can just install over the top of existing without issue. I would suggest however that you deploy one version out of date – so if 4.26 is in preview there is little chance of an update to 4.25!

  • Adam Straker says:

    Hi Rich,

    great blog, and hopefully really helpful to us here at the University of Southampton, the link to download the example files is no longer live, I would like to have a look at them, can you make it available again or email it over to me please??

    kind regards
    Adam

    • Rich Harper says:

      Hi Adam, sorry for the late reply! I’ve fixed up the link so you should be able to download now. I hope you were able to get it all sorted though!

  • JH says:

    Hi Rich,

    Thanks for your work on this,
    I used your scripts as a base for UE4 deployment on our games dev classroom PCs.

    You saved me the headache of including it in the WIM again!

    Jack

  • Nate says:

    Hello,
    Do the example files (with the batch) not work on the tutorial for Unreal Engine 4 with SCCM? Any issues or updates to the process?

  • Pat Hamilton says:

    Hi Rich,

    Great article. I’m unable to access the example files, just getting a network error when attempting to downloading them. Can you help?

    Kind regards
    Pat

  • Tristan says:

    Hi Rich,

    I would to test your way of deployment, we will have more and more machine using the engine and I would like to anticipate it but how can I download your example script? Nothing happens when I click on your link at the beginning… :/

    Thanks

  • Andy says:

    Hey Rich,

    Great article, just wanted to ask. What’s wrong with just deploying the epic launcher in schools? The latest one seems to be locked down to just development.

    It is useful to know that its possible to deploy just the engine though, so thank you.

    Regards

    Andy

    • Rich Harper says:

      Hey Andy, sorry for the late reply!

      It was mainly that students didn’t have administrative permissions, so they could attempt to update an engine version but it would fail when it came to installing prerequisites. This would mean either that the version would be left in a broken state, or practically uninstalled.
      Without the launcher, the students had no shiny buttons to press!

  • Graham says:

    Hi, great guide, I just seem to get one problem, no ProgramData (and subdirectories) are created.
    There are about 5 lines at the bottom of the log where “The system cannot find the path specified.” I can post them if that’s OK?

    (Unreal does seem to launch anyway though :) ).
    Thanks
    Graham

  • Hey Rich!

    This guide looks amazing and is exactly what we are looking for! However, it seems as though the deployment example scripts are not working for downloads. I see reference to your custom scripts but no way to download them as I keep running into web errors. Is there a way you could update the link for this as I’m keen to use your amazing guide!

    All the best,

    Alec

  • Nick Knowles says:

    Can you share the example files again please? The link seems to be broken.

  • Felix says:

    Hi,

    Your download link doesn’t seem to work.

    Cheers
    F.

  • Andrew Purvis says:

    Not sure if you’re still using this, but I was going to check it out but the example files don’t link anywhere now. Chance of putting them back?

  • Callum Redman says:

    Hey Rich,

    Does this still work? the example files don’t appear to download either.

    Many thanks,

    Callum

Leave a Reply to Rich Harper Cancel Reply