When attempting to install the Media Foundation feature on Windows Server 2012 R2 for RDS Session Host configuration, administrators frequently encounter error 0x800f081f
indicating missing source files. This typically occurs when the Components Store (WinSxS) has been cleaned or when the system cannot locate required installation packages.
The CBS logs reveal multiple critical points:
2014-07-23 16:28:22, Info CBS Failed to internally open package [HRESULT = 0x800f0805]
2014-07-23 16:27:03, Info CBS DWLD: Failed to copy to path on bundle [HRESULT = 0x80246013]
2014-07-23 16:28:24, Error CBS Failed to perform operation [HRESULT = 0x800f081f]
Method 1: Specifying Alternative Sources
Try these DISM commands with different source paths:
dism /online /enable-feature /featurename:MediaFoundation /all /limitaccess /source:wim:D:\sources\install.wim:4
dism /online /enable-feature /featurename:MediaFoundation /all /limitaccess /source:http://server/share/win2012r2
Method 2: Repairing Component Store
DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:4
sfc /scannow
For systems where Features on Demand were removed:
- Mount the Windows ISO
- Copy the entire
sources\sxs
folder to a network share - Run this PowerShell script:
$features = Get-WindowsFeature | Where-Object {$_.Installed -eq $False}
foreach ($feature in $features) {
Install-WindowsFeature -Name $feature.Name -Source \\server\share\sxs
}
Update these Group Policy settings if using WSUS:
Computer Configuration > Administrative Templates > System > Specify settings for optional component installation:
- "Download repair content and optional features directly from Windows Update" = Enabled
- "Do not connect to any Windows Update Internet locations" = Disabled
Create a batch file with these commands:
@echo off
net use z: \\wsus\updates /persistent:yes
dism /online /cleanup-image /restorehealth /source:z:\win2012r2\sources
dism /online /enable-feature /featurename:MediaFoundation /all /source:z:\win2012r2\sources\sxs
pause
When attempting to install Windows features like Media Foundation on Server 2012 R2, you might encounter error code 0x800f081f indicating missing source files. This typically occurs when:
- The component store (WinSxS) has been cleaned
- Original installation media isn't properly referenced
- WSUS/Windows Update connectivity issues exist
Method 1: Specify the correct source path
Use DISM with precise WIM index (verify with DISM /Get-WimInfo /WimFile:F:\sources\install.wim
first):
DISM /Online /Enable-Feature /FeatureName:MediaFoundation /All /LimitAccess /Source:wim:F:\sources\install.wim:4
Method 2: Force Windows Update download
Configure these registry settings to bypass WSUS:
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "WUServer" /t REG_SZ /d "" /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "WUStatusServer" /t REG_SZ /d "" /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "UseWUServer" /t REG_DWORD /d 0 /f
When dealing with corrupted manifests:
DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:F:\sources\install.wim:4 /LimitAccess sfc /scannow
For scripted deployments, use this PowerShell approach:
$feature = "MediaFoundation" $wimPath = "wim:F:\sources\install.wim:4" try { $result = Install-WindowsFeature $feature -Source $wimPath -ErrorAction Stop if ($result.RestartNeeded) { Write-Warning "Restart required to complete installation" } } catch { Write-Error "Failed to install feature: $_" # Fallback to Windows Update Install-WindowsFeature $feature -Source "WindowsUpdate" }
Key log entries to investigate:
CBS_E_INVALID_PACKAGE
- Corrupted package storeCBS_E_SOURCE_MISSING_FROM_WUSUS
- Download failures0x80246013
- CAB extraction issues
Use this PowerShell snippet to parse CBS logs:
Get-Content C:\Windows\Logs\CBS\CBS.log -Tail 1000 | Select-String -Pattern "0x800f081f|CBS_E_SOURCE_MISSING|DWLD:" | Out-GridView -Title "CBS Error Analysis"