Simply running the installer as admin through the cmd window and still getting the same error that the installer couldn’t write a value to key \Software\Classes\com.epicgames.launcher\shell\open\command Verify you have the sufficient access to that key.
This error can sometimes be caused by your anti-virus software blocking changes to the registry as a security measure. Can you please try to disable your AV and try the installation again? Please reply back with your results.