From 602bc6e43417f8ef39243df6762cbff064070d99 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sat, 25 Sep 2021 14:47:39 +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 0fc52de9..6bd6ba34 100644 --- a/Download_Sophia.ps1 +++ b/Download_Sophia.ps1 @@ -124,7 +124,7 @@ Remove-Item -Path "$DownloadsFolder\Sophia.Script.zip" -Force Start-Sleep -Second 1 -Invoke-Item -Path "$DownloadsFolder\Sophia Script *" +Invoke-Item -Path "$DownloadsFolder\Sophia Script v$LatestStableVersion" $SetForegroundWindow = @{ Namespace = "WinAPI" @@ -143,7 +143,7 @@ if (-not ("WinAPI.ForegroundWindow" -as [type])) Add-Type @SetForegroundWindow } -Get-Process | Where-Object -FilterScript {$_.MainWindowTitle -eq "Sophia Script v$LatestRelease"} | ForEach-Object -Process { +Get-Process | Where-Object -FilterScript {$_.MainWindowTitle -eq "Sophia Script v$LatestStableVersion"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 5)