Generate Visual Studio Project Files fails

Hi there,
I already found a workaround for this problem and am only posting so others might find this solution.

I use Unreal Engine 4.22 with Visual Studio 2019. I am working with a normal user and a separate Administrator Account. I installed Epic Games Launcher normally, granting admin rights, when asked. There the nightmare began.

Installing Unreal Engine 4.22 failed, because Epic Games Launcher was launched as normal user and had no right to write into C:\Program Files. Ok, I started Epic Games Launcher and managed to install Unreal Engine 4.22.

Then I wanted to open an existing project, checked out from Git. UE complained about missing module and asking to rebuild it: FAIL

So I did, what it wanted me to and did “Right Click” on ".uproject > “Generate Visual Studio Project” > FAIL: “Error, some system path like C:\Program Files\Epic Games\UE_4.22.… access denied”.

Changed my user to Administrator - did not help.

Solution:

Remove Unreal Engine 4.22 and install it in an unprotected folder, C:/Users//Documents/Programs/Unreal/UE_4.22 should work, or simply installing in D:/Program Files/Epic Games/UE_4.22

Now everything works.