From 17092dba40fd572e9a574e4bd6dc6f81fb465d55 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sat, 3 Feb 2024 13:46:47 +0300 Subject: [PATCH] Update Download_Sophia.ps1 --- Download_Sophia.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Download_Sophia.ps1 b/Download_Sophia.ps1 index 6f7dbd46..6a5471d1 100644 --- a/Download_Sophia.ps1 +++ b/Download_Sophia.ps1 @@ -206,9 +206,9 @@ if (-not ("WinAPI.ForegroundWindow" -as [type])) { try { - Add-Type @Signature + Add-Type @SetForegroundWindow } - catch [System.Management.Automation.ParameterBindingException] + catch [System.ComponentModel.Win32Exception] { Write-Warning -Message "PowerShell 5.1 does not compile code if the username contains non-Latin characters (including emoji) and is written in lowercase. Ignore this error message. Open background folder manually." }