Guys, I have found a solution for this problem.
So I downloaded this application called “Revo uninstaller” and selected Epic Games on the list. It deletes all the leftovers from the registries. After I finished deleting everything it let me install the launcher
I hope it helps!