A Fix for Windows 10 Controlled Folder Access blocking AutomationTool.exe

Tip from rabidgoalie on the Unreal Forum

I’m quoting the thing below

 have just spent the last half-hour troubleshooting a failed build. I use the Windows 10 feature called Controlled Folder Access to (hopefully) safeguard my files from Ransomware (I am absolutely terrified of that happening). So, I knew what was causing errors like the following:

PackagingResults: Error: Failed to open file for write …/866581fd.bin
UATHelper: Packaging (Windows (64-bit)): LogAssetRegistry: Error: Failed to open file for write …/d859983c.bin

As well as file access denied errors like these:
PackagingResults: Error: Error flushing file: …/Saved/Config/Windows/Engine.ini (Access is denied.)
UATHelper: Packaging (Windows (64-bit)): LogFileManager: Error: Error flushing file: …/Saved/Config/Windows/Engine.ini (Access is denied.)

By the way, I’ve removed most of the file paths, but you get the idea. These are some of the errors that will occur with Controlled Folder Access enabled. This usually isn’t a problem, because Windows will alert you to an application attempting to access protected folders. But, in the case of AutomationTool.exe, I didn’t get any alerts that Windows was blocking it from accessing files needed to be worked with during the process of packaging a game. This was an issue, because I rely on these alerts to give access to applications that I know I can trust…like the AutomationTool.exe for UE. For some reason, Windows was not giving me that alert.

To fix this problem, I had to go in and manually add AutomationTool.exe to the list of trusted applications. This isn’t as painful as it sounds, and I though I would post here just in case someone else runs into this issue. I spent the time, so that you don’t have to. :smiley:

First, many of these steps are outlined in the page from Microsoft titled “Customize controlled folder access”, in the section named “Allow specific apps to make changes to controlled folders”. I didn’t include a link because I haven’t posted to the forums much, and I am unclear of the rules concerning links to external sites. If you want more information on this topic, you can just search for that webpage.

  1. Search for “Windows Security” in the start menu.
  2. Select Virus & Threat Protection (either on the left menu, or the tile on the main view)
  3. Then, select Manage ransomware protection (this is at the very bottom of the page for me)
  4. Under the Controlled folder access section, select Allow an app through Controlled folder access (UAC will probably pop up to ask if this is OK…it did for me)
  5. Select Add an allowed app and select Browse all apps in the dropdown menu.
  6. Browse to where you have the engine installed/compiled on your system. Once in the folder where your engine version is, go to “…\Engine\Binaries\DotNET”. That DotNET folder is where the AutomationTool.exe lives. For example, if you have your engine on your C drive, and have compiled the engine from source, the path could look like “C:\UnrealEngine-release\Engine\Binaries\DotNET”.
  7. Select the AutomationTool.exe and press Open to add it to the list. It may not be located at the top of the list, so to confirm that it was added, scroll down the list to find it.

Now, hopefully, you will be able to build and package your game without any issues. I wrote such a detailed set of steps because I actually had to do a bit of digging to find this all out. I hope it helps!