Finally got around this by renaming the EpicGames folder in C drive to Ep.
It was creating a file in many nested folders as part of the installation process that caused the error. Removing most letters from the folder name was enough to get it to install.