How do i fix this epic games installer glitch?

When ever i try to install it,it gets very close to being done then it pops up with 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.
I have no idea what to do as i try to retry but it wont come off my screen and when i press ignore it ‘installs’ but does not appear to be there.