When -PrereqPath is used to run a prereq script, Epic Games Launcher fails to run it from the default install path

Hello!

We’ve integrated Easy Anti-Cheat services as per the documentation on the Epic Games Development portal and we run BuildPatchTool with the following extra args now:

-PrereqIds=“EacAndUEPrereqs”

-PrereqPath=“%PROJECT_NAME%/Setup/SetupEOS.bat”

-UninstallActionPath=“EasyAntiCheat\EasyAntiCheat_EOS_Setup.exe”

-UninstallActionArgs=“uninstall %PRODUCT_ID%”

SetupEOS.bat is essentially running the standard UE prereqs executable, i.e. “Engine\Extras\Redist\en-us\UEPrereqSetup_x64.exe”, and “EasyAntiCheat\EasyAntiCheat_EOS_Setup.exe install %PRODUCT_ID%”

When the game is installed and launched using Epic Games Launcher we observe the following:

  1. If the default installation folder is changed to “C:\Games”, everything works as expected
  2. If the default installation folder is left being “C:\Program Files\Epic Games” the game fails to launch with the message “Windows cannot find ‘C:\Program’. Make sure you typed the name correctly, and then try again.” The message comes from Windows Command Processor which means Epic Games Launcher is running the script in a way that breaks when there are spaces in the file path.

Steps to Reproduce

  1. Use BuildPatchTool to upload the game to Epic Games Store with -PrereqPath to run a prereq .bat script
  2. Launch the game using Epic Games Launcher with its default game installation folder path unchanged
  3. Observe Epic Games Launcher fails to launch the game due to Windows Command Processor failing with the error message “Windows cannot find ‘C:\Program’. Make sure you typed the name correctly, and then try again.”

Hello, I’ve attempted to reproduce this issue, but I’ve been unsuccessful so far. Could you please share your launcher logs?

[2025.10.01-09.29.26:886][  9]LogPrerequisites: Running prerequisites installer G:\New folder\TestProduct15uJBR/Setup/LogArgsToFile.bat 
[2025.10.01-09.29.27:438][ 34]LogPrerequisites: Prerequisite installation successful

Could you please follow this troubleshooting guide to collect logs from the Epic Games Store and share these here?

Could you also please include your operating system version information?

https://www.epicgames.com/help/en\-US/epic\-games\-store\-c\-202300000001639/launcher\-support\-c\-202300000001735/how\-do\-i\-gather\-logs\-for\-epic\-games\-launcher\-a202300000015909

Hello Ieuan!

Thank you for your prompt response! My sincere apologies as it seems it’s been a mistake on our end. We asked the affected team member to blank the .bat file to exclude any issues from the script itself and they reported that the error was still happening. That sent me on a completely wrong path. After updating the script, numerous further tests and checking the logs from EGS Launcher - we didn’t have that issue anymore.