From dd7debf0f91189aaa96969b234dac6e3f4672c08 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sat, 3 Feb 2024 13:40:18 +0300 Subject: [PATCH] Update Download_SophiApp.ps1 --- Download_SophiApp.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Download_SophiApp.ps1 b/Download_SophiApp.ps1 index d9e5f592..92c32213 100644 --- a/Download_SophiApp.ps1 +++ b/Download_SophiApp.ps1 @@ -66,7 +66,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); } if (-not ("WinAPI.ForegroundWindow" -as [type])) { - Add-Type @SetForegroundWindow + try + { + Add-Type @Signature + } + catch [System.Management.Automation.ParameterBindingException] + { + 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." + } } Start-Sleep -Seconds 1