Browse Source

Small changes

pull/429/head
Dmitry Nefedov 2 years ago
parent
commit
bf3ad82c7c
  1. 2
      Wrapper/Config/config_Windows_10.json
  2. 2
      Wrapper/Config/config_Windows_10_LTSC.json
  3. 2
      Wrapper/Config/config_Windows_11.json
  4. 2
      Wrapper/Localizations/de-DE/tooltip_Windows_10.json
  5. 2
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  6. 2
      Wrapper/Localizations/en-US/tooltip_Windows_10.json
  7. 2
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  8. 2
      Wrapper/Localizations/ru-RU/tooltip_Windows_10.json
  9. 2
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  10. 34
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  11. 6
      src/Sophia_Script_for_Windows_10/Sophia.ps1
  12. 30
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  13. 6
      src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1
  14. 30
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  15. 6
      src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1
  16. 34
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  17. 6
      src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1
  18. 30
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  19. 6
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  20. 30
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  21. 6
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

2
Wrapper/Config/config_Windows_10.json

@ -1606,7 +1606,7 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": ""

2
Wrapper/Config/config_Windows_10_LTSC.json

@ -1776,7 +1776,7 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": ""

2
Wrapper/Config/config_Windows_11.json

@ -1483,7 +1483,7 @@
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": ""

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

@ -1432,7 +1432,7 @@
{
"Id": 537,
"Region": "System",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": "",

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

@ -1323,7 +1323,7 @@
{
"Id": 537,
"Region": "System",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": "",

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

@ -1432,7 +1432,7 @@
{
"Id": 537,
"Region": "System",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": "",

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

@ -1323,7 +1323,7 @@
{
"Id": 537,
"Region": "System",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": "",

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

@ -1432,7 +1432,7 @@
{
"Id": 537,
"Region": "System",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": "",

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

@ -1323,7 +1323,7 @@
{
"Id": 537,
"Region": "System",
"Function": "InstallDotNetRuntime6",
"Function": "InstallDotNetRuntime7",
"Arg": {
"Zero": {
"Tag": "",

34
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -4007,8 +4007,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\move.cur" -Force
@ -4124,8 +4124,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\move.cur" -Force
@ -9114,18 +9114,18 @@ function InstallVCRedist
<#
.SYNOPSIS
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
.EXAMPLE
InstallDotNetRuntime6
InstallDotNetRuntime7
.LINK
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
.NOTES
Machine-wide
#>
function InstallDotNetRuntime6
function InstallDotNetRuntime7
{
try
{
@ -9144,15 +9144,15 @@ function InstallDotNetRuntime6
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller).Version -ge [System.Version]"1.17")
{
# .NET Desktop Runtime x86
winget install --id=Microsoft.DotNet.DesktopRuntime.6 --architecture x86 --exact --accept-source-agreements
winget install --id=Microsoft.DotNet.DesktopRuntime.7 --architecture x86 --exact --accept-source-agreements
# .NET Desktop Runtime x64
winget install --id=Microsoft.DotNet.DesktopRuntime.6 --architecture x64 --exact --accept-source-agreements
winget install --id=Microsoft.DotNet.DesktopRuntime.7 --architecture x64 --exact --accept-source-agreements
}
else
{
# https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
$Parameters = @{
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json"
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json"
UseBasicParsing = $true
}
$LatestRelease = (Invoke-RestMethod @Parameters)."latest-release"
@ -13579,6 +13579,7 @@ function UpdateLGPEPolicies
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Local Machine policies paths to scan recursively
@ -13598,12 +13599,12 @@ function UpdateLGPEPolicies
{
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$config.SelectNodes("//@*") | ForEach-Object -Process {$_.value = $_.value.ToLower()}
$SplitPath = $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{
@ -13636,9 +13637,8 @@ function UpdateLGPEPolicies
}
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message HKCU -Verbose
# Current User policies paths to scan recursively
$CU_Paths = @(
@ -13657,12 +13657,12 @@ function UpdateLGPEPolicies
{
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$config.SelectNodes("//@*") | ForEach-Object -Process {$_.value = $_.value.ToLower()}
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{

6
src/Sophia_Script_for_Windows_10/Sophia.ps1

@ -958,12 +958,12 @@ UninstallPCHealthCheck
InstallVCRedist
<#
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
Установить последнюю версию .NET Desktop Runtime 6 (x86/x64)
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
#>
InstallDotNetRuntime6
InstallDotNetRuntime7
# Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России

30
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -2979,8 +2979,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\move.cur" -Force
@ -3096,8 +3096,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\move.cur" -Force
@ -7498,18 +7498,18 @@ function InstallVCRedist
<#
.SYNOPSIS
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
.EXAMPLE
InstallDotNetRuntime6
InstallDotNetRuntime7
.LINK
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
.NOTES
Machine-wide
#>
function InstallDotNetRuntime6
function InstallDotNetRuntime7
{
try
{
@ -7527,7 +7527,7 @@ function InstallDotNetRuntime6
# https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
$Parameters = @{
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json"
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json"
UseBasicParsing = $true
}
$LatestRelease = (Invoke-RestMethod @Parameters)."latest-release"
@ -10005,6 +10005,7 @@ function UpdateLGPEPolicies
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Local Machine policies paths to scan recursively
@ -10024,12 +10025,12 @@ function UpdateLGPEPolicies
{
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$config.SelectNodes("//@*") | ForEach-Object -Process {$_.value = $_.value.ToLower()}
$SplitPath = $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{
@ -10062,9 +10063,8 @@ function UpdateLGPEPolicies
}
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message HKCU -Verbose
# Current User policies paths to scan recursively
$CU_Paths = @(
@ -10083,12 +10083,12 @@ function UpdateLGPEPolicies
{
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$config.SelectNodes("//@*") | ForEach-Object -Process {$_.value = $_.value.ToLower()}
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{

6
src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1

@ -759,12 +759,12 @@ ActiveHours -Automatically
InstallVCRedist
<#
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
Установить последнюю версию .NET Desktop Runtime 6 (x86/x64)
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
#>
InstallDotNetRuntime6
InstallDotNetRuntime7
# Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России

30
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -3350,8 +3350,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\move.cur" -Force
@ -3467,8 +3467,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\move.cur" -Force
@ -8119,18 +8119,18 @@ function InstallVCRedist
<#
.SYNOPSIS
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
.EXAMPLE
InstallDotNetRuntime6
InstallDotNetRuntime7
.LINK
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
.NOTES
Machine-wide
#>
function InstallDotNetRuntime6
function InstallDotNetRuntime7
{
try
{
@ -8148,7 +8148,7 @@ function InstallDotNetRuntime6
# https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
$Parameters = @{
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json"
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json"
UseBasicParsing = $true
}
$LatestRelease = (Invoke-RestMethod @Parameters)."latest-release"
@ -11226,6 +11226,7 @@ function UpdateLGPEPolicies
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Local Machine policies paths to scan recursively
@ -11245,12 +11246,12 @@ function UpdateLGPEPolicies
{
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$config.SelectNodes("//@*") | ForEach-Object -Process {$_.value = $_.value.ToLower()}
$SplitPath = $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{
@ -11283,9 +11284,8 @@ function UpdateLGPEPolicies
}
}
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message HKCU -Verbose
# Current User policies paths to scan recursively
$CU_Paths = @(
@ -11304,12 +11304,12 @@ function UpdateLGPEPolicies
{
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$config.SelectNodes("//@*") | ForEach-Object -Process {$_.value = $_.value.ToLower()}
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{

6
src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1

@ -857,12 +857,12 @@ RestartDeviceAfterUpdate -Enable
InstallVCRedist
<#
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
Установить последнюю версию .NET Desktop Runtime 6 (x86/x64)
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
#>
InstallDotNetRuntime6
InstallDotNetRuntime7
# Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России

34
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -4009,8 +4009,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\move.cur" -Force
@ -4126,8 +4126,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\move.cur" -Force
@ -9122,18 +9122,18 @@ function InstallVCRedist
<#
.SYNOPSIS
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
.EXAMPLE
InstallDotNetRuntime6
InstallDotNetRuntime7
.LINK
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
.NOTES
Machine-wide
#>
function InstallDotNetRuntime6
function InstallDotNetRuntime7
{
try
{
@ -9152,15 +9152,15 @@ function InstallDotNetRuntime6
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller).Version -ge [System.Version]"1.17")
{
# .NET Desktop Runtime x86
winget install --id=Microsoft.DotNet.DesktopRuntime.6 --architecture x86 --exact --accept-source-agreements
winget install --id=Microsoft.DotNet.DesktopRuntime.7 --architecture x86 --exact --accept-source-agreements
# .NET Desktop Runtime x64
winget install --id=Microsoft.DotNet.DesktopRuntime.6 --architecture x64 --exact --accept-source-agreements
winget install --id=Microsoft.DotNet.DesktopRuntime.7 --architecture x64 --exact --accept-source-agreements
}
else
{
# https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
$Parameters = @{
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json"
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json"
UseBasicParsing = $true
}
$LatestRelease = (Invoke-RestMethod @Parameters)."latest-release"
@ -13609,6 +13609,7 @@ function UpdateLGPEPolicies
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Local Machine policies paths to scan recursively
@ -13628,12 +13629,12 @@ function UpdateLGPEPolicies
{
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$config.SelectNodes("//@*") | ForEach-Object -Process {$_.value = $_.value.ToLower()}
$SplitPath = $Path.Name.Replace("HKEY_LOCAL_MACHINE\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message $Item.Replace("{}", "") -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{
@ -13666,6 +13667,9 @@ function UpdateLGPEPolicies
}
}
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message HKCU -Verbose
# Current User policies paths to scan recursively
$CU_Paths = @(
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies",
@ -13683,12 +13687,12 @@ function UpdateLGPEPolicies
{
# Parse every ADMX template searching if it contains full path and registry key simultaneously
[xml]$config = Get-Content -Path $admx.FullName -Encoding UTF8
$config.SelectNodes("//@*") | ForEach-Object {$_.value = $_.value.ToLower()}
$config.SelectNodes("//@*") | ForEach-Object -Process {$_.value = $_.value.ToLower()}
$SplitPath = $Path.Name.Replace("HKEY_CURRENT_USER\", "")
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message $Item.Replace("{}", "") -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{

6
src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1

@ -967,12 +967,12 @@ UninstallPCHealthCheck
InstallVCRedist
<#
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
Установить последнюю версию .NET Desktop Runtime 6 (x86/x64)
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
#>
InstallDotNetRuntime6
InstallDotNetRuntime7
# Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России

30
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -3481,8 +3481,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\move.cur" -Force
@ -3598,8 +3598,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\move.cur" -Force
@ -8621,18 +8621,18 @@ function InstallVCRedist
<#
.SYNOPSIS
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
.EXAMPLE
InstallDotNetRuntime6
InstallDotNetRuntime7
.LINK
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
.NOTES
Machine-wide
#>
function InstallDotNetRuntime6
function InstallDotNetRuntime7
{
try
{
@ -8651,15 +8651,15 @@ function InstallDotNetRuntime6
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller).Version -ge [System.Version]"1.17")
{
# .NET Desktop Runtime x86
winget install --id=Microsoft.DotNet.DesktopRuntime.6 --architecture x86 --exact --accept-source-agreements
winget install --id=Microsoft.DotNet.DesktopRuntime.7 --architecture x86 --exact --accept-source-agreements
# .NET Desktop Runtime x64
winget install --id=Microsoft.DotNet.DesktopRuntime.6 --architecture x64 --exact --accept-source-agreements
winget install --id=Microsoft.DotNet.DesktopRuntime.7 --architecture x64 --exact --accept-source-agreements
}
else
{
# https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
$Parameters = @{
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json"
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json"
UseBasicParsing = $true
}
$LatestRelease = (Invoke-RestMethod @Parameters)."latest-release"
@ -12931,6 +12931,7 @@ function UpdateLGPEPolicies
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Local Machine policies paths to scan recursively
@ -12955,7 +12956,7 @@ function UpdateLGPEPolicies
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string](($SplitPath, "|", $Item.Replace("{}", "")))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{
@ -12988,6 +12989,9 @@ function UpdateLGPEPolicies
}
}
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message HKCU -Verbose
# Current User policies paths to scan recursively
$CU_Paths = @(
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies",
@ -13010,7 +13014,7 @@ function UpdateLGPEPolicies
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string](($SplitPath, "|", $Item.Replace("{}", "")))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{

6
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -894,12 +894,12 @@ DefaultTerminalApp -WindowsTerminal
InstallVCRedist
<#
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
Установить последнюю версию .NET Desktop Runtime 6 (x86/x64)
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
#>
InstallDotNetRuntime6
InstallDotNetRuntime7
# Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России

30
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -3483,8 +3483,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_dark_v2.2\move.cur" -Force
@ -3600,8 +3600,8 @@ function Cursors
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name IBeam -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\beam.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name No -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\unavailable.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name NWPen -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\handwriting.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Person -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\person.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name Pin -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\pin.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name precisionhair -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\precision.cur" -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name "Scheme Source" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path "HKCU:\Control Panel\Cursors" -Name SizeAll -PropertyType ExpandString -Value "%SystemRoot%\Cursors\W11_light_v2.2\move.cur" -Force
@ -8629,18 +8629,18 @@ function InstallVCRedist
<#
.SYNOPSIS
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
.EXAMPLE
InstallDotNetRuntime6
InstallDotNetRuntime7
.LINK
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
.NOTES
Machine-wide
#>
function InstallDotNetRuntime6
function InstallDotNetRuntime7
{
try
{
@ -8659,15 +8659,15 @@ function InstallDotNetRuntime6
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller).Version -ge [System.Version]"1.17")
{
# .NET Desktop Runtime x86
winget install --id=Microsoft.DotNet.DesktopRuntime.6 --architecture x86 --exact --accept-source-agreements
winget install --id=Microsoft.DotNet.DesktopRuntime.7 --architecture x86 --exact --accept-source-agreements
# .NET Desktop Runtime x64
winget install --id=Microsoft.DotNet.DesktopRuntime.6 --architecture x64 --exact --accept-source-agreements
winget install --id=Microsoft.DotNet.DesktopRuntime.7 --architecture x64 --exact --accept-source-agreements
}
else
{
# https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
$Parameters = @{
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json"
Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json"
UseBasicParsing = $true
}
$LatestRelease = (Invoke-RestMethod @Parameters)."latest-release"
@ -12958,6 +12958,7 @@ function UpdateLGPEPolicies
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Local Machine policies paths to scan recursively
@ -12982,7 +12983,7 @@ function UpdateLGPEPolicies
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string](($SplitPath, "|", $Item.Replace("{}", "")))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{
@ -13015,6 +13016,9 @@ function UpdateLGPEPolicies
}
}
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message HKCU -Verbose
# Current User policies paths to scan recursively
$CU_Paths = @(
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies",
@ -13037,7 +13041,7 @@ function UpdateLGPEPolicies
if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]"))
{
Write-Verbose -Message ([string](($SplitPath, "|", $Item.Replace("{}", "")))) -Verbose
Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""), "|", $(Get-ItemPropertyValue -Path $Path.PSPath -Name $Item))) -Verbose
$Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item))
{

6
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -903,12 +903,12 @@ DefaultTerminalApp -WindowsTerminal
InstallVCRedist
<#
Install the latest .NET Desktop Runtime 6 (x86/x64)
Install the latest .NET Desktop Runtime 7 (x86/x64)
Установить последнюю версию .NET Desktop Runtime 6 (x86/x64)
https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60
https://dotnet.microsoft.com/en-us/download/dotnet
#>
InstallDotNetRuntime6
InstallDotNetRuntime7
# Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only
# Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России

Loading…
Cancel
Save