Browse Source

fixed missed brackets

pull/411/head
Dmitry Nefedov 2 years ago
parent
commit
3bff931a79
  1. 2
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  2. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  3. 4
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  4. 4
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

2
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -10797,7 +10797,6 @@ function HEIF
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process { $Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value $TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1 $HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
}
# Installing "HEVC Video Extensions from Device Manufacturer" # Installing "HEVC Video Extensions from Device Manufacturer"
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version) if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
@ -10817,6 +10816,7 @@ function HEIF
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
} }
} }
}
catch [System.Net.WebException] catch [System.Net.WebException]
{ {
Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Warning -Message ($Localization.NoResponse -f "https://github.com")

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -10835,7 +10835,6 @@ function HEIF
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process { $Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value $TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1 $HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
}
# Installing "HEVC Video Extensions from Device Manufacturer" # Installing "HEVC Video Extensions from Device Manufacturer"
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version) if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
@ -10855,6 +10854,7 @@ function HEIF
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
} }
} }
}
catch [System.Net.WebException] catch [System.Net.WebException]
{ {
Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Warning -Message ($Localization.NoResponse -f "https://github.com")

4
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -184,7 +184,7 @@ function Checks
} }
# Check whether LGPO.exe exists in the bin folder # Check whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe") if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe"))
{ {
Write-Warning -Message $Localization.Bin Write-Warning -Message $Localization.Bin
Start-Sleep -Seconds 5 Start-Sleep -Seconds 5
@ -10216,7 +10216,6 @@ function HEIF
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process { $Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value $TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1 $HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
}
# Installing "HEVC Video Extensions from Device Manufacturer" # Installing "HEVC Video Extensions from Device Manufacturer"
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version) if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
@ -10236,6 +10235,7 @@ function HEIF
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
} }
} }
}
catch [System.Net.WebException] catch [System.Net.WebException]
{ {
Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Warning -Message ($Localization.NoResponse -f "https://github.com")

4
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -184,7 +184,7 @@ function Checks
} }
# Check whether LGPO.exe exists in the bin folder # Check whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe") if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe"))
{ {
Write-Warning -Message $Localization.Bin Write-Warning -Message $Localization.Bin
Start-Sleep -Seconds 5 Start-Sleep -Seconds 5
@ -10254,7 +10254,6 @@ function HEIF
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process { $Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value $TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1 $HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
}
# Installing "HEVC Video Extensions from Device Manufacturer" # Installing "HEVC Video Extensions from Device Manufacturer"
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version) if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
@ -10274,6 +10273,7 @@ function HEIF
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
} }
} }
}
catch [System.Net.WebException] catch [System.Net.WebException]
{ {
Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Warning -Message ($Localization.NoResponse -f "https://github.com")

Loading…
Cancel
Save