Browse Source

Removed `IPv6Component` function

master
Dmitry Nefedov 2 months ago
parent
commit
20387b6078
  1. 2
      Download_Sophia.ps1
  2. 19
      Wrapper/Config/config_Windows_10.json
  3. 19
      Wrapper/Config/config_Windows_10_LTSC.json
  4. 35
      Wrapper/Config/config_Windows_11.json
  5. 20
      Wrapper/Config/config_Windows_11_LTSC.json
  6. 18
      Wrapper/Localizations/de-DE/tooltip_Windows_10.json
  7. 32
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  8. 18
      Wrapper/Localizations/en-US/tooltip_Windows_10.json
  9. 32
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  10. 18
      Wrapper/Localizations/ru-RU/tooltip_Windows_10.json
  11. 32
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  12. BIN
      Wrapper/SophiaScriptWrapper.exe
  13. 162
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  14. 29
      src/Sophia_Script_for_Windows_10/Sophia.ps1
  15. 137
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  16. 29
      src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1
  17. 137
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  18. 29
      src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1
  19. 178
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  20. 27
      src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1
  21. 237
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  22. 57
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  23. 142
      src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1
  24. 29
      src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1
  25. 217
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  26. 35
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

2
Download_Sophia.ps1

@ -14,7 +14,7 @@
#>
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
if ($Host.Version.Major -eq 5)
if ($Host.Version.Major -eq 5) ###
{
# Progress bar can significantly impact cmdlet performance
# https://github.com/PowerShell/PowerShell/issues/2138

19
Wrapper/Config/config_Windows_10.json

@ -1298,25 +1298,6 @@
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "System",
"Control": "cmb",
"Required": "false",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable"
},
"One": {
"Tag": "Enable"
},
"Two": {
"Tag": "PreferIPv4overIPv6"
}
},
"Preset": "One",
"WindowsDefault": "One"
},
{
"Region": "System",
"Control": "cmb",

19
Wrapper/Config/config_Windows_10_LTSC.json

@ -1184,25 +1184,6 @@
"LTSC2019": "true",
"LTSC2021": "true"
},
{
"Region": "System",
"Control": "cmb",
"Required": "false",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable"
},
"One": {
"Tag": "Enable"
},
"Two": {
"Tag": "PreferIPv4overIPv6"
}
},
"Preset": "One",
"WindowsDefault": "One"
},
{
"Region": "System",
"Control": "cmb",

35
Wrapper/Config/config_Windows_11.json

@ -1237,25 +1237,6 @@
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "System",
"Control": "cmb",
"Required": "false",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable"
},
"One": {
"Tag": "Enable"
},
"Two": {
"Tag": "PreferIPv4overIPv6"
}
},
"Preset": "One",
"WindowsDefault": "One"
},
{
"Region": "System",
"Control": "cmb",
@ -2112,6 +2093,22 @@
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Context menu",
"Control": "cmb",
"Required": "false",
"Function": "EditWithClipchampContext",
"Arg": {
"Zero": {
"Tag": "Hide"
},
"One": {
"Tag": "Show"
}
},
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Context menu",
"Control": "cmb",

20
Wrapper/Config/config_Windows_11_LTSC.json

@ -1249,26 +1249,6 @@
"WindowsDefault": "One",
"LTSC2024": "true"
},
{
"Region": "System",
"Control": "cmb",
"Required": "false",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable"
},
"One": {
"Tag": "Enable"
},
"Two": {
"Tag": "PreferIPv4overIPv6"
}
},
"Preset": "One",
"WindowsDefault": "One",
"LTSC2024": "true"
},
{
"Region": "System",
"Control": "cmb",

18
Wrapper/Localizations/de-DE/tooltip_Windows_10.json

@ -1138,24 +1138,6 @@
}
}
},
{
"Region": "System",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable",
"ToolTip": "Deaktiviert die Komponente Internet Protocol Version 6 (TCP/IPv6) für alle Netzwerkverbindungen. Bevor die Funktion aufgerufen wird, wird geprüft, ob Ihr ISP das IPv6-Protokoll unterstützt. https://ipify.org."
},
"One": {
"Tag": "Enable",
"ToolTip": "Aktiviert die Komponente Internet Protocol Version 6 (TCP/IPv6) für alle Netzwerkverbindungen (Standardeinstellung). Bevor die Funktion aufgerufen wird, wird geprüft, ob Ihr ISP das IPv6-Protokoll unterstützt. https://ipify.org."
},
"Two": {
"Tag": "PreferIPv4overIPv6",
"ToolTip": "Aktiviert die Komponente Internet Protocol Version 6 (TCP/IPv6) für alle Netzwerkverbindungen. IPv4 gegenüber IPv6 bevorzugen. Bevor die Funktion aufgerufen wird, wird geprüft, ob Ihr ISP das IPv6-Protokoll unterstützt. https://ipify.org"
}
}
},
{
"Region": "System",
"Function": "InputMethod",

32
Wrapper/Localizations/de-DE/tooltip_Windows_11.json

@ -1100,24 +1100,6 @@
}
}
},
{
"Region": "System",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable",
"ToolTip": "Deaktiviert die Komponente Internet Protocol Version 6 (TCP/IPv6) für alle Netzwerkverbindungen. Bevor die Funktion aufgerufen wird, wird geprüft, ob Ihr ISP das IPv6-Protokoll unterstützt. https://ipify.org."
},
"One": {
"Tag": "Enable",
"ToolTip": "Aktiviert die Komponente Internet Protocol Version 6 (TCP/IPv6) für alle Netzwerkverbindungen (Standardeinstellung). Bevor die Funktion aufgerufen wird, wird geprüft, ob Ihr ISP das IPv6-Protokoll unterstützt. https://ipify.org."
},
"Two": {
"Tag": "PreferIPv4overIPv6",
"ToolTip": "Aktiviert die Komponente Internet Protocol Version 6 (TCP/IPv6) für alle Netzwerkverbindungen. IPv4 gegenüber IPv6 bevorzugen. Bevor die Funktion aufgerufen wird, wird geprüft, ob Ihr ISP das IPv6-Protokoll unterstützt. https://ipify.org"
}
}
},
{
"Region": "System",
"Function": "InputMethod",
@ -1869,6 +1851,20 @@
}
}
},
{
"Region": "Context menu",
"Function": "EditWithClipchampContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Eintrag \"Mit Fotos bearbeiten\" im Kontextmenü ausblenden."
},
"One": {
"Tag": "Show",
"ToolTip": "Eintrag \"Mit Fotos bearbeiten\" im Kontextmenü anzeigen (Standardeinstellung)."
}
}
},
{
"Region": "Context menu",
"Function": "PrintCMDContext",

18
Wrapper/Localizations/en-US/tooltip_Windows_10.json

@ -1138,24 +1138,6 @@
}
}
},
{
"Region": "System",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable",
"ToolTip": "Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org."
},
"One": {
"Tag": "Enable",
"ToolTip": "Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value). Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org."
},
"Two": {
"Tag": "PreferIPv4overIPv6",
"ToolTip": "Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6. Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org."
}
}
},
{
"Region": "System",
"Function": "InputMethod",

32
Wrapper/Localizations/en-US/tooltip_Windows_11.json

@ -1100,24 +1100,6 @@
}
}
},
{
"Region": "System",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable",
"ToolTip": "Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org."
},
"One": {
"Tag": "Enable",
"ToolTip": "Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value). Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org."
},
"Two": {
"Tag": "PreferIPv4overIPv6",
"ToolTip": "Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6. Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org."
}
}
},
{
"Region": "System",
"Function": "InputMethod",
@ -1869,6 +1851,20 @@
}
}
},
{
"Region": "Context menu",
"Function": "EditWithPhotosContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Hide the \"Edit with Photos\" item from the media files context menu."
},
"One": {
"Tag": "Show",
"ToolTip": "Show the \"Edit with Photos\" item in the media files context menu (default value)."
}
}
},
{
"Region": "Context menu",
"Function": "PrintCMDContext",

18
Wrapper/Localizations/ru-RU/tooltip_Windows_10.json

@ -1138,24 +1138,6 @@
}
}
},
{
"Region": "System",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable",
"ToolTip": "Выключить IP версии 6 (TCP/IPv6). Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org."
},
"One": {
"Tag": "Enable",
"ToolTip": "Включить IP версии 6 (TCP/IPv6) (значение по умолчанию). Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org."
},
"Two": {
"Tag": "PreferIPv4overIPv6",
"ToolTip": "Включить IP версии 6 (TCP/IPv6). Предпочтение IPv4 перед IPv6. Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org"
}
}
},
{
"Region": "System",
"Function": "InputMethod",

32
Wrapper/Localizations/ru-RU/tooltip_Windows_11.json

@ -1100,24 +1100,6 @@
}
}
},
{
"Region": "System",
"Function": "IPv6Component",
"Arg": {
"Zero": {
"Tag": "Disable",
"ToolTip": "Выключить IP версии 6 (TCP/IPv6). Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org."
},
"One": {
"Tag": "Enable",
"ToolTip": "Включить IP версии 6 (TCP/IPv6) (значение по умолчанию). Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org."
},
"Two": {
"Tag": "PreferIPv4overIPv6",
"ToolTip": "Включить IP версии 6 (TCP/IPv6). Предпочтение IPv4 перед IPv6. Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org"
}
}
},
{
"Region": "System",
"Function": "InputMethod",
@ -1869,6 +1851,20 @@
}
}
},
{
"Region": "Context menu",
"Function": "EditWithClipchampContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Скрыть пункт \"Изменить с помощью приложения \"Фотографии\"\" из контекстного меню медиа-файлов."
},
"One": {
"Tag": "Show",
"ToolTip": "Отобразить пункт \"Изменить с помощью приложения \"Фотографии\"\" в контекстном меню медиа-файлов (значение по умолчанию)."
}
}
},
{
"Region": "Context menu",
"Function": "PrintCMDContext",

BIN
Wrapper/SophiaScriptWrapper.exe

Binary file not shown.

162
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -3666,7 +3666,7 @@ function NewsInterests
public static extern int HashData(byte[] pbData, int cbData, byte[] piet, int outputLen);
"@
}
if (-not ("WinAPI.GetStrings" -as [type]))
if (-not ("WinAPI.Signature" -as [type]))
{
Add-Type @Signature
}
@ -3710,7 +3710,7 @@ public static extern int HashData(byte[] pbData, int cbData, byte[] piet, int ou
}
}
Remove-Item -Path "$env:SystemRoot\System32\reg_temp.exe" -Force
Remove-Item -Path "$env:SystemRoot\System32\powershell_temp.exe" -Force
}
<#
@ -6832,143 +6832,6 @@ function NetworkAdaptersSavePower
}
}
<#
.SYNOPSIS
Internet Protocol Version 6 (TCP/IPv6) component
.PARAMETER Disable
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP doesn't support it
.PARAMETER Enable
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it
.PARAMETER PreferIPv4overIPv6
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it. Prefer IPv4 over IPv6
.EXAMPLE
IPv6Component -Disable
.EXAMPLE
IPv6Component -Enable
.EXAMPLE
IPv6Component -PreferIPv4overIPv6
.NOTES
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
.NOTES
Current user
#>
function IPv6Component
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "PreferIPv4overIPv6"
)]
[switch]
$PreferIPv4overIPv6
)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
try
{
# Check the internet connection
$Parameters = @{
Name = "dns.msftncsi.com"
Server = "1.1.1.1"
DnsOnly = $true
ErrorAction = "Stop"
}
if ((Resolve-DnsName @Parameters).IPAddress -notcontains "131.107.255.255")
{
return
}
try
{
# Check whether the https://ipify.org site is alive
$Parameters = @{
Uri = "https://ipify.org"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
# Check whether the ISP supports IPv6 protocol using https://ipify.org
$Parameters = @{
Uri = "https://api64.ipify.org?format=json"
UseBasicParsing = $true
Verbose = $true
}
$IPAddress = (Invoke-RestMethod @Parameters).ip
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://ipify.org")
Write-Error -Message ($Localization.NoResponse -f "https://ipify.org") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
}
catch [System.ComponentModel.Win32Exception]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
if ($IPAddress -notmatch ":")
{
Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"Enable"
{
if ($IPAddress -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"PreferIPv4overIPv6"
{
if ($IPVersion -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -Name DisabledComponents -PropertyType DWord -Value 32 -Force
}
}
}
}
<#
.SYNOPSIS
Override for default input method
@ -11258,12 +11121,25 @@ function UninstallUWPApps
"AppUp.IntelGraphicsControlPanel",
"AppUp.IntelGraphicsExperience",
# ELAN Touchpad
"ELANMicroelectronicsCorpo.ELANTouchpadforThinkpad",
"ELANMicroelectronicsCorpo.ELANTrackPointforThinkpa",
# Microsoft Application Compatibility Enhancements
"Microsoft.ApplicationCompatibilityEnhancements",
# AVC Encoder Video Extension
"Microsoft.AVCEncoderVideoExtension",
# Microsoft Desktop App Installer
"Microsoft.DesktopAppInstaller",
# Store Experience Host
"Microsoft.StorePurchaseApp",
# Cross Device Experience Host
"MicrosoftWindows.CrossDevice",
# Notepad
"Microsoft.WindowsNotepad",
@ -11309,7 +11185,11 @@ function UninstallUWPApps
"NVIDIACorp.NVIDIAControlPanel",
# Realtek Audio Console
"RealtekSemiconductorCorp.RealtekAudioControl"
"RealtekSemiconductorCorp.RealtekAudioControl",
# Synaptics
"SynapticsIncorporated.SynapticsControlPanel",
"SynapticsIncorporated.24916F58D6E7"
)
#region Variables
@ -12051,7 +11931,7 @@ function XboxGameTips
$Enable
)
if (-not ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp)))
if (-not (Get-AppxPackage -Name Microsoft.GamingApp))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose

29
src/Sophia_Script_for_Windows_10/Sophia.ps1

@ -72,7 +72,7 @@ Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.19.0 | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-LocalizedData -BindingVariable Global:Localization -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
Import-LocalizedData -BindingVariable Global:Localization -UICulture $PSUICulture -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
# Check whether script is not running via PowerShell (x86)
try
@ -774,33 +774,6 @@ NetworkAdaptersSavePower -Disable
# Разрешить отключение всех сетевых адаптеров для экономии энергии (значение по умолчанию)
# NetworkAdaptersSavePower -Enable
<#
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Выключить IP версии 6 (TCP/IPv6)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
IPv6Component -Disable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value)
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) (значение по умолчанию)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -Enable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) и предпочитать. Предпочтение IPv4 перед IPv6
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -PreferIPv4overIPv6
# Override for default input method: English
# Переопределить метод ввода по умолчанию: английский
InputMethod -English

137
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -5422,143 +5422,6 @@ function NetworkAdaptersSavePower
}
}
<#
.SYNOPSIS
Internet Protocol Version 6 (TCP/IPv6) component
.PARAMETER Disable
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP doesn't support it
.PARAMETER Enable
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it
.PARAMETER PreferIPv4overIPv6
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it. Prefer IPv4 over IPv6
.EXAMPLE
IPv6Component -Disable
.EXAMPLE
IPv6Component -Enable
.EXAMPLE
IPv6Component -PreferIPv4overIPv6
.NOTES
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
.NOTES
Current user
#>
function IPv6Component
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "PreferIPv4overIPv6"
)]
[switch]
$PreferIPv4overIPv6
)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
try
{
# Check the internet connection
$Parameters = @{
Name = "dns.msftncsi.com"
Server = "1.1.1.1"
DnsOnly = $true
ErrorAction = "Stop"
}
if ((Resolve-DnsName @Parameters).IPAddress -notcontains "131.107.255.255")
{
return
}
try
{
# Check whether the https://ipify.org site is alive
$Parameters = @{
Uri = "https://ipify.org"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
# Check whether the ISP supports IPv6 protocol using https://ipify.org
$Parameters = @{
Uri = "https://api64.ipify.org?format=json"
UseBasicParsing = $true
Verbose = $true
}
$IPAddress = (Invoke-RestMethod @Parameters).ip
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://ipify.org")
Write-Error -Message ($Localization.NoResponse -f "https://ipify.org") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
}
catch [System.ComponentModel.Win32Exception]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
if ($IPAddress -notmatch ":")
{
Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"Enable"
{
if ($IPAddress -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"PreferIPv4overIPv6"
{
if ($IPVersion -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -Name DisabledComponents -PropertyType DWord -Value 32 -Force
}
}
}
}
<#
.SYNOPSIS
Override for default input method

29
src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1

@ -70,7 +70,7 @@ Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2019 v5.9.0 | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-LocalizedData -BindingVariable Global:Localization -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
Import-LocalizedData -BindingVariable Global:Localization -UICulture $PSUICulture -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
# Check whether script is not running via PowerShell (x86)
try
@ -596,33 +596,6 @@ NetworkAdaptersSavePower -Disable
# Разрешить отключение всех сетевых адаптеров для экономии энергии (значение по умолчанию)
# NetworkAdaptersSavePower -Enable
<#
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Выключить IP версии 6 (TCP/IPv6)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
IPv6Component -Disable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value)
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) (значение по умолчанию)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -Enable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) и предпочитать. Предпочтение IPv4 перед IPv6
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -PreferIPv4overIPv6
# Override for default input method: English
# Переопределить метод ввода по умолчанию: английский
InputMethod -English

137
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -5814,143 +5814,6 @@ function NetworkAdaptersSavePower
}
}
<#
.SYNOPSIS
Internet Protocol Version 6 (TCP/IPv6) component
.PARAMETER Disable
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP doesn't support it
.PARAMETER Enable
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it
.PARAMETER PreferIPv4overIPv6
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it. Prefer IPv4 over IPv6
.EXAMPLE
IPv6Component -Disable
.EXAMPLE
IPv6Component -Enable
.EXAMPLE
IPv6Component -PreferIPv4overIPv6
.NOTES
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
.NOTES
Current user
#>
function IPv6Component
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "PreferIPv4overIPv6"
)]
[switch]
$PreferIPv4overIPv6
)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
try
{
# Check the internet connection
$Parameters = @{
Name = "dns.msftncsi.com"
Server = "1.1.1.1"
DnsOnly = $true
ErrorAction = "Stop"
}
if ((Resolve-DnsName @Parameters).IPAddress -notcontains "131.107.255.255")
{
return
}
try
{
# Check whether the https://ipify.org site is alive
$Parameters = @{
Uri = "https://ipify.org"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
# Check whether the ISP supports IPv6 protocol using https://ipify.org
$Parameters = @{
Uri = "https://api64.ipify.org?format=json"
UseBasicParsing = $true
Verbose = $true
}
$IPAddress = (Invoke-RestMethod @Parameters).ip
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://ipify.org")
Write-Error -Message ($Localization.NoResponse -f "https://ipify.org") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
}
catch [System.ComponentModel.Win32Exception]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
if ($IPAddress -notmatch ":")
{
Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"Enable"
{
if ($IPAddress -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"PreferIPv4overIPv6"
{
if ($IPVersion -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -Name DisabledComponents -PropertyType DWord -Value 32 -Force
}
}
}
}
<#
.SYNOPSIS
Override for default input method

29
src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1

@ -70,7 +70,7 @@ Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2021 v5.19.0 | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-LocalizedData -BindingVariable Global:Localization -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
Import-LocalizedData -BindingVariable Global:Localization -UICulture $PSUICulture -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
# Check whether script is not running via PowerShell (x86)
try
@ -661,33 +661,6 @@ NetworkAdaptersSavePower -Disable
# Разрешить отключение всех сетевых адаптеров для экономии энергии (значение по умолчанию)
# NetworkAdaptersSavePower -Enable
<#
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Выключить IP версии 6 (TCP/IPv6)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
IPv6Component -Disable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value)
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) (значение по умолчанию)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -Enable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) и предпочитать. Предпочтение IPv4 перед IPv6
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -PreferIPv4overIPv6
# Override for default input method: English
# Переопределить метод ввода по умолчанию: английский
InputMethod -English

178
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -3670,13 +3670,13 @@ function NewsInterests
public static extern int HashData(byte[] pbData, int cbData, byte[] piet, int outputLen);
"@
}
if (-not ("WinAPI.GetStrings" -as [type]))
if (-not ("WinAPI.Signature" -as [type]))
{
Add-Type @Signature
}
# We cannot call any of APIs except copying reg.exe with a different name due to a UCPD driver tracks all executables to block the access to the registry
Copy-Item -Path "$env:SystemRoot\System32\reg.exe" -Destination "$env:SystemRoot\System32\reg_temp.exe" -Force
# We cannot set a value to EnShellFeedsTaskbarViewMode, having called any of APIs, except of copying powershell.exe (or any other tricks) with a different name, due to a UCPD driver tracks all executables to block the access to the registry
Copy-Item -Path "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" -Destination "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell_temp.exe" -Force
switch ($PSCmdlet.ParameterSetName)
{
@ -3694,10 +3694,7 @@ public static extern int HashData(byte[] pbData, int cbData, byte[] piet, int ou
# Get value to save in EnShellFeedsTaskbarViewMode key
$DWordData = [System.BitConverter]::ToUInt32($bytesOut,0)
# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing?view=powershell-7.4#the-stop-parsing-token
# We cannot put --% inside the command below as it breaks parsing of $DWordData variable
$EscapeParser = "--%"
& "$env:SystemRoot\System32\reg_temp.exe" $EscapeParser ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds /v EnShellFeedsTaskbarViewMode /t REG_DWORD /d $DWordData /f
& "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell_temp.exe" -Command {New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds -Name EnShellFeedsTaskbarViewMode -PropertyType DWord -Value $DWordData -Force}
}
"Enable"
{
@ -3713,14 +3710,11 @@ public static extern int HashData(byte[] pbData, int cbData, byte[] piet, int ou
# Get value to save in EnShellFeedsTaskbarViewMode key
$DWordData = [System.BitConverter]::ToUInt32($bytesOut,0)
# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing?view=powershell-7.4#the-stop-parsing-token
# We cannot put --% inside the command below as it breaks parsing of $DWordData variable
$EscapeParser = "--%"
& "$env:SystemRoot\System32\reg_temp.exe" $EscapeParser ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds /v EnShellFeedsTaskbarViewMode /t REG_DWORD /d $DWordData /f
& "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell_temp.exe" -Command {New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds -Name EnShellFeedsTaskbarViewMode -PropertyType DWord -Value $DWordData -Force}
}
}
Remove-Item -Path "$env:SystemRoot\System32\reg_temp.exe" -Force
Remove-Item -Path "$env:SystemRoot\System32\powershell_temp.exe" -Force
}
<#
@ -6844,143 +6838,6 @@ function NetworkAdaptersSavePower
}
}
<#
.SYNOPSIS
Internet Protocol Version 6 (TCP/IPv6) component
.PARAMETER Disable
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP doesn't support it
.PARAMETER Enable
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it
.PARAMETER PreferIPv4overIPv6
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it. Prefer IPv4 over IPv6
.EXAMPLE
IPv6Component -Disable
.EXAMPLE
IPv6Component -Enable
.EXAMPLE
IPv6Component -PreferIPv4overIPv6
.NOTES
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
.NOTES
Current user
#>
function IPv6Component
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "PreferIPv4overIPv6"
)]
[switch]
$PreferIPv4overIPv6
)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
try
{
# Check the internet connection
$Parameters = @{
Name = "dns.msftncsi.com"
Server = "1.1.1.1"
DnsOnly = $true
ErrorAction = "Stop"
}
if ((Resolve-DnsName @Parameters).IPAddress -notcontains "131.107.255.255")
{
return
}
try
{
# Check whether the https://ipify.org site is alive
$Parameters = @{
Uri = "https://ipify.org"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
# Check whether the ISP supports IPv6 protocol using https://ipify.org
$Parameters = @{
Uri = "https://api64.ipify.org?format=json"
UseBasicParsing = $true
Verbose = $true
}
$IPAddress = (Invoke-RestMethod @Parameters).ip
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://ipify.org")
Write-Error -Message ($Localization.NoResponse -f "https://ipify.org") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
}
catch [System.ComponentModel.Win32Exception]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
if ($IPAddress -notmatch ":")
{
Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"Enable"
{
if ($IPAddress -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"PreferIPv4overIPv6"
{
if ($IPVersion -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -Name DisabledComponents -PropertyType DWord -Value 32 -Force
}
}
}
}
<#
.SYNOPSIS
Override for default input method
@ -9804,6 +9661,8 @@ public static void Refresh()
}
[WinAPI.Signature]::Refresh()
Remove-Item -Path "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell_temp.exe" -Force
}
<#
@ -11278,12 +11137,25 @@ function UninstallUWPApps
"AppUp.IntelGraphicsControlPanel",
"AppUp.IntelGraphicsExperience",
# ELAN Touchpad
"ELANMicroelectronicsCorpo.ELANTouchpadforThinkpad",
"ELANMicroelectronicsCorpo.ELANTrackPointforThinkpa",
# Microsoft Application Compatibility Enhancements
"Microsoft.ApplicationCompatibilityEnhancements",
# AVC Encoder Video Extension
"Microsoft.AVCEncoderVideoExtension",
# Microsoft Desktop App Installer
"Microsoft.DesktopAppInstaller",
# Store Experience Host
"Microsoft.StorePurchaseApp",
# Cross Device Experience Host
"MicrosoftWindows.CrossDevice",
# Notepad
"Microsoft.WindowsNotepad",
@ -11329,7 +11201,11 @@ function UninstallUWPApps
"NVIDIACorp.NVIDIAControlPanel",
# Realtek Audio Console
"RealtekSemiconductorCorp.RealtekAudioControl"
"RealtekSemiconductorCorp.RealtekAudioControl",
# Synaptics
"SynapticsIncorporated.SynapticsControlPanel",
"SynapticsIncorporated.24916F58D6E7"
)
#region Variables
@ -12071,7 +11947,7 @@ function XboxGameTips
$Enable
)
if (-not ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp)))
if (-not (Get-AppxPackage -Name Microsoft.GamingApp))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose

27
src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1

@ -785,33 +785,6 @@ NetworkAdaptersSavePower -Disable
# Разрешить отключение всех сетевых адаптеров для экономии энергии (значение по умолчанию)
# NetworkAdaptersSavePower -Enable
<#
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Выключить IP версии 6 (TCP/IPv6)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
IPv6Component -Disable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value)
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) (значение по умолчанию)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -Enable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) и предпочитать. Предпочтение IPv4 перед IPv6
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -PreferIPv4overIPv6
# Override for default input method: English
# Переопределить метод ввода по умолчанию: английский
InputMethod -English

237
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -5616,6 +5616,9 @@ function WindowsFeatures
# Microsoft XPS Document Writer
"Printing-XPSServices-Features",
# Recall
"Recall"
# Work Folders Client
"WorkFolders-Client"
)
@ -6626,143 +6629,6 @@ function NetworkAdaptersSavePower
}
}
<#
.SYNOPSIS
Internet Protocol Version 6 (TCP/IPv6) component
.PARAMETER Disable
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP doesn't support it
.PARAMETER Enable
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it
.PARAMETER PreferIPv4overIPv6
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it. Prefer IPv4 over IPv6
.EXAMPLE
IPv6Component -Disable
.EXAMPLE
IPv6Component -Enable
.EXAMPLE
IPv6Component -PreferIPv4overIPv6
.NOTES
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
.NOTES
Current user
#>
function IPv6Component
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "PreferIPv4overIPv6"
)]
[switch]
$PreferIPv4overIPv6
)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
try
{
# Check the internet connection
$Parameters = @{
Name = "dns.msftncsi.com"
Server = "1.1.1.1"
DnsOnly = $true
ErrorAction = "Stop"
}
if ((Resolve-DnsName @Parameters).IPAddress -notcontains "131.107.255.255")
{
return
}
try
{
# Check whether the https://ipify.org site is alive
$Parameters = @{
Uri = "https://ipify.org"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
# Check whether the ISP supports IPv6 protocol using https://ipify.org
$Parameters = @{
Uri = "https://api64.ipify.org?format=json"
UseBasicParsing = $true
Verbose = $true
}
$IPAddress = (Invoke-RestMethod @Parameters).ip
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://ipify.org")
Write-Error -Message ($Localization.NoResponse -f "https://ipify.org") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
}
catch [System.ComponentModel.Win32Exception]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
if ($IPAddress -notmatch ":")
{
Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"Enable"
{
if ($IPAddress -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"PreferIPv4overIPv6"
{
if ($IPVersion -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -Name DisabledComponents -PropertyType DWord -Value 32 -Force
}
}
}
}
<#
.SYNOPSIS
Override for default input method
@ -10572,10 +10438,10 @@ function UninstallUWPApps
# Xbox Speech To Text Overlay
"Microsoft.XboxSpeechToTextOverlay",
# Xbox Game Bar
# Game Bar
"Microsoft.XboxGamingOverlay",
# Xbox Game Bar Plugin
# Game Bar Plugin
"Microsoft.XboxGameOverlay"
)
@ -10588,6 +10454,10 @@ function UninstallUWPApps
"AppUp.IntelGraphicsControlPanel",
"AppUp.IntelGraphicsExperience",
# ELAN Touchpad
"ELANMicroelectronicsCorpo.ELANTouchpadforThinkpad",
"ELANMicroelectronicsCorpo.ELANTrackPointforThinkpa",
# Microsoft Application Compatibility Enhancements
"Microsoft.ApplicationCompatibilityEnhancements",
@ -10648,7 +10518,11 @@ function UninstallUWPApps
"NVIDIACorp.NVIDIAControlPanel",
# Realtek Audio Console
"RealtekSemiconductorCorp.RealtekAudioControl"
"RealtekSemiconductorCorp.RealtekAudioControl",
# Synaptics
"SynapticsIncorporated.SynapticsControlPanel",
"SynapticsIncorporated.24916F58D6E7"
)
#region Variables
@ -10873,7 +10747,7 @@ function UninstallUWPApps
$Window.Close() | Out-Null
# If Xbox Game Bar is selected to uninstall stop its processes
# If Game Bar is selected to uninstall stop its processes
if ($PackagesToRemove -match "Microsoft.XboxGamingOverlay")
{
Get-Process -Name GameBar, GameBarFTServer -ErrorAction Ignore | Stop-Process -Force
@ -11128,13 +11002,13 @@ function TeamsAutostart
#region Gaming
<#
.SYNOPSIS
Xbox Game Bar
Game Bar
.PARAMETER Disable
Disable Xbox Game Bar
Disable Game Bar
.PARAMETER Enable
Enable Xbox Game Bar
Enable Game Bar
.EXAMPLE
XboxGameBar -Disable
@ -11143,7 +11017,7 @@ function TeamsAutostart
XboxGameBar -Enable
.NOTES
To prevent popping up the "You'll need a new app to open this ms-gamingoverlay" warning, you need to disable the Xbox Game Bar app, even if you uninstalled it before
To prevent popping up the "You'll need a new app to open this ms-gamingoverlay" warning, you need to disable the Game Bar app, even if you uninstalled it before
.NOTES
Current user
@ -11184,13 +11058,13 @@ function XboxGameBar
<#
.SYNOPSIS
Xbox Game Bar tips
Game Bar tips
.PARAMETER Disable
Disable Xbox Game Bar tips
Disable Game Bar tips
.PARAMETER Enable
Enable Xbox Game Bar tips
Enable Game Bar tips
.EXAMPLE
XboxGameTips -Disable
@ -11220,7 +11094,7 @@ function XboxGameTips
$Enable
)
if (-not ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp)))
if (-not (Get-AppxPackage -Name Microsoft.GamingApp))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
@ -13554,6 +13428,71 @@ function EditWithClipchampContext
}
}
<#
.SYNOPSIS
The "Edit with Photos" item in the media files context menu
.PARAMETER Hide
Hide the "Edit with Photos" item from the media files context menu
.PARAMETER Show
Show the "Edit with Photos" item in the media files context menu
.EXAMPLE
EditWithPhotosContext -Hide
.EXAMPLE
EditWithPhotosContext -Show
.NOTES
Current user
#>
function EditWithPhotosContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
if (-not (Get-AppxPackage -Name Microsoft.Windows.Photos))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
return
}
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{BFE0E2A4-C70C-4AD7-AC3D-10D1ECEBB5B4}" -Force -ErrorAction Ignore
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
if (-not (Test-Path -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked"))
{
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Force
}
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{BFE0E2A4-C70C-4AD7-AC3D-10D1ECEBB5B4}" -PropertyType String -Value "" -Force
}
"Show"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{BFE0E2A4-C70C-4AD7-AC3D-10D1ECEBB5B4}" -Force -ErrorAction Ignore
}
}
}
<#
.SYNOPSIS
The "Print" item in the .bat and .cmd context menu

57
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -71,7 +71,7 @@ Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.7.0 | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-LocalizedData -BindingVariable Global:Localization -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
Import-LocalizedData -BindingVariable Global:Localization -UICulture $PSUICulture -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
# Check whether script is not running via PowerShell (x86)
try
@ -757,33 +757,6 @@ NetworkAdaptersSavePower -Disable
# Разрешить отключение всех сетевых адаптеров для экономии энергии (значение по умолчанию)
# NetworkAdaptersSavePower -Enable
<#
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Выключить IP версии 6 (TCP/IPv6)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
IPv6Component -Disable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value)
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) (значение по умолчанию)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -Enable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) и предпочитать. Предпочтение IPv4 перед IPv6
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -PreferIPv4overIPv6
# Override for default input method: English
# Переопределить метод ввода по умолчанию: английский
InputMethod -English
@ -1086,24 +1059,24 @@ TeamsAutostart -Disable
#region Gaming
<#
Disable Xbox Game Bar
To prevent popping up the "You'll need a new app to open this ms-gamingoverlay" warning, you need to disable the Xbox Game Bar app, even if you uninstalled it before
Disable Game Bar
To prevent popping up the "You'll need a new app to open this ms-gamingoverlay" warning, you need to disable the Game Bar app, even if you uninstalled it before
Отключить Xbox Game Bar
Чтобы предотвратить появление предупреждения "Вам понадобится новое приложение, чтобы открыть этот ms-gamingoverlay", вам необходимо отключить приложение Xbox Game Bar, даже если вы удалили его раньше
Отключить Game Bar
Чтобы предотвратить появление предупреждения "Вам понадобится новое приложение, чтобы открыть этот ms-gamingoverlay", вам необходимо отключить приложение Game Bar, даже если вы удалили его раньше
#>
XboxGameBar -Disable
# Enable Xbox Game Bar (default value)
# Включить Xbox Game Bar (значение по умолчанию)
# Enable Game Bar (default value)
# Включить Game Bar (значение по умолчанию)
# XboxGameBar -Enable
# Disable Xbox Game Bar tips
# Отключить советы Xbox Game Bar
# Disable Game Bar tips
# Отключить советы Game Bar
XboxGameTips -Disable
# Enable Xbox Game Bar tips (default value)
# Включить советы Xbox Game Bar (значение по умолчанию)
# Enable Game Bar tips (default value)
# Включить советы Game Bar (значение по умолчанию)
# XboxGameTips -Enable
# Choose an app and set the "High performance" graphics performance for it. Only if you have a dedicated GPU
@ -1305,6 +1278,14 @@ EditWithClipchampContext -Hide
# Отобразить пункт "Редактировать в Climpchamp" в контекстном меню (значение по умолчанию)
# EditWithClipchampContext -Show
# Hide the "Edit with Photos" item from the media files context menu
# Скрыть пункт "Изменить с помощью приложения "Фотографии"" из контекстного меню
EditWithPhotosContext -Hide
# Show the "Edit with Photos" item in the media files context menu (default value)
# Отобразить пункт "Изменить с помощью приложения "Фотографии"" в контекстном меню (значение по умолчанию)
# EditWithPhotosContext -Show
# Hide the "Print" item from the .bat and .cmd context menu
# Скрыть пункт "Печать" из контекстного меню .bat и .cmd файлов
PrintCMDContext -Hide

142
src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1

@ -636,7 +636,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
Verbose = $true
UseBasicParsing = $true
}
$LatestSupportedBuild = (Invoke-RestMethod @Parameters).Windows_11_LTSC_2024
$LatestSupportedBuild = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_LTSC2024
}
catch [System.Net.WebException]
{
@ -5165,6 +5165,9 @@ function WindowsFeatures
# Microsoft XPS Document Writer
"Printing-XPSServices-Features",
# Recall
"Recall"
# Work Folders Client
"WorkFolders-Client"
)
@ -6172,143 +6175,6 @@ function NetworkAdaptersSavePower
}
}
<#
.SYNOPSIS
Internet Protocol Version 6 (TCP/IPv6) component
.PARAMETER Disable
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP doesn't support it
.PARAMETER Enable
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it
.PARAMETER PreferIPv4overIPv6
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it. Prefer IPv4 over IPv6
.EXAMPLE
IPv6Component -Disable
.EXAMPLE
IPv6Component -Enable
.EXAMPLE
IPv6Component -PreferIPv4overIPv6
.NOTES
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
.NOTES
Current user
#>
function IPv6Component
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "PreferIPv4overIPv6"
)]
[switch]
$PreferIPv4overIPv6
)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
try
{
# Check the internet connection
$Parameters = @{
Name = "dns.msftncsi.com"
Server = "1.1.1.1"
DnsOnly = $true
ErrorAction = "Stop"
}
if ((Resolve-DnsName @Parameters).IPAddress -notcontains "131.107.255.255")
{
return
}
try
{
# Check whether the https://ipify.org site is alive
$Parameters = @{
Uri = "https://ipify.org"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
# Check whether the ISP supports IPv6 protocol using https://ipify.org
$Parameters = @{
Uri = "https://api64.ipify.org?format=json"
UseBasicParsing = $true
Verbose = $true
}
$IPAddress = (Invoke-RestMethod @Parameters).ip
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://ipify.org")
Write-Error -Message ($Localization.NoResponse -f "https://ipify.org") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
}
catch [System.ComponentModel.Win32Exception]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
if ($IPAddress -notmatch ":")
{
Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"Enable"
{
if ($IPAddress -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"PreferIPv4overIPv6"
{
if ($IPVersion -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -Name DisabledComponents -PropertyType DWord -Value 32 -Force
}
}
}
}
<#
.SYNOPSIS
Override for default input method

29
src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1

@ -69,7 +69,7 @@ Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 LTSC 2024 v6.7.0 | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-LocalizedData -BindingVariable Global:Localization -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
Import-LocalizedData -BindingVariable Global:Localization -UICulture $PSUICulture -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
# Check whether script is not running via PowerShell (x86)
try
@ -729,33 +729,6 @@ NetworkAdaptersSavePower -Disable
# Разрешить отключение всех сетевых адаптеров для экономии энергии (значение по умолчанию)
# NetworkAdaptersSavePower -Enable
<#
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Выключить IP версии 6 (TCP/IPv6)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
IPv6Component -Disable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value)
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) (значение по умолчанию)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -Enable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) и предпочитать. Предпочтение IPv4 перед IPv6
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -PreferIPv4overIPv6
# Override for default input method: English
# Переопределить метод ввода по умолчанию: английский
InputMethod -English

217
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -5622,6 +5622,9 @@ function WindowsFeatures
# Microsoft XPS Document Writer
"Printing-XPSServices-Features",
# Recall
"Recall"
# Work Folders Client
"WorkFolders-Client"
)
@ -6632,143 +6635,6 @@ function NetworkAdaptersSavePower
}
}
<#
.SYNOPSIS
Internet Protocol Version 6 (TCP/IPv6) component
.PARAMETER Disable
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP doesn't support it
.PARAMETER Enable
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it
.PARAMETER PreferIPv4overIPv6
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections if your ISP supports it. Prefer IPv4 over IPv6
.EXAMPLE
IPv6Component -Disable
.EXAMPLE
IPv6Component -Enable
.EXAMPLE
IPv6Component -PreferIPv4overIPv6
.NOTES
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
.NOTES
Current user
#>
function IPv6Component
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "PreferIPv4overIPv6"
)]
[switch]
$PreferIPv4overIPv6
)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStrings]::GetString(12612)) -Verbose
try
{
# Check the internet connection
$Parameters = @{
Name = "dns.msftncsi.com"
Server = "1.1.1.1"
DnsOnly = $true
ErrorAction = "Stop"
}
if ((Resolve-DnsName @Parameters).IPAddress -notcontains "131.107.255.255")
{
return
}
try
{
# Check whether the https://ipify.org site is alive
$Parameters = @{
Uri = "https://ipify.org"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
}
if (-not (Invoke-WebRequest @Parameters).StatusDescription)
{
return
}
# Check whether the ISP supports IPv6 protocol using https://ipify.org
$Parameters = @{
Uri = "https://api64.ipify.org?format=json"
UseBasicParsing = $true
Verbose = $true
}
$IPAddress = (Invoke-RestMethod @Parameters).ip
}
catch [System.Net.WebException]
{
Write-Warning -Message ($Localization.NoResponse -f "https://ipify.org")
Write-Error -Message ($Localization.NoResponse -f "https://ipify.org") -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
}
catch [System.ComponentModel.Win32Exception]
{
Write-Warning -Message $Localization.NoInternetConnection
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
if ($IPAddress -notmatch ":")
{
Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"Enable"
{
if ($IPAddress -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
}
}
"PreferIPv4overIPv6"
{
if ($IPVersion -match ":")
{
Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters -Name DisabledComponents -PropertyType DWord -Value 32 -Force
}
}
}
}
<#
.SYNOPSIS
Override for default input method
@ -10604,6 +10470,10 @@ function UninstallUWPApps
"AppUp.IntelGraphicsControlPanel",
"AppUp.IntelGraphicsExperience",
# ELAN Touchpad
"ELANMicroelectronicsCorpo.ELANTouchpadforThinkpad",
"ELANMicroelectronicsCorpo.ELANTrackPointforThinkpa",
# Microsoft Application Compatibility Enhancements
"Microsoft.ApplicationCompatibilityEnhancements",
@ -10664,7 +10534,11 @@ function UninstallUWPApps
"NVIDIACorp.NVIDIAControlPanel",
# Realtek Audio Console
"RealtekSemiconductorCorp.RealtekAudioControl"
"RealtekSemiconductorCorp.RealtekAudioControl",
# Synaptics
"SynapticsIncorporated.SynapticsControlPanel",
"SynapticsIncorporated.24916F58D6E7"
)
#region Variables
@ -11236,7 +11110,7 @@ function XboxGameTips
$Enable
)
if (-not ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp)))
if (-not (Get-AppxPackage -Name Microsoft.GamingApp))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
@ -13570,6 +13444,71 @@ function EditWithClipchampContext
}
}
<#
.SYNOPSIS
The "Edit with Photos" item in the media files context menu
.PARAMETER Hide
Hide the "Edit with Photos" item from the media files context menu
.PARAMETER Show
Show the "Edit with Photos" item in the media files context menu
.EXAMPLE
EditWithPhotosContext -Hide
.EXAMPLE
EditWithPhotosContext -Show
.NOTES
Current user
#>
function EditWithPhotosContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
if (-not (Get-AppxPackage -Name Microsoft.Windows.Photos))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
return
}
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{BFE0E2A4-C70C-4AD7-AC3D-10D1ECEBB5B4}" -Force -ErrorAction Ignore
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
if (-not (Test-Path -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked"))
{
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Force
}
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{BFE0E2A4-C70C-4AD7-AC3D-10D1ECEBB5B4}" -PropertyType String -Value "" -Force
}
"Show"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{BFE0E2A4-C70C-4AD7-AC3D-10D1ECEBB5B4}" -Force -ErrorAction Ignore
}
}
}
<#
.SYNOPSIS
The "Print" item in the .bat and .cmd context menu

35
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -768,33 +768,6 @@ NetworkAdaptersSavePower -Disable
# Разрешить отключение всех сетевых адаптеров для экономии энергии (значение по умолчанию)
# NetworkAdaptersSavePower -Enable
<#
Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Выключить IP версии 6 (TCP/IPv6)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
IPv6Component -Disable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections (default value)
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) (значение по умолчанию)
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -Enable
<#
Enable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Prefer IPv4 over IPv6
Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipify.org
Включить IP версии 6 (TCP/IPv6) и предпочитать. Предпочтение IPv4 перед IPv6
Перед выполнением функции будет проведена проверка: поддерживает ли ваш провайдер IPv6, используя ресурс https://ipify.org
#>
# IPv6Component -PreferIPv4overIPv6
# Override for default input method: English
# Переопределить метод ввода по умолчанию: английский
InputMethod -English
@ -1316,6 +1289,14 @@ EditWithClipchampContext -Hide
# Отобразить пункт "Редактировать в Climpchamp" в контекстном меню (значение по умолчанию)
# EditWithClipchampContext -Show
# Hide the "Edit with Photos" item from the media files context menu
# Скрыть пункт "Изменить с помощью приложения "Фотографии"" из контекстного меню
EditWithPhotosContext -Hide
# Show the "Edit with Photos" item in the media files context menu (default value)
# Отобразить пункт "Изменить с помощью приложения "Фотографии"" в контекстном меню (значение по умолчанию)
# EditWithPhotosContext -Show
# Hide the "Print" item from the .bat and .cmd context menu
# Скрыть пункт "Печать" из контекстного меню .bat и .cmd файлов
PrintCMDContext -Hide

Loading…
Cancel
Save