Workaround: Fixing crashing WPF forms in Powershell after updating to Windows 10 ADK v1809

Introduction

No real introduction is needed here. Long story short is, if you installed the new Windows 10 ADK v1809 and the new Windows PE add-on, chances are that you have issues with WPF forms in Powershell in Windows PE.

Luckily we have Twitter and the community is darn fast in sharing workarounds and what not – and this time is no different. More specifically these two conversations on Twitter by @AdamGrossTX and @ferozekhan267oa are interesting.

@ferozekhan267oa mentioned that replacing ‘UIAutomationCore.dll’ in Windows PE was fixing the problem in his end, so I decided to give it a go as well.

I’m using NickolajA‘s ConfigMgr front end, both in production and in labs, so when I updated to the new v1809 ADK and Windows PE, I immediately spotted that something was wrong; no frontend was ever being launched and SMSTS.log was indicating issues as well.

The error in smsts.log in Windows PE

Workaround

First off, this is a workaround and shall be treated that way, but following is how you can get WPF in Powershell to be working again in Windows PE v1809.

  • Grab a copy of your v1803 boot image
  • Launch ‘Deployment and Imaging Tools Environment‘ as an administrator (this is a part of the ADK)
  • Mount the v1803 boot image using DISM.exe:
dism.exe /mount-wim /wimfile:C:\WINPE\boot.wim /index:1 /mountdir:C:\WINPE\mount

  • Browse the mounted directory and copy out the ‘old’ UIAutomationCore.dll file. See below illustration:

  • Unmount the wim and discard any changes:
dism.exe /unmount-wim /mountdir:C:\WINPE\mount /discard

  • Now! Mount your v1809 boot image using same procedure:
dism.exe /mount-wim /wimfile:C:\WINPE\boot.wim /index:1 /mountdir:C:\WINPE\mount
  • Browse and replace the ‘UIAutomationCore.dll’ in your v1809 boot image. Notice there’s a difference in version and dates.
  • NOTE: You will need to take ownership of the file and grant yourself permissions to replace the file.

  • Next, unmount the boot image again, this time saving the changes using /commit
dism.exe /unmount-wim /mountdir:C:\WINPE\mount /commit

  • Finally. Update the Distribution Points in SCCM.

  • But do NOT reload the boot image from the installed ADK.

This is a workaround and is probably not recommended for production. But if you are desperate this can serve as a temporary solution 🙂

3 thoughts on “Workaround: Fixing crashing WPF forms in Powershell after updating to Windows 10 ADK v1809”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.