UIAutomationCore Fix
Fix for UIAutomationCore.dll error on Linux with Streamer.bot v1.0.5 or later
JoacoSlime
Since the problem is caused by wine's incomplete UIAutomationCore implementation, there are two ways to fix it
Option 1: Getting UIAutomationCore.dll from Windows (or an ISO)
You will need to get the UIAutomationCore.dll file from C:\Windows\System32\UIAutomationCore.dll.
- If you have dual boot or another computer with windows 10 or 11 available, then you can copy the file from there to the prefix's
drive_c/Windows/System32 - If the options above are not available, then you can download a clean Win 10 ISO from Microsoft and use that:
- Download the ISO from:
https://www.microsoft.com/en-us/software-download/windows10ISO - Either use the attached
UIAC.shscript to extract the file (requiresp7zip) OR do the following: - Mount the Win 10 ISO and go to the
sourcesfolder inside OR extractinstall.wimusing p7zip:7z e ISO_PATH sources/install.wim - Either mount the
install.wimfile usingwimliband copy the file fromWindows/System32/UIAutomationCore.dllOR extract the file using p7zip7z e install.wim 1/Windows/System32/UIAutomationCore.dll
- Download the ISO from:
Where to put UIAutomationCore.dll
Depending on how you installed Streamer.Bot, the location of where you have to place the obtained file varies:
- Using Lutris: Go to
Game options, go to the directory set inWine Prefix, then go todrive_c/windows/system32. - Using Bottles: Inside the SB bottle, click the
Browse C:/ driveoption, then go towindows/system32. - Using the install script:
~/.local/lib/streamer.bot/pfx/drive_c/windows/system32
UIAC.sh
#!/bin/bash
# Saving the script directory
DIR=$(pwd)
# Changing to a temporal working directory
cd "$(mktemp -d)" || echo Error changing to a temporal directory, \
will use the script directory instead.
# Verifing that we have a working environment
if ! command -v 7z &>/dev/null; then
echo Install the needed package: p7zip
echo Fedora: sudo dnf install p7zip
echo Debian/Ubuntu: sudo apt-get install p7zip-full
exit 1
fi
# Asking for the ISO file
echo Insert the path to the Windows ISO file:
read -r ISO_PATH
ISO_PATH=$(realpath "$ISO_PATH") # Solving path, just because
echo
echo Extracting install.wim...
# Getting the install.wim from the ISO
if ! 7z e "$ISO_PATH" sources/install.wim &>/dev/null; then
echo An error ocurred extracting the Windows installation file.
exit 1
fi
echo
echo Extracting UIAutomationCore.dll...
# Get the UIAutomationCore.dll from the .wim
if ! 7z e install.wim 1/Windows/System32/UIAutomationCore.dll &>/dev/null; then
echo An error ocurred extracting UIAutomationCore.dll from the installation file.
exit 1
fi
echo
# Move the file where the script is called from and clean the directory
mv UIAutomationCore.dll "$DIR/UIAutomationCore.dll"
rm install.wim
echo "Done! UIAutomationCore.dll was extracted and moved to $DIR/UIAutomationCore.dll"
Option 2: Update to wine-staging
This method might cause audio and/or performance problems since we won't be using Proton fixes.
For both Lutris and Bottles, you have to manage and install other runners than the default if you haven't already.
Depending on how you installed Streamer.Bot, the way of changing the wine version used is different:
- Using Lutris, change the runner (in
runner options) to either:wine 11.14 stagingSystem(if it's 11.9 or newer)
- Using Bottles, change the runner to either:
kron4ek's 11.14 stagingor newer (NOT tkg, Recomended)Built-in wine 11or newerkron4ek's 11.14 staging tkgor newer
- Using the install Script:
- Check that your wine version is
11.9 (staging)or newer (usewine --version), if it's not, then you'll have to update wine, use your distribution's way of doing that or follow winehq guide to add their repos.
- Check that your wine version is