Installing Desktop Experience on Server 2012 R2 core after patching

So it seems like if you have originally installed a Windows 2012 R2 Core Server, then added the required GUI roles, then patched the server up to date, it can become extremely hard to install particular features that will be listed as ‘Removed’ rather than just Unavailable/Not Installed.

After spending way too many hours, in obscure threads, with unhelpful error messages like:

Source files could not be found.

Update InkAndHandwritingServices of package InkAndHandwritingServices failed to be turned on.

Status: 0x800f081f.

Status: 0x800f0906.

Attempting every various DISM & Install-WindowsFeature combination in existence (such as -Source “Windows Update”), the solution boiled down to a few simple steps.

Basically, create a fully up-to-date WIM file, and then use a local group policy to specify the source path.

Instructions on how to do so:

1. Copy install.wim from the latest 2012R2 ISO (X:\sources\Install.wim) to a local folder (eg. C:\Wim\).
2. Download all 2012R2 updates with wsusoffline, for convenience I selected the ‘USB: Copy updated to directory’ folder.

3. Mounted install.wim:2 with dism

4Applied updates to install.wim:2

5. Committed changes to the wim file.

For convenience the following PowerShell script was used for steps 3-5:

$UpdatesPath = "C:\Updates\Updates\w63-x64\glb"
$MountPath = "C:\wim\mount"
$WimFile = "C:\wim\install.wim"

DISM /Mount-Wim /WimFile:$WimFile /index:2 /Mountdir:$MountPath
$UpdateArray = Get-Item $UpdatesPath
ForEach ($Updates in $UpdateArray)
DISM /image:$MountPath /Add-Package /Packagepath:$Updates
Start-Sleep –s 5
Write-Host "Updates Applied to WIM"
DISM /Unmount-Wim /Mountdir:$MountPath /commit
DISM /Cleanup-Wim

6. Edit local policy to never download updates from Windows Update

7.  Edit local policy to use wim:c:\wim\install.wim as source

Open gpedit -> Computer Configuration -> Administrative Templates -> System -> Specify settings for optional component installation and component repair

Select Enabled and Enter the alternate source path as wim:C:\wim\install.wim:2

8. Open PowerShell as an Administrator and run “Install-WindowsFeature -Name Desktop-Experience”.
9.  And with a bit of luck the Desktop Experience will be successfully installed!

Total Views: (242)

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook