diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
index ca1cfa04..49650c68 100644
--- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
+++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
@@ -10797,24 +10797,24 @@ function HEIF
$Raw | Select-String -Pattern '
.*)"\s.*>(?.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
- }
- # Installing "HEVC Video Extensions from Device Manufacturer"
- if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
- {
- Write-Verbose -Message $Localization.Patient -Verbose
- Write-Verbose -Message $Localization.HEVCDownloading -Verbose
+ # Installing "HEVC Video Extensions from Device Manufacturer"
+ if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
+ {
+ Write-Verbose -Message $Localization.Patient -Verbose
+ Write-Verbose -Message $Localization.HEVCDownloading -Verbose
+
+ $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
+ $Parameters = @{
+ Uri = $TempURL
+ OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
+ Verbose = $true
+ }
+ Invoke-WebRequest @Parameters
- $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
- $Parameters = @{
- Uri = $TempURL
- OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
- Verbose = $true
+ Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
+ Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
- Invoke-WebRequest @Parameters
-
- Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
- Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
}
catch [System.Net.WebException]
diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
index 40c8b288..1ec70478 100644
--- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
+++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
@@ -10835,24 +10835,24 @@ function HEIF
$Raw | Select-String -Pattern '.*)"\s.*>(?.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
- }
- # Installing "HEVC Video Extensions from Device Manufacturer"
- if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
- {
- Write-Verbose -Message $Localization.Patient -Verbose
- Write-Verbose -Message $Localization.HEVCDownloading -Verbose
+ # Installing "HEVC Video Extensions from Device Manufacturer"
+ if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
+ {
+ Write-Verbose -Message $Localization.Patient -Verbose
+ Write-Verbose -Message $Localization.HEVCDownloading -Verbose
+
+ $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
+ $Parameters = @{
+ Uri = $TempURL
+ OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
+ Verbose = $true
+ }
+ Invoke-WebRequest @Parameters
- $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
- $Parameters = @{
- Uri = $TempURL
- OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
- Verbose = $true
+ Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
+ Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
- Invoke-WebRequest @Parameters
-
- Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
- Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
}
catch [System.Net.WebException]
diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
index af55f5dc..2924164c 100644
--- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
+++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
@@ -184,7 +184,7 @@ function Checks
}
# 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
Start-Sleep -Seconds 5
@@ -10216,24 +10216,24 @@ function HEIF
$Raw | Select-String -Pattern '.*)"\s.*>(?.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
- }
- # Installing "HEVC Video Extensions from Device Manufacturer"
- if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
- {
- Write-Verbose -Message $Localization.Patient -Verbose
- Write-Verbose -Message $Localization.HEVCDownloading -Verbose
+ # Installing "HEVC Video Extensions from Device Manufacturer"
+ if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
+ {
+ Write-Verbose -Message $Localization.Patient -Verbose
+ Write-Verbose -Message $Localization.HEVCDownloading -Verbose
+
+ $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
+ $Parameters = @{
+ Uri = $TempURL
+ OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
+ Verbose = $true
+ }
+ Invoke-WebRequest @Parameters
- $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
- $Parameters = @{
- Uri = $TempURL
- OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
- Verbose = $true
+ Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
+ Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
- Invoke-WebRequest @Parameters
-
- Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
- Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
}
catch [System.Net.WebException]
diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
index 8f2e06a5..fb410663 100644
--- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
+++ b/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
- if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe")
+ if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe"))
{
Write-Warning -Message $Localization.Bin
Start-Sleep -Seconds 5
@@ -10254,24 +10254,24 @@ function HEIF
$Raw | Select-String -Pattern '.*)"\s.*>(?.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
- }
- # Installing "HEVC Video Extensions from Device Manufacturer"
- if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
- {
- Write-Verbose -Message $Localization.Patient -Verbose
- Write-Verbose -Message $Localization.HEVCDownloading -Verbose
+ # Installing "HEVC Video Extensions from Device Manufacturer"
+ if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
+ {
+ Write-Verbose -Message $Localization.Patient -Verbose
+ Write-Verbose -Message $Localization.HEVCDownloading -Verbose
+
+ $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
+ $Parameters = @{
+ Uri = $TempURL
+ OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
+ Verbose = $true
+ }
+ Invoke-WebRequest @Parameters
- $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
- $Parameters = @{
- Uri = $TempURL
- OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
- Verbose = $true
+ Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
+ Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
- Invoke-WebRequest @Parameters
-
- Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
- Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
}
catch [System.Net.WebException]