1: Try and uninstall from Control Panel > Add/Remove Program
See if it is visible in there and try and remove the SQL Server 2017 program (if it appears).
2: Try running the Microsoft .NET Framework Repair Tool
https://www.microsoft.com/en-us/download/details.aspx?id=30135
3: Try removing or renaming any folders of older/left over folders.
Example: Rename the old left-over folders if any as
C:\Program Files\Microsoft SQL Server\13
C:\Program Files\Microsoft SQL Server\MSAS13.MSSQLSERVER
C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER
C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER
C:\Program Files (x86)\Microsoft SQL Server\130
to
C:\Program Files\Microsoft SQL Server\130_Old
C:\Program Files\Microsoft SQL Server\MSAS13.MSSQLSERVER_Old
C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER_Old
C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER_Old
C:\Program Files (x86)\Microsoft SQL Server\130_Old
4: Check for any processes that are hanging before you run the setup.exe and make sure you right click and Run As Administrator
the problem was solved and the setup started when I tried to end all running tasks in task manager