I was installing Primary site on Windows server 2008 R2 as child to CAS and all the prerequisites were met except .Net Framework 4.0 and it keeps failing me with error code :0xc8000222.
I tried installing the setup using administrator /Extracting the setup files but doesn’t fix the issue.
Google Search provided me a couple of answers and below one worked perfectly.
You will have stop the Windows Update service and rename the software distribution folder from your windows and then start the service before you the installation.
Step 1 :Run net stop WuAuServ (to stop the windows update service) from cmd
Step 2: Rename C:\WINDOWS\SoftwareDistribution folder to C:\WINDOWS\SoftwareDistribution.Old
Step 3:run net start WuAuServ (to sstart the windows update service) from Cmd
Now start the installation of your setup. It should go perfectly this time.