There are many reasons for the installation error here is some suggestions to overcome the error, the log for the installation is in :
C:\Users\%username%\AppData\Local
look for log files like SetupExe(xxxxxxxxxxx).log inside there some clues for the failure.
1. there is rouge installation error in the registry :
regedit -> HKEY_CLASSES_ROOT\Installer\Products
Look for any weird key name and fix the name to normal (for me it was – in the beginning, i have seen also @@! in the name )
2. Delete AppCompatFlags from registry (Backup this key and delete it) :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags
3. clean the temp directory :
run -> %temp% delete what ever possiable, clean in the same way c:\windows\temp
4. re-create any missing directories according to the logs, if mentioned .