Since the release of Windows ADK version 1809 a couple of weeks back now, reports has been coming in on twitter and to me by email that the ConfigMgr OSD FrontEnd, among other WPF based applications are crashing. A quick and dirty fix up until now has been to replace the UIAutomationCore.dll file present in the winpe.wim file with the one from the Windows ADK version 1803. Even though it was a working fix, I’ve never really liked the work around.
So what can we do to fix this? David Segura (@SeguraOSD) looked into this issue and found out what the problem really is.
For a more detailed walk through of the issue, David has blogged about it on the link below:
How to fix WPF applications crashing
If you didn’t read David’s blog post, he mentions that the exported winpe.wim file from the boot.wim file (index 1) coming with the Windows 10 version 1809 source media doesn’t have the same issue like the winpe.wim file included in Windows ADK version 1809. Essentially, there’s two missing files in the winpe.wim file from Windows ADK version 1809:
In this blog post you’ll find a PowerShell script that I put together to easily update your existing boot images that have already been reloaded from Windows ADK version 1809. Before running the script below, I suggest that you make a copy of the boot.wim /winpe.wim file being used in the boot image.
# Variables $SourceMountPath = "C:\Temp\Mount\Source" # Create this folder $BootImageMountPath = "C:\Temp\Mount\Current" # Create this folder $SourceExportFolder = "C:\Temp\Export" # Create this folder $SourceBootPath = "C:\Temp\Export\boot.wim" # boot.wim file copied to this location from the Windows 10 1809 x64 source media $BootImagePath = "" # Local path to your boot.wim / winpe.wim file (not boot.PACKAGEID.wim) for your boot image in ConfigMgr # Export winpe.wim from boot.wim from Windows 10 1809 source files $ExportImagePath = Join-Path -Path $SourceExportFolder -ChildPath "winpe.wim" Export-WindowsImage -SourceImagePath $SourceBootPath -DestinationImagePath $ExportImagePath -SourceIndex 1 # Mount exported WinPE image Mount-WindowsImage -ImagePath $ExportImagePath -Index 1 -Path $SourceMountPath # Mount boot image Mount-WindowsImage -ImagePath $BootImagePath -Index 1 -Path $BootImageMountPath # Copy BCP47*.dll's $SourceFilePath = Join-Path -Path $SourceMountPath -ChildPath "Windows\System32\*" $BootImageFilePath = Join-Path -Path $BootImageMountPath -ChildPath "Windows\System32" Copy-Item -Path $SourceFilePath -Destination $BootImageFilePath -Filter "BCP47*.dll" -Force # Dismount exported WinPE image Dismount-WindowsImage -Path $SourceMountPath -Discard # Dismount boot image Dismount-WindowsImage -Path $BootImageMountPath -Save
Here’s how to use the script:
- Make sure that you have access to a Windows 10 version 1809 64-bit ISO file and extract it’s content to a location in your site server.
- Create the required folders for exporting and mounting:
- Copy the boot.wim file from the extracted location of Windows 10 version 1809 64-bit to the C:\Temp\Export folder.
- Update the $BootImagePath variable in the PowerShell script with the local path to the boot.wim / winpe.wim found in the data source of your boot image (remember to include the file name).
- Execute the script.
There’s no useful output from the script, however if there’s no red errors, it’s all grand. Now redistribute your updated boot image to your distribution points. Your boot image should now be able to run WPF applications again once this has been completed, see screenshot below from a virtual machine booting on a winpe.wim image from Windows ADK version 1809 that has been updates with the two missing dll’s:
Once again, all credit to David Segura that figured this out!