I got this error when I was installing SharePoint Server 2013 for a client where they have already installed the Visual studio 2015 and SQL Server 2014 on Windows Server 2012.
While doing google for solving this error, I got this solution from a blog.
Open Windows PowerShell (Run as administrator) and run the following command to check which version of .NET framework is installed on the server :
• Set-Location ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client’
• Get-ItemProperty -Path . | Select-Object Version
Then depending on the version installed and the OS you’re using, you need to uninstall the corresponding KB :
.NET Framework 4.6.1 : https://support.microsoft.com/en-us/kb/3102436
Windows Server 2012 : KB3102439
Windows Server 2012 R2 : KB3102467
.NET Framework 4.6 : https://support.microsoft.com/fr-fr/kb/3045560
Windows Server 2012 : KB3045562
Windows Sstscerver 2012 R2 : KB3045563
To uninstall the corresponding KB ->
• Press windows + R keys and type appwiz.cpl in run window.
• Click on View installed updates from left side menu under Control Panel Home link.
• Copy or type the KB Name in Search Programs and feature box on top right side.
• Select the KB and click on Uninstall the KB.
• Restart the Server and try to run SharePoint Server 2013 Setup again.
It works for me, hope it will work for you as well.
Cheers 🙂