If this happens, launch the setup program again (maybe go to Control Panel -> Programs and Features -> Uninstall). Then choose Repair, browse and select the folder of the SQL Server setup files.
After reparing, run the installer again, installation will be successful.