Browse Source

6.1.2 — 10.07.2022

pull/378/head
Dmitry Nefedov 2 years ago
parent
commit
ec6c64a052
  1. BIN
      AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx
  2. 101
      Sophia Script/Sophia Script for Windows 10 LTSC 2019/Module/Sophia.psm1
  3. 13
      Sophia Script/Sophia Script for Windows 10 LTSC 2019/Sophia.ps1
  4. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/de-DE/Sophia.psd1
  5. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/en-US/Sophia.psd1
  6. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/es-ES/Sophia.psd1
  7. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/fr-FR/Sophia.psd1
  8. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/hu-HU/Sophia.psd1
  9. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/it-IT/Sophia.psd1
  10. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/pt-BR/Sophia.psd1
  11. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/ru-RU/Sophia.psd1
  12. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/tr-TR/Sophia.psd1
  13. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/uk-UA/Sophia.psd1
  14. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/zh-CN/Sophia.psd1
  15. 83
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Module/Sophia.psm1
  16. 13
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Sophia.ps1
  17. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/de-DE/Sophia.psd1
  18. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/en-US/Sophia.psd1
  19. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/es-ES/Sophia.psd1
  20. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/fr-FR/Sophia.psd1
  21. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/hu-HU/Sophia.psd1
  22. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/it-IT/Sophia.psd1
  23. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/pt-BR/Sophia.psd1
  24. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/ru-RU/Sophia.psd1
  25. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/tr-TR/Sophia.psd1
  26. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/uk-UA/Sophia.psd1
  27. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/zh-CN/Sophia.psd1
  28. 199
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Module/Sophia.psm1
  29. 15
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Sophia.ps1
  30. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/de-DE/Sophia.psd1
  31. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/en-US/Sophia.psd1
  32. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/es-ES/Sophia.psd1
  33. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/fr-FR/Sophia.psd1
  34. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/hu-HU/Sophia.psd1
  35. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/it-IT/Sophia.psd1
  36. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/pt-BR/Sophia.psd1
  37. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/ru-RU/Sophia.psd1
  38. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/tr-TR/Sophia.psd1
  39. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/uk-UA/Sophia.psd1
  40. 2
      Sophia Script/Sophia Script for Windows 10/Localizations/zh-CN/Sophia.psd1
  41. 194
      Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1
  42. 14
      Sophia Script/Sophia Script for Windows 10/Sophia.ps1
  43. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/de-DE/Sophia.psd1
  44. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/en-US/Sophia.psd1
  45. 3
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/es-ES/Sophia.psd1
  46. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/fr-FR/Sophia.psd1
  47. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/hu-HU/Sophia.psd1
  48. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/it-IT/Sophia.psd1
  49. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/pt-BR/Sophia.psd1
  50. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/ru-RU/Sophia.psd1
  51. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/tr-TR/Sophia.psd1
  52. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/uk-UA/Sophia.psd1
  53. 1
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/zh-CN/Sophia.psd1
  54. 326
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1
  55. 19
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1
  56. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/de-DE/Sophia.psd1
  57. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/en-US/Sophia.psd1
  58. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/es-ES/Sophia.psd1
  59. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/fr-FR/Sophia.psd1
  60. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/hu-HU/Sophia.psd1
  61. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/it-IT/Sophia.psd1
  62. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/pt-BR/Sophia.psd1
  63. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/ru-RU/Sophia.psd1
  64. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/tr-TR/Sophia.psd1
  65. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/uk-UA/Sophia.psd1
  66. 1
      Sophia Script/Sophia Script for Windows 11/Localizations/zh-CN/Sophia.psd1
  67. 321
      Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1
  68. 19
      Sophia Script/Sophia Script for Windows 11/Sophia.ps1

BIN
AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx

Binary file not shown.

101
Sophia Script/Sophia Script for Windows 10 LTSC 2019/Module/Sophia.psm1

@ -16,7 +16,7 @@
.NOTES
Supported Windows 10 version
Version: 1809
Build: 17763
Build: 17763.3046+
Edition: Enterprise LTSC
Architecture: x64
@ -91,6 +91,33 @@ function Checkings
}
}
# Check whether the OS minor build version is 3046 minimum
# https://docs.microsoft.com/en-us/windows/release-health/release-information
# https://support.microsoft.com/en-us/topic/windows-10-and-windows-server-2019-update-history-725fc2e1-4443-6831-a5ca-51ff5cbcb059
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 3046)
{
$false
{
$Version = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR
Write-Warning -Message ($Localization.UpdateWarning -f $Version)
# Enable receiving updates for other Microsoft products when you update Windows
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
Start-Sleep -Seconds 1
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate-action"
Start-Sleep -Seconds 1
# Trigger Windows Update for detecting new updates
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
exit
}
}
# Check the language mode
switch ($ExecutionContext.SessionState.LanguageMode -ne "FullLanguage")
{
@ -6916,7 +6943,12 @@ function InstallDotNetRuntime6
(Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP
[System.IO.Path]::GetTempPath()
#>
Get-ChildItem -Path "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe", "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe", "$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore
$Paths = @(
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe",
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe",
"$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log"
)
Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore
}
}
catch [System.Net.WebException]
@ -6927,6 +6959,64 @@ function InstallDotNetRuntime6
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
<#
.SYNOPSIS
Bypass RKN restrictins using antizapret.prostovpn.org proxies
.PARAMETER Enable
Enable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.PARAMETER Disable
Disable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.EXAMPLE
RKNBypass -Enable
.EXAMPLE
RKNBypass -Disable
.LINK
https://antizapret.prostovpn.org
.NOTES
Current user
#>
function RKNBypass
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
# If current region is Russia
if (((Get-WinHomeLocation).GeoId -eq "203"))
{
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -PropertyType String -Value "https://antizapret.prostovpn.org/proxy.pac" -Force
}
}
"Disable"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force
}
}
}
#endregion System
#region Start menu
@ -9228,6 +9318,13 @@ function MultipleInvokeContext
#>
function UpdateLGPEPolicies
{
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {
($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")
}))
{
return
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Information -MessageData "" -InformationAction Continue

13
Sophia Script/Sophia Script for Windows 10 LTSC 2019/Sophia.ps1

@ -27,7 +27,7 @@
.NOTES
Supported Windows 10 version
Version: 1809
Build: 17763
Build: 17763.3046+
Edition: Enterprise LTSC 2019
Architecture: x64
@ -77,6 +77,7 @@ Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force
# Import module for modifying registry.pol files (Administrative Templates) of local GPOs
# Used for UpdateLGPEPolicies function
# https://www.powershellgallery.com/packages/PolicyFileEditor
Remove-Module -Name PolicyFileEditor -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\bin\PolicyFileEditor\PolicyFileEditor.psd1 -PassThru -Force
@ -759,6 +760,16 @@ InstallVCRedistx64
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
#>
InstallDotNetRuntime6
# Enable proxying only blocked sites from the unified registry of Roskomnadzor
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора
# https://antizapret.prostovpn.org
RKNBypass -Enable
# Disable proxying only blocked sites from the unified registry of Roskomnadzor (default value)
# Выключить проксирование только заблокированных сайтов из единого реестра Роскомнадзора (значение по умолчанию)
# https://antizapret.prostovpn.org
# RKNBypass -Disable
#endregion System
#region Start menu

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/de-DE/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Das Skript unterstützt nur Windows 10 x64
UnsupportedOSBuild = Das Skript unterstützt Windows 10 Enterprise LTSC 2021
UpdateWarning = Das kumulative Windows 10-Update wurde installiert: {0}. Unterstütztes kumulatives Update: 1348 und höher
UpdateWarning = Das kumulative Windows 10-Update wurde installiert: {0}. Unterstütztes kumulatives Update: 1766 und höher
UnsupportedLanguageMode = Die PowerShell-Sitzung wird in einem eingeschränkten Sprachmodus ausgeführt
LoggedInUserNotAdmin = Der angemeldete Benutzer hat keine Administratorrechte
UnsupportedPowerShell = Sie versuchen ein Skript über PowerShell {0}.{1} auszuführen. Das Skript in der entsprechenden PowerShell-Version ausführen

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/en-US/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = The script supports Windows 10 x64 only
UnsupportedOSBuild = The script supports Windows 10 Enterprise LTSC 2021
UpdateWarning = Windows 10 cumulative update installed: {0}. Supported cumulative update: 1348 and higher
UpdateWarning = Windows 10 cumulative update installed: {0}. Supported cumulative update: 1766 and higher
UnsupportedLanguageMode = The PowerShell session in running in a limited language mode
LoggedInUserNotAdmin = The logged-on user doesn't have admin rights
UnsupportedPowerShell = You're trying to run script via PowerShell {0}.{1}. Run the script in the appropriate PowerShell version

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/es-ES/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = El script sólo es compatible con Windows 10 x64
UnsupportedOSBuild = El script es compatible con versión Windows 10 Enterprise LTSC 2021
UpdateWarning = Actualización acumulativa de Windows 10 instalada: {0}. Actualización acumulativa soportada: 1348 y superior
UpdateWarning = Actualización acumulativa de Windows 10 instalada: {0}. Actualización acumulativa soportada: 1766 y superior
UnsupportedLanguageMode = Sesión de PowerShell ejecutada en modo de lenguaje limitado
LoggedInUserNotAdmin = El usuario que inició sesión no tiene derechos de administrador
UnsupportedPowerShell = Estás intentando ejecutar el script a través de PowerShell {0}.{1}. Ejecute el script en la versión apropiada de PowerShell

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/fr-FR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Le script supporte uniquement Windows 10 x64
UnsupportedOSBuild = Le script supporte les versions Windows 10 Enterprise LTSC 2021
UpdateWarning = La mise à jour cumulative de Windows 10 est installée : {0}. Mise à jour cumulative prise en charge: 1348 et plus
UpdateWarning = La mise à jour cumulative de Windows 10 est installée : {0}. Mise à jour cumulative prise en charge: 1766 et plus
UnsupportedLanguageMode = La session PowerShell s'exécute dans un mode de langue limité
LoggedInUserNotAdmin = L'utilisateur connecté n'a pas de droits d'administrateur
UnsupportedPowerShell = Vous essayez d'exécuter le script via PowerShell {0}.{1}. Exécutez le script dans la version appropriée de PowerShell

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/hu-HU/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = A szkript csak a Windows 10 64 bites verziót támogatja
UnsupportedOSBuild = A szkript támogatja a Windows 10 Enterprise LTSC 2021
UpdateWarning = A Windows 10 összesített frissítése telepítve: {0}. Támogatott kumulatív frissítés: 1348 és magasabb verziószámok
UpdateWarning = A Windows 10 összesített frissítése telepítve: {0}. Támogatott kumulatív frissítés: 1766 és magasabb verziószámok
UnsupportedLanguageMode = A PowerShell munkamenet korlátozott nyelvi üzemmódban fut
LoggedInUserNotAdmin = A bejelentkezett felhasználó nem rendelkezik admin jogokkal
UnsupportedPowerShell = A PowerShell {0}.{1} segítségével próbálja futtatni a szkriptet. Futtassa a szkriptet a megfelelő PowerShell-verzióban

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/it-IT/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Lo script supporta solo Windows 10 x64
UnsupportedOSBuild = Lo script supporta Windows 10 Enterprise LTSC 2021
UpdateWarning = Windows 10 cumulative update installato: {0}. È necessario l'aggiornamento cumulativo 1348 o superiori
UpdateWarning = Windows 10 cumulative update installato: {0}. È necessario l'aggiornamento cumulativo 1766 o superiori
UnsupportedLanguageMode = La sessione PowerShell è in esecuzione in modalità lingua limitata
LoggedInUserNotAdmin = L'utente in suo non ha i diritti di amministratore
UnsupportedPowerShell = Stai cercando di eseguire lo script tramite PowerShell {0}.{1}. Esegui lo script nella versione di PowerShell appropriata

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/pt-BR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = O script suporta somente Windows 10 x64
UnsupportedOSBuild = O script suporta versões Windows 10 Enterprise LTSC 2021
UpdateWarning = Atualização cumulativa do Windows 10 instalado: {0}. Actualização acumulada suportada: 1348 e superior
UpdateWarning = Atualização cumulativa do Windows 10 instalado: {0}. Actualização acumulada suportada: 1766 e superior
UnsupportedLanguageMode = A sessão PowerShell em funcionamento em um modo de linguagem limitada
LoggedInUserNotAdmin = O usuário logado não tem direitos de administrador
UnsupportedPowerShell = Você está tentando executar o script via PowerShell {0}.{1}. Execute o script na versão apropriada do PowerShell

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/ru-RU/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Скрипт поддерживает только Windows 10 x64
UnsupportedOSBuild = Скрипт поддерживает только Windows 10 Enterprise LTSC 2021
UpdateWarning = Установленный накопительный пакет обновления Windows 10: {0}. Поддерживаемый накопительный пакет обновления: 1348 и выше
UpdateWarning = Установленный накопительный пакет обновления Windows 10: {0}. Поддерживаемый накопительный пакет обновления: 1766 и выше
UnsupportedLanguageMode = Сессия PowerShell работает в ограниченном режиме
LoggedInUserNotAdmin = Текущий вошедший пользователь не обладает правами администратора
UnsupportedPowerShell = Вы пытаетесь запустить скрипт в PowerShell {0}.{1}. Запустите скрипт в соответствующей версии PowerShell

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/tr-TR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Bu betik sadece Windows 10 x64 destekliyor
UnsupportedOSBuild = Komut dosyası, Windows 10 Enterprise LTSC 2021
UpdateWarning = Windows 10 toplu güncelleştirmesi yüklendi: {0}. Desteklenen toplu güncelleme: 1348 ve üstü
UpdateWarning = Windows 10 toplu güncelleştirmesi yüklendi: {0}. Desteklenen toplu güncelleme: 1766 ve üstü
UnsupportedLanguageMode = Sınırlı bir dil modunda çalışan PowerShell oturumu
LoggedInUserNotAdmin = Oturum açan kullanıcının yönetici hakları yok
UnsupportedPowerShell = Komut dosyasını PowerShell {0}.{1} aracılığıyla çalıştırmaya çalışıyorsunuz. Komut dosyasını uygun PowerShell sürümünde çalıştırın

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/uk-UA/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Скрипт підтримує тільки Windows 10 x64
UnsupportedOSBuild = Скрипт підтримує тільки Windows 10 Enterprise LTSC 2021
UpdateWarning = Встановлений зведене оновлення Windows 10: {0}. Підтримуваний накопичувальний пакет оновлення: 1348 і вище
UpdateWarning = Встановлений зведене оновлення Windows 10: {0}. Підтримуваний накопичувальний пакет оновлення: 1766 і вище
UnsupportedLanguageMode = Сесія PowerShell працює в обмеженому режимі
LoggedInUserNotAdmin = Поточний увійшов користувач не володіє правами адміністратора
UnsupportedPowerShell = Ви намагаєтеся запустити скрипт в PowerShell {0}.{1}. Запустіть скрипт у відповідній версії PowerShell

2
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/zh-CN/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = 该脚本仅支持Windows 10 x64
UnsupportedOSBuild = 该脚本支持Windows 10 Enterprise LTSC 2021
UpdateWarning = 安装了Windows 10累积更新{0}. 支持的累积更新1348及以上
UpdateWarning = 安装了Windows 10累积更新{0}. 支持的累积更新1766及以上
UnsupportedLanguageMode = PowerShell会话在有限的语言模式下运行
LoggedInUserNotAdmin = 登录的用户没有管理员的权利
UnsupportedPowerShell = 你想通过PowerShell {0}.{1}运行脚本在适当的PowerShell版本中运行该脚本

83
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Module/Sophia.psm1

@ -16,7 +16,7 @@
.NOTES
Supported Windows 10 version
Versions: 21H2
Builds: 19044
Builds: 19044.1766+
Editions: Enterprise LTSC 2021
Architecture: x64
@ -79,9 +79,6 @@ function Checkings
Start-Sleep -Seconds 1
# Check for UWP apps updates
Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod
# Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate-action"
@ -94,8 +91,10 @@ function Checkings
}
}
# Check whether the OS minor build version is 1151 minimum
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 1348)
# Check whether the OS minor build version is 1766 minimum
# https://docs.microsoft.com/en-us/windows/release-health/release-information
# https://support.microsoft.com/en-us/topic/june-14-2022-kb5014699-os-builds-19042-1766-19043-1766-and-19044-1766-5c81d49d-0b6e-4808-9485-1f54e5d1bb15
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 1766)
{
$false
{
@ -7499,7 +7498,12 @@ function InstallDotNetRuntime6
(Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP
[System.IO.Path]::GetTempPath()
#>
Get-ChildItem -Path "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe", "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe", "$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore
$Paths = @(
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe",
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe",
"$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log"
)
Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore
}
catch [System.Net.WebException]
{
@ -7509,6 +7513,64 @@ function InstallDotNetRuntime6
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
<#
.SYNOPSIS
Bypass RKN restrictins using antizapret.prostovpn.org proxies
.PARAMETER Enable
Enable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.PARAMETER Disable
Disable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.EXAMPLE
RKNBypass -Enable
.EXAMPLE
RKNBypass -Disable
.LINK
https://antizapret.prostovpn.org
.NOTES
Current user
#>
function RKNBypass
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
# If current region is Russia
if (((Get-WinHomeLocation).GeoId -eq "203"))
{
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -PropertyType String -Value "https://antizapret.prostovpn.org/proxy.pac" -Force
}
}
"Disable"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force
}
}
}
#endregion System
#region WSL
@ -10413,6 +10475,13 @@ function MultipleInvokeContext
#>
function UpdateLGPEPolicies
{
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {
($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")
}))
{
return
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Information -MessageData "" -InformationAction Continue

13
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Sophia.ps1

@ -27,7 +27,7 @@
.NOTES
Supported Windows 10 versions
Version: 21H2
Build: 19044
Build: 19044.1766+
Edition: Enterprise LTSC 2021
Architecture: x64
@ -77,6 +77,7 @@ Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force
# Import module for modifying registry.pol files (Administrative Templates) of local GPOs
# Used for UpdateLGPEPolicies function
# https://www.powershellgallery.com/packages/PolicyFileEditor
Remove-Module -Name PolicyFileEditor -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\bin\PolicyFileEditor\PolicyFileEditor.psd1 -PassThru -Force
@ -849,6 +850,16 @@ InstallVCRedistx64
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
#>
InstallDotNetRuntime6
# Enable proxying only blocked sites from the unified registry of Roskomnadzor
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора
# https://antizapret.prostovpn.org
RKNBypass -Enable
# Disable proxying only blocked sites from the unified registry of Roskomnadzor (default value)
# Выключить проксирование только заблокированных сайтов из единого реестра Роскомнадзора (значение по умолчанию)
# https://antizapret.prostovpn.org
# RKNBypass -Disable
#endregion System
#region WSL

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/de-DE/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Das Skript unterstützt nur Windows 10 x64
UnsupportedOSBuild = Das Skript unterstützt Windows 10 2004/20H2/21H1/21H2-Versionen
UpdateWarning = Das kumulative Windows 10-Update wurde installiert: {0}. Unterstütztes kumulatives Update: 1151 und höher
UpdateWarning = Das kumulative Windows 10-Update wurde installiert: {0}. Unterstütztes kumulatives Update: 1766 und höher
UnsupportedLanguageMode = Die PowerShell-Sitzung wird in einem eingeschränkten Sprachmodus ausgeführt
LoggedInUserNotAdmin = Der angemeldete Benutzer hat keine Administratorrechte
UnsupportedPowerShell = Sie versuchen ein Skript über PowerShell {0}.{1} auszuführen. Das Skript in der entsprechenden PowerShell-Version ausführen

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/en-US/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = The script supports Windows 10 x64 only
UnsupportedOSBuild = The script supports Windows 10 2004/20H2/21H1/21H2 versions
UpdateWarning = Windows 10 cumulative update installed: {0}. Supported cumulative update: 1151 and higher
UpdateWarning = Windows 10 cumulative update installed: {0}. Supported cumulative update: 1766 and higher
UnsupportedLanguageMode = The PowerShell session in running in a limited language mode
LoggedInUserNotAdmin = The logged-on user doesn't have admin rights
UnsupportedPowerShell = You're trying to run script via PowerShell {0}.{1}. Run the script in the appropriate PowerShell version

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/es-ES/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = El script sólo es compatible con Windows 10 x64
UnsupportedOSBuild = El script es compatible con versión Windows 10 2004/20H2/21H1/21H2
UpdateWarning = Actualización acumulativa de Windows 10 instalada: {0}. Actualización acumulativa soportada: 1151 y superior
UpdateWarning = Actualización acumulativa de Windows 10 instalada: {0}. Actualización acumulativa soportada: 1766 y superior
UnsupportedLanguageMode = Sesión de PowerShell ejecutada en modo de lenguaje limitado
LoggedInUserNotAdmin = El usuario que inició sesión no tiene derechos de administrador
UnsupportedPowerShell = Estás intentando ejecutar el script a través de PowerShell {0}.{1}. Ejecute el script en la versión apropiada de PowerShell

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/fr-FR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Le script supporte uniquement Windows 10 x64
UnsupportedOSBuild = Le script supporte les versions Windows 10 2004/20H2/21H1/21H2
UpdateWarning = La mise à jour cumulative de Windows 10 est installée : {0}. Mise à jour cumulative prise en charge : 1151 et plus
UpdateWarning = La mise à jour cumulative de Windows 10 est installée : {0}. Mise à jour cumulative prise en charge : 1766 et plus
UnsupportedLanguageMode = La session PowerShell s'exécute dans un mode de langue limité
LoggedInUserNotAdmin = L'utilisateur connecté n'a pas de droits d'administrateur
UnsupportedPowerShell = Vous essayez d'exécuter le script via PowerShell {0}.{1}. Exécutez le script dans la version appropriée de PowerShell

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/hu-HU/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = A szkript csak a Windows 10 64 bites verziót támogatja
UnsupportedOSBuild = A szkript támogatja a Windows 10 2004/20H2/21H1/21H2 verziókat
UpdateWarning = A Windows 10 összesített frissítése telepítve: {0}. Támogatott kumulatív frissítés: 1151 és magasabb verziószámok
UpdateWarning = A Windows 10 összesített frissítése telepítve: {0}. Támogatott kumulatív frissítés: 1766 és magasabb verziószámok
UnsupportedLanguageMode = A PowerShell munkamenet korlátozott nyelvi üzemmódban fut
LoggedInUserNotAdmin = A bejelentkezett felhasználó nem rendelkezik admin jogokkal
UnsupportedPowerShell = A PowerShell {0}.{1} segítségével próbálja futtatni a szkriptet. Futtassa a szkriptet a megfelelő PowerShell-verzióban

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/it-IT/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Lo script supporta solo Windows 10 x64
UnsupportedOSBuild = Lo script supporta Windows 10 2004/20H2/21H1/21H2
UpdateWarning = Windows 10 cumulative update installato: {0}. È necessario l'aggiornamento cumulativo 1151 o superiori
UpdateWarning = Windows 10 cumulative update installato: {0}. È necessario l'aggiornamento cumulativo 1766 o superiori
UnsupportedLanguageMode = La sessione PowerShell è in esecuzione in modalità lingua limitata
LoggedInUserNotAdmin = L'utente in suo non ha i diritti di amministratore
UnsupportedPowerShell = Stai cercando di eseguire lo script tramite PowerShell {0}.{1}. Esegui lo script nella versione di PowerShell appropriata

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/pt-BR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = O script suporta somente Windows 10 x64
UnsupportedOSBuild = O script suporta versões Windows 10 2004/20H2/21H1/21H2
UpdateWarning = Atualização cumulativa do Windows 10 instalado: {0}. Actualização acumulada suportada: 1151 e superior
UpdateWarning = Atualização cumulativa do Windows 10 instalado: {0}. Actualização acumulada suportada: 1766 e superior
UnsupportedLanguageMode = A sessão PowerShell em funcionamento em um modo de linguagem limitada
LoggedInUserNotAdmin = O usuário logado não tem direitos de administrador
UnsupportedPowerShell = Você está tentando executar o script via PowerShell {0}.{1}. Execute o script na versão apropriada do PowerShell

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/ru-RU/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Скрипт поддерживает только Windows 10 x64
UnsupportedOSBuild = Скрипт поддерживает только Windows 10 версии 2004/20H2/21H1/21H2
UpdateWarning = Установленный накопительный пакет обновления Windows 10: {0}. Поддерживаемый накопительный пакет обновления: 1151 и выше
UpdateWarning = Установленный накопительный пакет обновления Windows 10: {0}. Поддерживаемый накопительный пакет обновления: 1766 и выше
UnsupportedLanguageMode = Сессия PowerShell работает в ограниченном режиме
LoggedInUserNotAdmin = Текущий вошедший пользователь не обладает правами администратора
UnsupportedPowerShell = Вы пытаетесь запустить скрипт в PowerShell {0}.{1}. Запустите скрипт в соответствующей версии PowerShell

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/tr-TR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Bu betik sadece Windows 10 x64 destekliyor
UnsupportedOSBuild = Komut dosyası, Windows 10 2004/20H2/21H1/21H2 sürümlerini destekler
UpdateWarning = Windows 10 toplu güncelleştirmesi yüklendi: {0}. Desteklenen toplu güncelleme: 1151 ve üstü
UpdateWarning = Windows 10 toplu güncelleştirmesi yüklendi: {0}. Desteklenen toplu güncelleme: 1766 ve üstü
UnsupportedLanguageMode = Sınırlı bir dil modunda çalışan PowerShell oturumu
LoggedInUserNotAdmin = Oturum açan kullanıcının yönetici hakları yok
UnsupportedPowerShell = Komut dosyasını PowerShell {0}.{1} aracılığıyla çalıştırmaya çalışıyorsunuz. Komut dosyasını uygun PowerShell sürümünde çalıştırın

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/uk-UA/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Скрипт підтримує тільки Windows 10 x64
UnsupportedOSBuild = Скрипт підтримує тільки Windows 10 версії 2004/20H2/21H1/21H2
UpdateWarning = Встановлений зведене оновлення Windows 10: {0}. Підтримуваний накопичувальний пакет оновлення: 1151 і вище
UpdateWarning = Встановлений зведене оновлення Windows 10: {0}. Підтримуваний накопичувальний пакет оновлення: 1766 і вище
UnsupportedLanguageMode = Сесія PowerShell працює в обмеженому режимі
LoggedInUserNotAdmin = Поточний увійшов користувач не володіє правами адміністратора
UnsupportedPowerShell = Ви намагаєтеся запустити скрипт в PowerShell {0}.{1}. Запустіть скрипт у відповідній версії PowerShell

2
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/zh-CN/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = 该脚本仅支持Windows 10 x64
UnsupportedOSBuild = 该脚本支持Windows 10版本2004/20H2/21H1/21H2和更高版本
UpdateWarning = 安装了Windows 10累积更新{0}. 支持的累积更新1151及以上
UpdateWarning = 安装了Windows 10累积更新{0}. 支持的累积更新1766及以上
UnsupportedLanguageMode = PowerShell会话在有限的语言模式下运行
LoggedInUserNotAdmin = 登录的用户没有管理员的权利
UnsupportedPowerShell = 你想通过PowerShell {0}.{1}运行脚本在适当的PowerShell版本中运行该脚本

199
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Module/Sophia.psm1

@ -16,7 +16,7 @@
.NOTES
Supported Windows 10 versions
Versions: 2004/20H2/21H1/21H2
Build: 1904x.1151+
Build: 1904x.1766+
Editions: Home/Pro/Enterprise
Architecture: x64
@ -94,8 +94,10 @@ function Checkings
}
}
# Check whether the OS minor build version is 1151 minimum
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 1151)
# Check whether the OS minor build version is 1766 minimum
# https://docs.microsoft.com/en-us/windows/release-health/release-information
# https://support.microsoft.com/en-us/topic/june-14-2022-kb5014699-os-builds-19042-1766-19043-1766-and-19044-1766-5c81d49d-0b6e-4808-9485-1f54e5d1bb15
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 1766)
{
$false
{
@ -8551,7 +8553,12 @@ function InstallDotNetRuntime6
(Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP
[System.IO.Path]::GetTempPath()
#>
Get-ChildItem -Path "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe", "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe", "$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore
$Paths = @(
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe",
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe",
"$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log"
)
Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore
}
}
catch [System.Net.WebException]
@ -8562,6 +8569,64 @@ function InstallDotNetRuntime6
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
<#
.SYNOPSIS
Bypass RKN restrictins using antizapret.prostovpn.org proxies
.PARAMETER Enable
Enable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.PARAMETER Disable
Disable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.EXAMPLE
RKNBypass -Enable
.EXAMPLE
RKNBypass -Disable
.LINK
https://antizapret.prostovpn.org
.NOTES
Current user
#>
function RKNBypass
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
# If current region is Russia
if (((Get-WinHomeLocation).GeoId -eq "203"))
{
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -PropertyType String -Value "https://antizapret.prostovpn.org/proxy.pac" -Force
}
}
"Disable"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force
}
}
}
#endregion System
#region WSL
@ -10000,7 +10065,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
Install "HEVC Video Extensions from Device Manufacturer" to be able to open .heic and .heif formats
.PARAMETER Install
Download and install the "HEVC Video Extensions from Device Manufacturer" extension using the https://store.rg-adguard.net parser
Download and install the "HEVC Video Extensions from Device Manufacturer" extension
.PARAMETER Manually
Open Microsoft Store "HEVC Video Extensions from Device Manufacturer" page to install the extension manually
@ -10014,12 +10079,12 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
.LINK
https://www.microsoft.com/store/productId/9n4wgh0z6vhq
.LINK
https://dev.to/kaiwalter/download-windows-store-apps-with-powershell-from-https-store-rg-adguard-net-155m
.NOTES
The extension can be installed without Microsoft account
.NOTES
HEVC Video Extension is already installed in Windows 11 22H2 by default
.NOTES
Current user
#>
@ -10047,15 +10112,31 @@ function HEIF
"Install"
{
# Check whether the extension is already installed
if ((-not (Get-AppxPackage -Name Microsoft.HEVCVideoExtension)) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
if ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
{
return
}
try
{
# Check the internet connection
$Parameters = @{
Uri = "https://www.google.com"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
try
{
# Check the internet connection
# Check whether https://github.com is alive
$Parameters = @{
Uri = "https://www.google.com"
Uri = "https://github.com"
Method = "Head"
SslProtocol = "Tls12"
DisableKeepAlive = $true
UseBasicParsing = $true
}
@ -10064,80 +10145,36 @@ function HEIF
return
}
try
{
# Check whether the https://store.rg-adguard.net site is alive
$Parameters = @{
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Head"
SslProtocol = "Tls12"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
$Parameters = @{
Method = "Post"
Uri = "https://store.rg-adguard.net/api/GetFiles"
ContentType = "application/x-www-form-urlencoded"
Body = @{
type = "url"
# HEVC Video Extensions from Device Manufacturer
url = "https://www.microsoft.com/store/productId/9n4wgh0z6vhq"
ring = "Retail"
lang = "en-US"
}
UseBasicParsing = $true
SslProtocol = "Tls12"
}
$Raw = Invoke-WebRequest @Parameters
# Parsing the page
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | ForEach-Object -Process {
$TempURL = $_.Groups[1].Value
$Package = $_.Groups[2].Value
if ($Package -like "Microsoft.HEVCVideoExtension_*_x64__8wekyb3d8bbwe.appx")
{
Write-Information -MessageData "" -InformationAction Continue
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\$Package"
SslProtocol = "Tls12"
UseBasicParsing = $true
Verbose = $true
}
Invoke-WebRequest @Parameters
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\$Package" -Verbose
Remove-Item -Path "$DownloadsFolder\$Package" -Force
}
}
# https://github.com/Sophia-Community/SophiApp/tree/master/AppX
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{
Uri = "https://github.com/Sophia-Community/SophiApp/raw/master/AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true
Verbose = $true
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net")
Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net") -ErrorAction SilentlyContinue
Invoke-WebRequest @Parameters
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Verbose
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Force
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Warning -Message ($Localization.NoResponse -f "https://github.com")
Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
"Manually"
{
@ -10149,7 +10186,6 @@ function HEIF
$Parameters = @{
Uri = "https://www.google.com"
Method = "Head"
SslProtocol = "Tls12"
DisableKeepAlive = $true
UseBasicParsing = $true
}
@ -12870,6 +12906,13 @@ function UseStoreOpenWith
#>
function UpdateLGPEPolicies
{
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {
($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")
}))
{
return
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Information -MessageData "" -InformationAction Continue

15
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Sophia.ps1

@ -25,9 +25,9 @@
irm script.sophi.app -useb | iex
.NOTES
Minimum Supported Windows 10 versions
Supported Windows 10 versions
Versions: 2004/20H2/21H1/21H2
Build: 1904x.1151
Build: 1904x.1766+
Editions: Home/Pro/Enterprise
Architecture: x64
@ -77,6 +77,7 @@ Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force
# Import module for modifying registry.pol files (Administrative Templates) of local GPOs
# Used for UpdateLGPEPolicies function
# https://www.powershellgallery.com/packages/PolicyFileEditor
Remove-Module -Name PolicyFileEditor -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\bin\PolicyFileEditor\PolicyFileEditor.psd1 -PassThru -Force
@ -958,6 +959,16 @@ InstallVCRedistx64
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
#>
InstallDotNetRuntime6
# Enable proxying only blocked sites from the unified registry of Roskomnadzor
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора
# https://antizapret.prostovpn.org
RKNBypass -Enable
# Disable proxying only blocked sites from the unified registry of Roskomnadzor (default value)
# Выключить проксирование только заблокированных сайтов из единого реестра Роскомнадзора (значение по умолчанию)
# https://antizapret.prostovpn.org
# RKNBypass -Disable
#endregion System
#region WSL

2
Sophia Script/Sophia Script for Windows 10/Localizations/de-DE/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Das Skript unterstützt nur Windows 10 x64
UnsupportedOSBuild = Das Skript unterstützt Windows 10 2004/20H2/21H1/21H2-Versionen
UpdateWarning = Das kumulative Windows 10-Update wurde installiert: {0}. Unterstütztes kumulatives Update: 1151 und höher
UpdateWarning = Das kumulative Windows 10-Update wurde installiert: {0}. Unterstütztes kumulatives Update: 1766 und höher
UnsupportedLanguageMode = Die PowerShell-Sitzung wird in einem eingeschränkten Sprachmodus ausgeführt
LoggedInUserNotAdmin = Der angemeldete Benutzer hat keine Administratorrechte
UnsupportedPowerShell = Sie versuchen ein Skript über PowerShell {0}.{1} auszuführen. Das Skript in der entsprechenden PowerShell-Version ausführen

2
Sophia Script/Sophia Script for Windows 10/Localizations/en-US/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = The script supports Windows 10 x64 only
UnsupportedOSBuild = The script supports Windows 10 2004/20H2/21H1/21H2 versions
UpdateWarning = Windows 10 cumulative update installed: {0}. Supported cumulative update: 1151 and higher
UpdateWarning = Windows 10 cumulative update installed: {0}. Supported cumulative update: 1766 and higher
UnsupportedLanguageMode = The PowerShell session in running in a limited language mode
LoggedInUserNotAdmin = The logged-on user doesn't have admin rights
UnsupportedPowerShell = You're trying to run script via PowerShell {0}.{1}. Run the script in the appropriate PowerShell version

2
Sophia Script/Sophia Script for Windows 10/Localizations/es-ES/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = El script sólo es compatible con Windows 10 x64
UnsupportedOSBuild = El script es compatible con versión Windows 10 2004/20H2/21H1/21H2
UpdateWarning = Actualización acumulativa de Windows 10 instalada: {0}. Actualización acumulativa soportada: 1151 y superior
UpdateWarning = Actualización acumulativa de Windows 10 instalada: {0}. Actualización acumulativa soportada: 1766 y superior
UnsupportedLanguageMode = Sesión de PowerShell ejecutada en modo de lenguaje limitado
LoggedInUserNotAdmin = El usuario que inició sesión no tiene derechos de administrador
UnsupportedPowerShell = Estás intentando ejecutar el script a través de PowerShell {0}.{1}. Ejecute el script en la versión apropiada de PowerShell

2
Sophia Script/Sophia Script for Windows 10/Localizations/fr-FR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Le script supporte uniquement Windows 10 x64
UnsupportedOSBuild = Le script supporte les versions Windows 10 2004/20H2/21H1/21H2
UpdateWarning = La mise à jour cumulative de Windows 10 est installée : {0}. Mise à jour cumulative prise en charge : 1151 et plus
UpdateWarning = La mise à jour cumulative de Windows 10 est installée : {0}. Mise à jour cumulative prise en charge : 1766 et plus
UnsupportedLanguageMode = La session PowerShell s'exécute dans un mode de langue limité
LoggedInUserNotAdmin = L'utilisateur connecté n'a pas de droits d'administrateur
UnsupportedPowerShell = Vous essayez d'exécuter le script via PowerShell {0}.{1}. Exécutez le script dans la version appropriée de PowerShell

2
Sophia Script/Sophia Script for Windows 10/Localizations/hu-HU/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = A szkript csak a Windows 10 64 bites verziót támogatja
UnsupportedOSBuild = A szkript támogatja a Windows 10 2004/20H2/21H1/21H2 verziókat
UpdateWarning = A Windows 10 összesített frissítése telepítve: {0}. Támogatott kumulatív frissítés: 1151 és magasabb verziószámok
UpdateWarning = A Windows 10 összesített frissítése telepítve: {0}. Támogatott kumulatív frissítés: 1766 és magasabb verziószámok
UnsupportedLanguageMode = A PowerShell munkamenet korlátozott nyelvi üzemmódban fut
LoggedInUserNotAdmin = A bejelentkezett felhasználó nem rendelkezik admin jogokkal
UnsupportedPowerShell = A PowerShell {0}.{1} segítségével próbálja futtatni a szkriptet. Futtassa a szkriptet a megfelelő PowerShell-verzióban

2
Sophia Script/Sophia Script for Windows 10/Localizations/it-IT/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Lo script supporta solo Windows 10 x64
UnsupportedOSBuild = Lo script supporta Windows 10 2004/20H2/21H1/21H2
UpdateWarning = Windows 10 cumulative update installato: {0}. È necessario l'aggiornamento cumulativo 1151 o superiori
UpdateWarning = Windows 10 cumulative update installato: {0}. È necessario l'aggiornamento cumulativo 1766 o superiori
UnsupportedLanguageMode = La sessione PowerShell è in esecuzione in modalità lingua limitata
LoggedInUserNotAdmin = L'utente in suo non ha i diritti di amministratore
UnsupportedPowerShell = Stai cercando di eseguire lo script tramite PowerShell {0}.{1}. Esegui lo script nella versione di PowerShell appropriata

2
Sophia Script/Sophia Script for Windows 10/Localizations/pt-BR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = O script suporta somente Windows 10 x64
UnsupportedOSBuild = O script suporta versões Windows 10 2004/20H2/21H1/21H2
UpdateWarning = Atualização cumulativa do Windows 10 instalado: {0}. Actualização acumulada suportada: 1151 e superior
UpdateWarning = Atualização cumulativa do Windows 10 instalado: {0}. Actualização acumulada suportada: 1766 e superior
UnsupportedLanguageMode = A sessão PowerShell em funcionamento em um modo de linguagem limitada
LoggedInUserNotAdmin = O usuário logado não tem direitos de administrador
UnsupportedPowerShell = Você está tentando executar o script via PowerShell {0}.{1}. Execute o script na versão apropriada do PowerShell

2
Sophia Script/Sophia Script for Windows 10/Localizations/ru-RU/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Скрипт поддерживает только Windows 10 x64
UnsupportedOSBuild = Скрипт поддерживает только Windows 10 версии 2004/20H2/21H1/21H2
UpdateWarning = Установленный накопительный пакет обновления Windows 10: {0}. Поддерживаемый накопительный пакет обновления: 1151 и выше
UpdateWarning = Установленный накопительный пакет обновления Windows 10: {0}. Поддерживаемый накопительный пакет обновления: 1766 и выше
UnsupportedLanguageMode = Сессия PowerShell работает в ограниченном режиме
LoggedInUserNotAdmin = Текущий вошедший пользователь не обладает правами администратора
UnsupportedPowerShell = Вы пытаетесь запустить скрипт в PowerShell {0}.{1}. Запустите скрипт в соответствующей версии PowerShell

2
Sophia Script/Sophia Script for Windows 10/Localizations/tr-TR/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Bu betik sadece Windows 10 x64 destekliyor
UnsupportedOSBuild = Komut dosyası, Windows 10 2004/20H2/21H1/21H2 sürümlerini destekler
UpdateWarning = Windows 10 toplu güncelleştirmesi yüklendi: {0}. Desteklenen toplu güncelleme: 1151 ve üstü
UpdateWarning = Windows 10 toplu güncelleştirmesi yüklendi: {0}. Desteklenen toplu güncelleme: 1766 ve üstü
UnsupportedLanguageMode = Sınırlı bir dil modunda çalışan PowerShell oturumu
LoggedInUserNotAdmin = Oturum açan kullanıcının yönetici hakları yok
UnsupportedPowerShell = Komut dosyasını PowerShell {0}.{1} aracılığıyla çalıştırmaya çalışıyorsunuz. Komut dosyasını uygun PowerShell sürümünde çalıştırın

2
Sophia Script/Sophia Script for Windows 10/Localizations/uk-UA/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = Скрипт підтримує тільки Windows 10 x64
UnsupportedOSBuild = Скрипт підтримує тільки Windows 10 версії 2004/20H2/21H1/21H2
UpdateWarning = Встановлений зведене оновлення Windows 10: {0}. Підтримуваний накопичувальний пакет оновлення: 1151 і вище
UpdateWarning = Встановлений зведене оновлення Windows 10: {0}. Підтримуваний накопичувальний пакет оновлення: 1766 і вище
UnsupportedLanguageMode = Сесія PowerShell працює в обмеженому режимі
LoggedInUserNotAdmin = Поточний увійшов користувач не володіє правами адміністратора
UnsupportedPowerShell = Ви намагаєтеся запустити скрипт в PowerShell {0}.{1}. Запустіть скрипт у відповідній версії PowerShell

2
Sophia Script/Sophia Script for Windows 10/Localizations/zh-CN/Sophia.psd1

@ -1,7 +1,7 @@
ConvertFrom-StringData -StringData @'
UnsupportedOSBitness = 该脚本仅支持Windows 10 x64
UnsupportedOSBuild = 该脚本支持Windows 10版本2004/20H2/21H1/21H2和更高版本
UpdateWarning = 安装了Windows 10累积更新{0}. 支持的累积更新1151及以上
UpdateWarning = 安装了Windows 10累积更新{0}. 支持的累积更新1766及以上
UnsupportedLanguageMode = PowerShell会话在有限的语言模式下运行
LoggedInUserNotAdmin = 登录的用户没有管理员的权利
UnsupportedPowerShell = 你想通过PowerShell {0}.{1}运行脚本在适当的PowerShell版本中运行该脚本

194
Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1

@ -16,7 +16,7 @@
.NOTES
Supported Windows 10 versions
Versions: 2004/20H2/21H1/21H2
Build: 1904x.1151+
Build: 1904x.1766+
Editions: Home/Pro/Enterprise
Architecture: x64
@ -94,8 +94,10 @@ function Checkings
}
}
# Check whether the OS minor build version is 1151 minimum
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 1151)
# Check whether the OS minor build version is 1766 minimum
# https://docs.microsoft.com/en-us/windows/release-health/release-information
# https://support.microsoft.com/en-us/topic/june-14-2022-kb5014699-os-builds-19042-1766-19043-1766-and-19044-1766-5c81d49d-0b6e-4808-9485-1f54e5d1bb15
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 1766)
{
$false
{
@ -8530,7 +8532,12 @@ function InstallDotNetRuntime6
(Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP
[System.IO.Path]::GetTempPath()
#>
Get-ChildItem -Path "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe", "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe", "$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore
$Paths = @(
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe",
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe",
"$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log"
)
Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore
}
}
catch [System.Net.WebException]
@ -8541,6 +8548,64 @@ function InstallDotNetRuntime6
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
<#
.SYNOPSIS
Bypass RKN restrictins using antizapret.prostovpn.org proxies
.PARAMETER Enable
Enable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.PARAMETER Disable
Disable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.EXAMPLE
RKNBypass -Enable
.EXAMPLE
RKNBypass -Disable
.LINK
https://antizapret.prostovpn.org
.NOTES
Current user
#>
function RKNBypass
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
# If current region is Russia
if (((Get-WinHomeLocation).GeoId -eq "203"))
{
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -PropertyType String -Value "https://antizapret.prostovpn.org/proxy.pac" -Force
}
}
"Disable"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force
}
}
}
#endregion System
#region WSL
@ -9959,7 +10024,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
Install "HEVC Video Extensions from Device Manufacturer" to be able to open .heic and .heif formats
.PARAMETER Install
Download and install the "HEVC Video Extensions from Device Manufacturer" extension using the https://store.rg-adguard.net parser
Download and install the "HEVC Video Extensions from Device Manufacturer" extension
.PARAMETER Manually
Open Microsoft Store "HEVC Video Extensions from Device Manufacturer" page to install the extension manually
@ -9973,12 +10038,12 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
.LINK
https://www.microsoft.com/store/productId/9n4wgh0z6vhq
.LINK
https://dev.to/kaiwalter/download-windows-store-apps-with-powershell-from-https-store-rg-adguard-net-155m
.NOTES
The extension can be installed without Microsoft account
.NOTES
HEVC Video Extension is already installed in Windows 11 22H2 by default
.NOTES
Current user
#>
@ -10006,13 +10071,30 @@ function HEIF
"Install"
{
# Check whether the extension is already installed
if ((-not (Get-AppxPackage -Name Microsoft.HEVCVideoExtension)) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
if ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
{
return
}
try
{
# Check the internet connection
$Parameters = @{
Uri = "https://www.google.com"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
try
{
# Check the internet connection
# Check whether https://github.com is alive
$Parameters = @{
Uri = "https://www.google.com"
Uri = "https://github.com"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
@ -10022,77 +10104,36 @@ function HEIF
return
}
try
{
# Check whether the https://store.rg-adguard.net site is alive
$Parameters = @{
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
$Parameters = @{
Method = "Post"
Uri = "https://store.rg-adguard.net/api/GetFiles"
ContentType = "application/x-www-form-urlencoded"
Body = @{
type = "url"
# HEVC Video Extensions from Device Manufacturer
url = "https://www.microsoft.com/store/productId/9n4wgh0z6vhq"
ring = "Retail"
lang = "en-US"
}
UseBasicParsing = $true
}
$Raw = Invoke-WebRequest @Parameters
# Parsing the page
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | ForEach-Object -Process {
$TempURL = $_.Groups[1].Value
$Package = $_.Groups[2].Value
if ($Package -like "Microsoft.HEVCVideoExtension_*_x64__8wekyb3d8bbwe.appx")
{
Write-Information -MessageData "" -InformationAction Continue
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\$Package"
UseBasicParsing = $true
Verbose = $true
}
Invoke-WebRequest @Parameters
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\$Package" -Verbose
Remove-Item -Path "$DownloadsFolder\$Package" -Force
}
}
# https://github.com/Sophia-Community/SophiApp/tree/master/AppX
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{
Uri = "https://github.com/Sophia-Community/SophiApp/raw/master/AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true
Verbose = $true
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net")
Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net") -ErrorAction SilentlyContinue
Invoke-WebRequest @Parameters
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Verbose
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Force
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Warning -Message ($Localization.NoResponse -f "https://github.com")
Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
"Manually"
{
@ -12822,6 +12863,13 @@ function UseStoreOpenWith
#>
function UpdateLGPEPolicies
{
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {
($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")
}))
{
return
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Information -MessageData "" -InformationAction Continue

14
Sophia Script/Sophia Script for Windows 10/Sophia.ps1

@ -25,9 +25,9 @@
irm script.sophi.app -useb | iex
.NOTES
Minimum Supported Windows 10 versions
Supported Windows 10 versions
Versions: 2004/20H2/21H1/21H2
Build: 1904x.1151
Build: 1904x.1766+
Editions: Home/Pro/Enterprise
Architecture: x64
@ -959,6 +959,16 @@ InstallVCRedistx64
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
#>
InstallDotNetRuntime6
# Enable proxying only blocked sites from the unified registry of Roskomnadzor
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора
# https://antizapret.prostovpn.org
RKNBypass -Enable
# Disable proxying only blocked sites from the unified registry of Roskomnadzor (default value)
# Выключить проксирование только заблокированных сайтов из единого реестра Роскомнадзора (значение по умолчанию)
# https://antizapret.prostovpn.org
# RKNBypass -Disable
#endregion System
#region WSL

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/de-DE/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Wählen Sie einen Ordner für den Or
UserDefaultFolder = Möchten Sie den Speicherort des Ordners "{0}" auf den Standardwert ändern?
ReservedStorageIsInUse = Dieser Vorgang wird nicht unterstützt, wenn reservierter Speicher verwendet wird\nBitte führen Sie die Funktion "{0}" nach dem PC-Neustart erneut aus
ShortcutPinning = Die Verknüpfung "{0}" wird an Start angeheftet
SSDRequired = Um Windows Subsystem für Android auf Ihrem Gerät zu verwenden, muss auf Ihrem PC ein Solid State Drive (SSD) installiert sein
UninstallUWPForAll = Für alle Benutzer
UWPAppsTitle = UWP-Apps
HEVCDownloading = HEVC-Videoerweiterungen vom Gerätehersteller herunterladen ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/en-US/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Select a folder for the "{0}" folder
UserDefaultFolder = Would you like to change the location of the "{0}" folder to the default value?
ReservedStorageIsInUse = This operation is not supported when reserved storage is in use\nPlease re-run the "{0}" function again after PC restart
ShortcutPinning = The "{0}" shortcut is being pinned to Start...
SSDRequired = To use Windows Subsystem for Android on your device, your PC needs to have Solid State Drive (SSD) installed
UninstallUWPForAll = For all users
UWPAppsTitle = UWP apps
HEVCDownloading = Downloading HEVC Video Extensions from Device Manufacturer... ~2,8 MB

3
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/es-ES/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Seleccione una carpeta para la carpe
UserDefaultFolder = ¿Le gustaría cambiar la ubicación de la carpeta "{0}" para el valor por defecto?
ReservedStorageIsInUse = Esta operación no es compatible cuando el almacenamiento reservada está en uso\nPor favor, vuelva a ejecutar la función "{0}" después de reiniciar el PC
ShortcutPinning = El acceso directo "{0}" está siendo clavado en Start...
SSDRequired = Para utilizar Windows Subsystem for Android en su dispositivo, su PC debe tener instalada una unidad de estado sólido (SSD)
UninstallUWPForAll = Para todos los usuarios
UWPAppsTitle = Aplicaciones UWP
HEVCDownloading = Descargando HEVC Vídeo Extensiones del Fabricante del dispositivo... ~2,8 MB
@ -76,7 +77,7 @@ Restore = Restaurar
Run = Iniciar
SelectAll = Seleccionar todo
Skipped = Omitido
FileExplorerRestartPrompt = A veces, para que los cambios surtan efecto, hay que reiniciar el proceso del Explorador de archivos
FileExplorerRestartPrompt = \nA veces, para que los cambios surtan efecto, hay que reiniciar el proceso del Explorador de archivos
TelegramGroupTitle = Únete a nuestro grupo oficial de Telegram
TelegramChannelTitle = Únete a nuestro canal oficial de Telegram
Uninstall = Desinstalar

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/fr-FR/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Sélectionnez un dossier pour le dos
UserDefaultFolder = Voulez vous changer est placé le dossier "{0}" à sa valeur par défaut?
ReservedStorageIsInUse = Cette opération n'est pas suppportée le stockage réservé est en cours d'utilisation\nVeuillez réexécuter la fonction "{0}" après le redémarrage du PC
ShortcutPinning = Le raccourci "{0}" est épinglé sur Démarrer...
SSDRequired = Pour utiliser le sous-système Windows pour Android sur votre appareil, votre PC doit être équipé d'un lecteur à état solide (SSD).
UninstallUWPForAll = Pour tous les utilisateurs
UWPAppsTitle = Applications UWP
HEVCDownloading = Téléchargement de Extensions vidéo HEVC du fabricant de l'appareil... ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/hu-HU/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Válasszon ki egy könyvtárat a "{0
UserDefaultFolder = Szeretné visszaállítani a "{0}" könyvtár helyét a gyári értékekre?
ReservedStorageIsInUse = Ez a művelet nem hajtható végre, amíg a fenntartott tárhely használatban van\nPonovno pokrenite funkciju "{0}" nakon ponovnog pokretanja računala
ShortcutPinning = A gyorsindító ikon "{0}" Startmenüre helyezése...
SSDRequired = A Windows Subsystem for Android használatához a készüléken a számítógépen szilárdtest-meghajtónak (SSD) kell telepítve lennie
UninstallUWPForAll = Az összes felhasználó számára
UWPAppsTitle = UWP Alkalmazások
HEVCDownloading = A HEVC Videobővítmények letöltése a gyártói oldalról... ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/it-IT/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Selezionare una posizione per la car
UserDefaultFolder = Volete cambiare la posizione della cartella "{0}" al valore di default?
ReservedStorageIsInUse = Questa operazione non è supportata quando spazio riservato è in uso Si prega di eseguire nuovamente la funzione "{0}" dopo il riavvio del PC
ShortcutPinning = Il collegamento "{0}" è stato bloccato...
SSDRequired = Per utilizzare Windows Subsystem for Android sul proprio dispositivo, è necessario che sul PC sia installata un'unità a stato solido (SSD)
UninstallUWPForAll = Per tutti gli utenti
UWPAppsTitle = UWP Apps
HEVCDownloading = Download del codec video HEVC Video estenxion dal produttore... ~ Circa 2,8 MB

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/pt-BR/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Selecione uma pasta para a pasta "{0
UserDefaultFolder = Gostaria de alterar a localização da pasta "{0}" para o valor padrão?
ReservedStorageIsInUse = Esta operação não é suportada quando o armazenamento reservada está em uso\nFavor executar novamente a função "{0}" após o reinício do PC
ShortcutPinning = O atalho "{0}" está sendo fixado no Iniciar...
SSDRequired = Para utilizar o Subsistema Windows para Android no seu dispositivo, o seu PC necessita de ter a unidade de estado sólido (SSD) instalada
UninstallUWPForAll = Para todos os usuários...
UWPAppsTitle = Apps UWP
HEVCDownloading = Baixando HEVC Vídeo Extensões de Dispositivo Fabricante... ~ 2,8 MB

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/ru-RU/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Выберите папку для "
UserDefaultFolder = Хотите изменить расположение папки "{0}" на значение по умолчанию?
ReservedStorageIsInUse = Операция не поддерживается, пока используется зарезервированное хранилище\nПожалуйста, повторно запустите функцию "{0}" после перезагрузки
ShortcutPinning = Ярлык "{0}" закрепляется на начальном экране...
SSDRequired = Чтобы использовать подсистему Windows для Android на вашем устройстве, на вашем ПК должен быть установлен твердотельный накопитель (SSD)
UninstallUWPForAll = Для всех пользователей
UWPAppsTitle = UWP-приложения
HEVCDownloading = Скачивается расширения для видео HEVC от производителя устройства... ~2,8 МБ

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/tr-TR/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = "{0}" klasörü için bir klasör se
UserDefaultFolder = "{0}" klasörünün konumunu varsayılan değerle değiştirmek ister misiniz?
ReservedStorageIsInUse = Ayrılmış depolama kullanımdayken bu işlem desteklenmez\nBilgisayar yeniden başlatıldıktan sonra lütfen "{0}" işlevini yeniden çalıştırın
ShortcutPinning = "{0}" kısayolu Başlangıç sekmesine sabitlendi...
SSDRequired = Android için Windows Alt Sistemi'ni cihazınızda kullanmak için bilgisayarınızda Katı Hal Sürücüsü (SSD) yüklü olmalıdır
UninstallUWPForAll = Bütün kullanıcılar için
UWPAppsTitle = UWP Uygulamaları
HEVCDownloading = "Cihaz Üreticisinden HEVC Video Uzantıları" İndiriliyor... ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/uk-UA/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Виберіть папку для "
UserDefaultFolder = Хочете змінити розташування папки "{0}" на значення за замовчуванням?
ReservedStorageIsInUse = Операція не підтримується, поки використовується зарезервоване сховище\nБудь ласка, повторно запустіть функцію "{0}" після перезавантаження
ShortcutPinning = Ярлик "{0}" закріплюється на початковому екрані...
SSDRequired = Щоб використовувати підсистему Windows для Android на вашому пристрої, на ПК повинен бути встановлений твердотільний накопичувач (SSD)
UninstallUWPForAll = Для всіх користувачів
UWPAppsTitle = Програми UWP
HEVCDownloading = Завантаження "Розширення відео HEVC від виробника пристрою"... ~2,8 МБ

1
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/zh-CN/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = 为“{0}”文件夹选择一个文
UserDefaultFolder = 您想将{0}文件夹的位置更改为默认值吗
ReservedStorageIsInUse = 保留存储空间正在使用时不支持此操作\n请在电脑重启后重新运行"{0}"功能
ShortcutPinning = {0}快捷方式将被固定到开始菜单
SSDRequired = 要在您的设备上使用Windows Subsystem for Android您的电脑需要安装固态驱动器SSD
UninstallUWPForAll = 对于所有用户
UWPAppsTitle = UWP应用
HEVCDownloading = 下载HEVC Video Extensions from Device Manufacturer ~2,8 MB

326
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1

@ -84,11 +84,13 @@ function Checkings
}
# Check whether the OS minor build version is 739 minimum
# https://docs.microsoft.com/en-us/windows/release-health/windows11-release-information
# https://support.microsoft.com/en-us/topic/june-14-2022-kb5014697-os-build-22000-739-cd3aaa0b-a8da-44a0-a778-dfb6f1d9ea11
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 739)
{
$false
{
if ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber -lt 22509)
if ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber -eq 22000)
{
$Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion"
Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version.UBR)
@ -5383,8 +5385,8 @@ function IPv6Component
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net")
Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net") -ErrorAction SilentlyContinue
Write-Warning -Message ($Localization.NoResponse -f "https://ipv6-test.com")
Write-Error -Message ($Localization.NoResponse -f "https://ipv6-test.com") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
@ -8143,7 +8145,12 @@ function InstallDotNetRuntime6
(Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP
[System.IO.Path]::GetTempPath()
#>
Get-ChildItem -Path "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe", "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime_*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore
$Paths = @(
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe",
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe",
"$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log"
)
Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore
}
}
catch [System.Net.WebException]
@ -8154,6 +8161,187 @@ function InstallDotNetRuntime6
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
<#
.SYNOPSIS
Bypass RKN restrictins using antizapret.prostovpn.org proxies
.PARAMETER Enable
Enable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.PARAMETER Disable
Disable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.EXAMPLE
RKNBypass -Enable
.EXAMPLE
RKNBypass -Disable
.LINK
https://antizapret.prostovpn.org
.NOTES
Current user
#>
function RKNBypass
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
# If current region is Russia
if (((Get-WinHomeLocation).GeoId -eq "203"))
{
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -PropertyType String -Value "https://antizapret.prostovpn.org/proxy.pac" -Force
}
}
"Disable"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force
}
}
}
<#
.SYNOPSIS
Enable the latest Windows Subsystem for Android with Amazon Appstore
.EXAMPLE Enable all necessary dependencies (reboot may require) and open Microsoft Store WSA page to install it manually
WSA -Enable
.EXAMPLE Disable all necessary dependencies (reboot may require) and uninstall Windows Subsystem for Android with Amazon Appstore
WSA -Disable
.LINK
https://support.microsoft.com/en-us/windows/install-mobile-apps-and-the-amazon-appstore-f8d0abb5-44ad-47d8-b9fb-ad6b1459ff6c
.LINK
https://docs.microsoft.com/en-us/windows/android/wsa/
.LINK
https://www.microsoft.com/store/productId/9P3395VX91NR
.NOTES
Machine-wide
#>
function WSA
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
# Check if Windows 11 is installed on an SSD
$DiskNumber = (Get-Disk | Where-Object -FilterScript {$_.Isboot -and $_.IsSystem -and ($_.OperationalStatus -eq "Online")}).Number
if (Get-PhysicalDisk -DeviceNumber $DiskNumber | Where-Object -FilterScript {$_.MediaType -ne "SSD"})
{
Write-Warning -Message $Localization.SSDRequired ###
return
}
# Enable Windows Subsystem for Android (WSA)
if ((Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux).State -eq "Disabled")
{
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
Write-Warning -Message $Localization.RestartWarning
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
return
}
# Enable Virtual Machine Platform
if ((Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform).State -eq "Disabled")
{
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Write-Warning -Message $Localization.RestartWarning
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
return
}
if (Get-AppxPackage -Name MicrosoftCorporationII.WindowsSubsystemForAndroid)
{
return
}
try
{
# Check the internet connection
$Parameters = @{
Uri = "https://www.google.com"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
if (((Get-WinHomeLocation).GeoId -ne "244"))
{
# Set Windows region to USA
$Script:Region = (Get-WinHomeLocation).GeoId
Set-WinHomeLocation -GeoId 244
$Script:RegionChanged = $true
}
# Open Misrosoft Store WSA page to install it manually
Start-Process -FilePath ms-windows-store://pdp/?ProductId=9P3395VX91NR
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
"Disable"
{
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
Get-AppxPackage -Name MicrosoftCorporationII.WindowsSubsystemForAndroid | Remove-AppxPackage
}
}
}
#endregion System
#region WSL
@ -9351,7 +9539,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
Install "HEVC Video Extensions from Device Manufacturer" to be able to open .heic and .heif formats
.PARAMETER Install
Download and install the "HEVC Video Extensions from Device Manufacturer" extension using the https://store.rg-adguard.net parser
Download and install the "HEVC Video Extensions from Device Manufacturer" extension
.PARAMETER Manually
Open Microsoft Store "HEVC Video Extensions from Device Manufacturer" page to install the extension manually
@ -9365,9 +9553,6 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
.LINK
https://www.microsoft.com/store/productId/9n4wgh0z6vhq
.LINK
https://dev.to/kaiwalter/download-windows-store-apps-with-powershell-from-https-store-rg-adguard-net-155m
.NOTES
The extension can be installed without Microsoft account
@ -9401,17 +9586,32 @@ function HEIF
"Install"
{
# Check whether the extension is already installed
# HEVC Video Extension is already installed in Windows 11 22H2 by default
if ((-not (Get-AppxPackage -Name Microsoft.HEVCVideoExtension)) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
if ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
{
return
}
try
{
# Check the internet connection
$Parameters = @{
Uri = "https://www.google.com"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
try
{
# Check the internet connection
# Check whether https://github.com is alive
$Parameters = @{
Uri = "https://www.google.com"
Uri = "https://github.com"
Method = "Head"
DisableKeepAlive = $true
SslProtocol = "Tls13"
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
@ -9419,80 +9619,36 @@ function HEIF
return
}
try
{
# Check whether the https://store.rg-adguard.net site is alive
$Parameters = @{
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Head"
DisableKeepAlive = $true
SslProtocol = "Tls13"
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
$Parameters = @{
Method = "Post"
Uri = "https://store.rg-adguard.net/api/GetFiles"
ContentType = "application/x-www-form-urlencoded"
Body = @{
type = "url"
# HEVC Video Extensions from Device Manufacturer
url = "https://www.microsoft.com/store/productId/9n4wgh0z6vhq"
ring = "Retail"
lang = "en-US"
}
UseBasicParsing = $true
SslProtocol = "Tls13"
}
$Raw = Invoke-WebRequest @Parameters
# Parsing the page
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | ForEach-Object -Process {
$TempURL = $_.Groups[1].Value
$Package = $_.Groups[2].Value
if ($Package -like "Microsoft.HEVCVideoExtension_*_x64__8wekyb3d8bbwe.appx")
{
Write-Information -MessageData "" -InformationAction Continue
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\$Package"
SslProtocol = "Tls13"
UseBasicParsing = $true
Verbose = $true
}
Invoke-WebRequest @Parameters
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\$Package" -Verbose
Remove-Item -Path "$DownloadsFolder\$Package" -Force
}
}
# https://github.com/Sophia-Community/SophiApp/tree/master/AppX
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{
Uri = "https://github.com/Sophia-Community/SophiApp/raw/master/AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true
Verbose = $true
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net")
Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net") -ErrorAction SilentlyContinue
Invoke-WebRequest @Parameters
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Verbose
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Force
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Warning -Message ($Localization.NoResponse -f "https://github.com")
Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
"Manually"
{
@ -9505,7 +9661,6 @@ function HEIF
Uri = "https://www.google.com"
Method = "Head"
DisableKeepAlive = $true
SslProtocol = "Tls13"
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
@ -12160,6 +12315,13 @@ function Windows10ContextMenu
#>
function UpdateLGPEPolicies
{
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {
($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")
}))
{
return
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Information -MessageData "" -InformationAction Continue
@ -12350,6 +12512,12 @@ public static void PostMessage()
}
}
if ($Script:RegionChanged)
{
# Set the original region ID
Set-WinHomeLocation -GeoId $Script:Region
}
# In order for the changes to take effect the File Explorer process has to be restarted
$Title = ""
$Message = $Localization.FileExplorerRestartPrompt

19
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1

@ -76,6 +76,7 @@ Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force
# Import module for modifying registry.pol files (Administrative Templates) of local GPOs
# Used for UpdateLGPEPolicies function
# https://www.powershellgallery.com/packages/PolicyFileEditor
Remove-Module -Name PolicyFileEditor -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\bin\PolicyFileEditor\PolicyFileEditor.psd1 -PassThru -Force
@ -912,6 +913,24 @@ InstallVCRedistx64
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
#>
InstallDotNetRuntime6
# Enable proxying only blocked sites from the unified registry of Roskomnadzor
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора
# https://antizapret.prostovpn.org
RKNBypass -Enable
# Disable proxying only blocked sites from the unified registry of Roskomnadzor (default value)
# Выключить проксирование только заблокированных сайтов из единого реестра Роскомнадзора (значение по умолчанию)
# https://antizapret.prostovpn.org
# RKNBypass -Disable
# Enable all necessary dependencies (reboot may require) and open Microsoft Store WSA page to install Windows Subsystem for Android™ with Amazon Appstore manually
# Включить все необходимые зависимости (может потребоваться перезагрузка) и открыть страницу WSA в Microsoft Store, чтобы вручную установить Windows Subsystem for Android™ with Amazon Appstore
# WSA -Enable
# Disable all necessary dependencies (reboot may require) and uninstall Windows Subsystem for Android™ with Amazon Appstore (default value)
# Выключить все необходимые зависимости и удалить Windows Subsystem for Android™ with Amazon Appstore (значение по умолчанию)
# WSA -Disable
#endregion System
#region WSL

1
Sophia Script/Sophia Script for Windows 11/Localizations/de-DE/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Wählen Sie einen Ordner für den Or
UserDefaultFolder = Möchten Sie den Speicherort des Ordners "{0}" auf den Standardwert ändern?
ReservedStorageIsInUse = Dieser Vorgang wird nicht unterstützt, wenn reservierter Speicher verwendet wird\nBitte führen Sie die Funktion "{0}" nach dem PC-Neustart erneut aus
ShortcutPinning = Die Verknüpfung "{0}" wird an Start angeheftet
SSDRequired = Um Windows Subsystem für Android auf Ihrem Gerät zu verwenden, muss auf Ihrem PC ein Solid State Drive (SSD) installiert sein
UninstallUWPForAll = Für alle Benutzer
UWPAppsTitle = UWP-Apps
HEVCDownloading = HEVC-Videoerweiterungen vom Gerätehersteller herunterladen ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11/Localizations/en-US/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Select a folder for the "{0}" folder
UserDefaultFolder = Would you like to change the location of the "{0}" folder to the default value?
ReservedStorageIsInUse = This operation is not supported when reserved storage is in use\nPlease re-run the "{0}" function again after PC restart
ShortcutPinning = The "{0}" shortcut is being pinned to Start...
SSDRequired = To use Windows Subsystem for Android on your device, your PC needs to have Solid State Drive (SSD) installed
UninstallUWPForAll = For all users
UWPAppsTitle = UWP apps
HEVCDownloading = Downloading HEVC Video Extensions from Device Manufacturer... ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11/Localizations/es-ES/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Seleccione una carpeta para la carpe
UserDefaultFolder = ¿Le gustaría cambiar la ubicación de la carpeta "{0}" para el valor por defecto?
ReservedStorageIsInUse = Esta operación no es compatible cuando el almacenamiento reservada está en uso\nPor favor, vuelva a ejecutar la función "{0}" después de reiniciar el PC
ShortcutPinning = El acceso directo "{0}" está siendo clavado en Start...
SSDRequired = Para utilizar Windows Subsystem for Android en su dispositivo, su PC debe tener instalada una unidad de estado sólido (SSD)
UninstallUWPForAll = Para todos los usuarios
UWPAppsTitle = Aplicaciones UWP
HEVCDownloading = Descargando HEVC Vídeo Extensiones del Fabricante del dispositivo... ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11/Localizations/fr-FR/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Sélectionnez un dossier pour le dos
UserDefaultFolder = Voulez vous changer est placé le dossier "{0}" à sa valeur par défaut?
ReservedStorageIsInUse = Cette opération n'est pas suppportée le stockage réservé est en cours d'utilisation\nVeuillez réexécuter la fonction "{0}" après le redémarrage du PC
ShortcutPinning = Le raccourci "{0}" est épinglé sur Démarrer...
SSDRequired = Pour utiliser le sous-système Windows pour Android sur votre appareil, votre PC doit être équipé d'un lecteur à état solide (SSD).
UninstallUWPForAll = Pour tous les utilisateurs
UWPAppsTitle = Applications UWP
HEVCDownloading = Téléchargement de Extensions vidéo HEVC du fabricant de l'appareil... ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11/Localizations/hu-HU/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Válasszon ki egy könyvtárat a "{0
UserDefaultFolder = Szeretné visszaállítani a "{0}" könyvtár helyét a gyári értékekre?
ReservedStorageIsInUse = Ez a művelet nem hajtható végre, amíg a fenntartott tárhely használatban van\nPonovno pokrenite funkciju "{0}" nakon ponovnog pokretanja računala
ShortcutPinning = A gyorsindító ikon "{0}" Startmenüre helyezése...
SSDRequired = A Windows Subsystem for Android használatához a készüléken a számítógépen szilárdtest-meghajtónak (SSD) kell telepítve lennie
UninstallUWPForAll = Az összes felhasználó számára
UWPAppsTitle = UWP Alkalmazások
HEVCDownloading = A HEVC Videobővítmények letöltése a gyártói oldalról... ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11/Localizations/it-IT/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Selezionare una posizione per la car
UserDefaultFolder = Volete cambiare la posizione della cartella "{0}" al valore di default?
ReservedStorageIsInUse = Questa operazione non è supportata quando spazio riservato è in uso Si prega di eseguire nuovamente la funzione "{0}" dopo il riavvio del PC
ShortcutPinning = Il collegamento "{0}" è stato bloccato...
SSDRequired = Per utilizzare Windows Subsystem for Android sul proprio dispositivo, è necessario che sul PC sia installata un'unità a stato solido (SSD)
UninstallUWPForAll = Per tutti gli utenti
UWPAppsTitle = UWP Apps
HEVCDownloading = Download del codec video HEVC Video estenxion dal produttore... ~ Circa 2,8 MB

1
Sophia Script/Sophia Script for Windows 11/Localizations/pt-BR/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Selecione uma pasta para a pasta "{0
UserDefaultFolder = Gostaria de alterar a localização da pasta "{0}" para o valor padrão?
ReservedStorageIsInUse = Esta operação não é suportada quando o armazenamento reservada está em uso\nFavor executar novamente a função "{0}" após o reinício do PC
ShortcutPinning = O atalho "{0}" está sendo fixado no Iniciar...
SSDRequired = Para utilizar o Subsistema Windows para Android no seu dispositivo, o seu PC necessita de ter a unidade de estado sólido (SSD) instalada
UninstallUWPForAll = Para todos os usuários...
UWPAppsTitle = Apps UWP
HEVCDownloading = Baixando HEVC Vídeo Extensões de Dispositivo Fabricante... ~ 2,8 MB

1
Sophia Script/Sophia Script for Windows 11/Localizations/ru-RU/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Выберите папку для "
UserDefaultFolder = Хотите изменить расположение папки "{0}" на значение по умолчанию?
ReservedStorageIsInUse = Операция не поддерживается, пока используется зарезервированное хранилище\nПожалуйста, повторно запустите функцию "{0}" после перезагрузки
ShortcutPinning = Ярлык "{0}" закрепляется на начальном экране...
SSDRequired = Чтобы использовать подсистему Windows для Android на вашем устройстве, на вашем ПК должен быть установлен твердотельный накопитель (SSD)
UninstallUWPForAll = Для всех пользователей
UWPAppsTitle = UWP-приложения
HEVCDownloading = Скачивается расширения для видео HEVC от производителя устройства... ~2,8 МБ

1
Sophia Script/Sophia Script for Windows 11/Localizations/tr-TR/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = "{0}" klasörü için bir klasör se
UserDefaultFolder = "{0}" klasörünün konumunu varsayılan değerle değiştirmek ister misiniz?
ReservedStorageIsInUse = Ayrılmış depolama kullanımdayken bu işlem desteklenmez\nBilgisayar yeniden başlatıldıktan sonra lütfen "{0}" işlevini yeniden çalıştırın
ShortcutPinning = "{0}" kısayolu Başlangıç sekmesine sabitlendi...
SSDRequired = Android için Windows Alt Sistemi'ni cihazınızda kullanmak için bilgisayarınızda Katı Hal Sürücüsü (SSD) yüklü olmalıdır
UninstallUWPForAll = Bütün kullanıcılar için
UWPAppsTitle = UWP Uygulamaları
HEVCDownloading = "Cihaz Üreticisinden HEVC Video Uzantıları" İndiriliyor... ~2,8 MB

1
Sophia Script/Sophia Script for Windows 11/Localizations/uk-UA/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = Виберіть папку для "
UserDefaultFolder = Хочете змінити розташування папки "{0}" на значення за замовчуванням?
ReservedStorageIsInUse = Операція не підтримується, поки використовується зарезервоване сховище\nБудь ласка, повторно запустіть функцію "{0}" після перезавантаження
ShortcutPinning = Ярлик "{0}" закріплюється на початковому екрані...
SSDRequired = Щоб використовувати підсистему Windows для Android на вашому пристрої, на ПК повинен бути встановлений твердотільний накопичувач (SSD)
UninstallUWPForAll = Для всіх користувачів
UWPAppsTitle = Програми UWP
HEVCDownloading = Завантаження "Розширення відео HEVC від виробника пристрою"... ~2,8 МБ

1
Sophia Script/Sophia Script for Windows 11/Localizations/zh-CN/Sophia.psd1

@ -30,6 +30,7 @@ UserFolderSelect = 为“{0}”文件夹选择一个文
UserDefaultFolder = 您想将{0}文件夹的位置更改为默认值吗
ReservedStorageIsInUse = 保留存储空间正在使用时不支持此操作\n请在电脑重启后重新运行"{0}"功能
ShortcutPinning = {0}快捷方式将被固定到开始菜单
SSDRequired = 要在您的设备上使用Windows Subsystem for Android您的电脑需要安装固态驱动器SSD
UninstallUWPForAll = 对于所有用户
UWPAppsTitle = UWP应用
HEVCDownloading = 下载HEVC Video Extensions from Device Manufacturer ~2,8 MB

321
Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1

@ -84,11 +84,13 @@ function Checkings
}
# Check whether the OS minor build version is 739 minimum
# https://docs.microsoft.com/en-us/windows/release-health/windows11-release-information
# https://support.microsoft.com/en-us/topic/june-14-2022-kb5014697-os-build-22000-739-cd3aaa0b-a8da-44a0-a778-dfb6f1d9ea11
switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 739)
{
$false
{
if ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber -lt 22509)
if ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber -eq 22000)
{
$Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion"
Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version.UBR)
@ -5362,8 +5364,8 @@ function IPv6Component
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net")
Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net") -ErrorAction SilentlyContinue
Write-Warning -Message ($Localization.NoResponse -f "https://ipv6-test.com")
Write-Error -Message ($Localization.NoResponse -f "https://ipv6-test.com") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
@ -8122,7 +8124,12 @@ function InstallDotNetRuntime6
(Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP
[System.IO.Path]::GetTempPath()
#>
Get-ChildItem -Path "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe", "$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime_*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore
$Paths = @(
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x86.exe",
"$DownloadsFolder\dotnet-runtime-$LatestRelease-win-x64.exe",
"$env:TEMP\Microsoft_Windows_Desktop_Runtime*.log"
)
Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore
}
}
catch [System.Net.WebException]
@ -8133,6 +8140,187 @@ function InstallDotNetRuntime6
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
<#
.SYNOPSIS
Bypass RKN restrictins using antizapret.prostovpn.org proxies
.PARAMETER Enable
Enable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.PARAMETER Disable
Disable proxying only blocked sites from the unified registry of Roskomnadzor using antizapret.prostovpn.org servers
.EXAMPLE
RKNBypass -Enable
.EXAMPLE
RKNBypass -Disable
.LINK
https://antizapret.prostovpn.org
.NOTES
Current user
#>
function RKNBypass
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
# If current region is Russia
if (((Get-WinHomeLocation).GeoId -eq "203"))
{
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -PropertyType String -Value "https://antizapret.prostovpn.org/proxy.pac" -Force
}
}
"Disable"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force
}
}
}
<#
.SYNOPSIS
Enable the latest Windows Subsystem for Android with Amazon Appstore
.EXAMPLE Enable all necessary dependencies (reboot may require) and open Microsoft Store WSA page to install it manually
WSA -Enable
.EXAMPLE Disable all necessary dependencies (reboot may require) and uninstall Windows Subsystem for Android with Amazon Appstore
WSA -Disable
.LINK
https://support.microsoft.com/en-us/windows/install-mobile-apps-and-the-amazon-appstore-f8d0abb5-44ad-47d8-b9fb-ad6b1459ff6c
.LINK
https://docs.microsoft.com/en-us/windows/android/wsa/
.LINK
https://www.microsoft.com/store/productId/9P3395VX91NR
.NOTES
Machine-wide
#>
function WSA
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
# Check if Windows 11 is installed on an SSD
$DiskNumber = (Get-Disk | Where-Object -FilterScript {$_.Isboot -and $_.IsSystem -and ($_.OperationalStatus -eq "Online")}).Number
if (Get-PhysicalDisk -DeviceNumber $DiskNumber | Where-Object -FilterScript {$_.MediaType -ne "SSD"})
{
Write-Warning -Message $Localization.SSDRequired
return
}
# Enable Windows Subsystem for Android (WSA)
if ((Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux).State -eq "Disabled")
{
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
Write-Warning -Message $Localization.RestartWarning
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
return
}
# Enable Virtual Machine Platform
if ((Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform).State -eq "Disabled")
{
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Write-Warning -Message $Localization.RestartWarning
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
return
}
if (Get-AppxPackage -Name MicrosoftCorporationII.WindowsSubsystemForAndroid)
{
return
}
try
{
# Check the internet connection
$Parameters = @{
Uri = "https://www.google.com"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
if (((Get-WinHomeLocation).GeoId -ne "244"))
{
# Set Windows region to USA
$Script:Region = (Get-WinHomeLocation).GeoId
Set-WinHomeLocation -GeoId 244
$Script:RegionChanged = $true
}
# Open Misrosoft Store WSA page to install it manually
Start-Process -FilePath ms-windows-store://pdp/?ProductId=9P3395VX91NR
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
"Disable"
{
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
Get-AppxPackage -Name MicrosoftCorporationII.WindowsSubsystemForAndroid | Remove-AppxPackage
}
}
}
#endregion System
#region WSL
@ -9310,7 +9498,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
Install "HEVC Video Extensions from Device Manufacturer" to be able to open .heic and .heif formats
.PARAMETER Install
Download and install the "HEVC Video Extensions from Device Manufacturer" extension using the https://store.rg-adguard.net parser
Download and install the "HEVC Video Extensions from Device Manufacturer" extension
.PARAMETER Manually
Open Microsoft Store "HEVC Video Extensions from Device Manufacturer" page to install the extension manually
@ -9324,9 +9512,6 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
.LINK
https://www.microsoft.com/store/productId/9n4wgh0z6vhq
.LINK
https://dev.to/kaiwalter/download-windows-store-apps-with-powershell-from-https-store-rg-adguard-net-155m
.NOTES
The extension can be installed without Microsoft account
@ -9360,14 +9545,30 @@ function HEIF
"Install"
{
# Check whether the extension is already installed
# HEVC Video Extension is already installed in Windows 11 22H2 by default
if ((-not (Get-AppxPackage -Name Microsoft.HEVCVideoExtension)) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
if ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
{
return
}
try
{
# Check the internet connection
$Parameters = @{
Uri = "https://www.google.com"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
try
{
# Check the internet connection
# Check whether https://github.com is alive
$Parameters = @{
Uri = "https://www.google.com"
Uri = "https://github.com"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
@ -9377,77 +9578,36 @@ function HEIF
return
}
try
{
# Check whether the https://store.rg-adguard.net site is alive
$Parameters = @{
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
$Parameters = @{
Method = "Post"
Uri = "https://store.rg-adguard.net/api/GetFiles"
ContentType = "application/x-www-form-urlencoded"
Body = @{
type = "url"
# HEVC Video Extensions from Device Manufacturer
url = "https://www.microsoft.com/store/productId/9n4wgh0z6vhq"
ring = "Retail"
lang = "en-US"
}
UseBasicParsing = $true
}
$Raw = Invoke-WebRequest @Parameters
# Parsing the page
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | ForEach-Object -Process {
$TempURL = $_.Groups[1].Value
$Package = $_.Groups[2].Value
if ($Package -like "Microsoft.HEVCVideoExtension_*_x64__8wekyb3d8bbwe.appx")
{
Write-Information -MessageData "" -InformationAction Continue
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\$Package"
UseBasicParsing = $true
Verbose = $true
}
Invoke-WebRequest @Parameters
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\$Package" -Verbose
Remove-Item -Path "$DownloadsFolder\$Package" -Force
}
}
# https://github.com/Sophia-Community/SophiApp/tree/master/AppX
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{
Uri = "https://github.com/Sophia-Community/SophiApp/raw/master/AppX/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true
Verbose = $true
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net")
Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net") -ErrorAction SilentlyContinue
Invoke-WebRequest @Parameters
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Verbose
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Force
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Warning -Message ($Localization.NoResponse -f "https://github.com")
Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
catch [System.Net.WebException]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue
}
}
"Manually"
{
@ -12114,6 +12274,13 @@ function Windows10ContextMenu
#>
function UpdateLGPEPolicies
{
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {
($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")
}))
{
return
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Information -MessageData "" -InformationAction Continue
@ -12304,6 +12471,12 @@ public static void PostMessage()
}
}
if ($Script:RegionChanged)
{
# Set the original region ID
Set-WinHomeLocation -GeoId $Script:Region
}
# In order for the changes to take effect the File Explorer process has to be restarted
$Title = ""
$Message = $Localization.FileExplorerRestartPrompt

19
Sophia Script/Sophia Script for Windows 11/Sophia.ps1

@ -76,6 +76,7 @@ Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force
# Import module for modifying registry.pol files (Administrative Templates) of local GPOs
# Used for UpdateLGPEPolicies function
# https://www.powershellgallery.com/packages/PolicyFileEditor
Remove-Module -Name PolicyFileEditor -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\bin\PolicyFileEditor\PolicyFileEditor.psd1 -PassThru -Force
@ -912,6 +913,24 @@ InstallVCRedistx64
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
#>
InstallDotNetRuntime6
# Enable proxying only blocked sites from the unified registry of Roskomnadzor
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора
# https://antizapret.prostovpn.org
RKNBypass -Enable
# Disable proxying only blocked sites from the unified registry of Roskomnadzor (default value)
# Выключить проксирование только заблокированных сайтов из единого реестра Роскомнадзора (значение по умолчанию)
# https://antizapret.prostovpn.org
# RKNBypass -Disable
# Enable all necessary dependencies (reboot may require) and open Microsoft Store WSA page to install Windows Subsystem for Android™ with Amazon Appstore manually
# Включить все необходимые зависимости (может потребоваться перезагрузка) и открыть страницу WSA в Microsoft Store, чтобы вручную установить Windows Subsystem for Android™ with Amazon Appstore
# WSA -Enable
# Disable all necessary dependencies (reboot may require) and uninstall Windows Subsystem for Android™ with Amazon Appstore (default value)
# Выключить все необходимые зависимости и удалить Windows Subsystem for Android™ with Amazon Appstore (значение по умолчанию)
# WSA -Disable
#endregion System
#region WSL

Loading…
Cancel
Save