Browse Source

Update Download_Sophia.ps1

pull/277/head
Dmitry Nefedov 3 years ago
committed by GitHub
parent
commit
724ac93733
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Download_Sophia.ps1

1
Download_Sophia.ps1

@ -207,7 +207,6 @@ if (-not ("WinAPI.ForegroundWindow" -as [type]))
Add-Type @SetForegroundWindow Add-Type @SetForegroundWindow
} }
# The function doesn't work in Windows 11 any more
Get-Process -Name explorer | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows $([System.Environment]::OSVersion.Version.Major)"} | ForEach-Object -Process { Get-Process -Name explorer | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows $([System.Environment]::OSVersion.Version.Major)"} | ForEach-Object -Process {
# Show window, if minimized # Show window, if minimized
[WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 5) [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 5)

Loading…
Cancel
Save