For me the following method worked, Firstly ensure that windows update service is running from services.msc or you can run this command in an administrator Command Prompt -
net start wuauserv
Next edit the following registry from regedit
->
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp
-> MajorVersion
-> Change this value from 10 to 9.
Then try installing the AppFabric and it should work. Note :- revert back to registry value changes you made to ensure there are no problems in future if any.