Browse Source

Fixed Microsoft Defender false positive

Also renamed `HideRecommendedSection` to `StartRecommendedSection`
master
Dmitry Nefedov 1 month ago
parent
commit
38571835fc
  1. 24
      Download_Latest_Sophia.ps1
  2. 4
      Scripts/Windows_10.ps1
  3. 4
      Scripts/Windows_10_LTSC_2019.ps1
  4. 4
      Scripts/Windows_10_LTSC_2021.ps1
  5. 4
      Scripts/Windows_10_PS_7.ps1
  6. 4
      Scripts/Windows_11.ps1
  7. 4
      Scripts/Windows_11_LTSC_2024.ps1
  8. 4
      Scripts/Windows_11_PS_7.ps1
  9. 6
      Wrapper/Config/config_Windows_11.json
  10. 6
      Wrapper/Config/config_Windows_11_LTSC.json
  11. 2
      Wrapper/Localizations/de-DE/tooltip_Windows_10.json
  12. 8
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  13. 8
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  14. 8
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  15. 8
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  16. 8
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  17. 8
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  18. 20
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  19. 30
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  20. 8
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  21. 30
      src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1
  22. 8
      src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1
  23. 42
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  24. 8
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

24
Download_Latest_Sophia.ps1

@ -156,7 +156,7 @@ if (Test-Path -Path "$DownloadsFolder\$($Version)_Latest")
exit exit
} }
New-Item -Path "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin" -ItemType Directory -Force New-Item -Path "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries" -ItemType Directory -Force
& "$env:SystemRoot\System32\tar.exe" -C "$DownloadsFolder\SophiaScriptTemp" -xf "$DownloadsFolder\master.zip" "Sophia-Script-for-Windows-master/src/$Version" & "$env:SystemRoot\System32\tar.exe" -C "$DownloadsFolder\SophiaScriptTemp" -xf "$DownloadsFolder\master.zip" "Sophia-Script-for-Windows-master/src/$Version"
@ -164,23 +164,23 @@ New-Item -Path "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-mast
# https://techcommunity.microsoft.com/t5/microsoft-security-baselines/lgpo-exe-local-group-policy-object-utility-v1-0/ba-p/701045 # https://techcommunity.microsoft.com/t5/microsoft-security-baselines/lgpo-exe-local-group-policy-object-utility-v1-0/ba-p/701045
$Parameters = @{ $Parameters = @{
Uri = "https://download.microsoft.com/download/8/5/C/85C25433-A1B0-4FFA-9429-7E023E7DA8D8/LGPO.zip" Uri = "https://download.microsoft.com/download/8/5/C/85C25433-A1B0-4FFA-9429-7E023E7DA8D8/LGPO.zip"
OutFile = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\LGPO.zip" OutFile = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries\LGPO.zip"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true
} }
Invoke-WebRequest @Parameters Invoke-WebRequest @Parameters
$Parameters = @{ $Parameters = @{
Path = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\LGPO.zip" Path = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries\LGPO.zip"
DestinationPath = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin" DestinationPath = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries"
Force = $true Force = $true
Verbose = $true Verbose = $true
} }
Expand-Archive @Parameters Expand-Archive @Parameters
$Parameters = @{ $Parameters = @{
Path = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\LGPO_30\LGPO.exe" Path = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries\LGPO_30\LGPO.exe"
Destination = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\LGPO.exe" Destination = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries\LGPO.exe"
Force = $true Force = $true
} }
Move-Item @Parameters Move-Item @Parameters
@ -191,19 +191,19 @@ if ($Version -match "PowerShell_7")
# https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref # https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref
$Parameters = @{ $Parameters = @{
Uri = "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.NET.Ref" Uri = "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.NET.Ref"
OutFile = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\microsoft.windows.sdk.net.ref.zip" OutFile = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries\microsoft.windows.sdk.net.ref.zip"
UseBasicParsing = $true UseBasicParsing = $true
} }
Invoke-RestMethod @Parameters Invoke-RestMethod @Parameters
# Extract Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll from archive # Extract Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll from archive
Add-Type -Assembly System.IO.Compression.FileSystem Add-Type -Assembly System.IO.Compression.FileSystem
$ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\microsoft.windows.sdk.net.ref.zip") $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries\microsoft.windows.sdk.net.ref.zip")
$Entries = $ZIP.Entries | Where-Object -FilterScript {($_.FullName -eq "lib/net8.0/Microsoft.Windows.SDK.NET.dll") -or ($_.FullName -eq "lib/net8.0/WinRT.Runtime.dll")} $Entries = $ZIP.Entries | Where-Object -FilterScript {($_.FullName -eq "lib/net8.0/Microsoft.Windows.SDK.NET.dll") -or ($_.FullName -eq "lib/net8.0/WinRT.Runtime.dll")}
$Entries | ForEach-Object -Process {[IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\$($_.Name)", $true)} $Entries | ForEach-Object -Process {[IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries\$($_.Name)", $true)}
$ZIP.Dispose() $ZIP.Dispose()
Remove-Item -Path "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\microsoft.windows.sdk.net.ref.zip" -Force Remove-Item -Path "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\Binaries\microsoft.windows.sdk.net.ref.zip" -Force
} }
$Parameters = @{ $Parameters = @{
@ -222,8 +222,8 @@ Move-Item @Parameters
$Path = @( $Path = @(
"$DownloadsFolder\SophiaScriptTemp", "$DownloadsFolder\SophiaScriptTemp",
"$DownloadsFolder\$($Version)_Latest\bin\LGPO_30", "$DownloadsFolder\$($Version)_Latest\Binaries\LGPO_30",
"$DownloadsFolder\$($Version)_Latest\bin\LGPO.zip", "$DownloadsFolder\$($Version)_Latest\Binaries\LGPO.zip",
"$DownloadsFolder\master.zip" "$DownloadsFolder\master.zip"
) )
Remove-Item -Path $Path -Recurse -Force Remove-Item -Path $Path -Recurse -Force

4
Scripts/Windows_10.ps1

@ -6,11 +6,11 @@ $LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_PowerS
Write-Verbose -Message "Sophia.Script.for.Windows.10.v$LatestRelease.zip" -Verbose Write-Verbose -Message "Sophia.Script.for.Windows.10.v$LatestRelease.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_10_v$LatestRelease\bin" -ItemType Directory -Force New-Item -Path "Sophia_Script_for_Windows_10_v$LatestRelease\Binaries" -ItemType Directory -Force
$Parameters = @{ $Parameters = @{
Path = @("Scripts\LGPO.exe") Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_10_v$LatestRelease\bin" Destination = "Sophia_Script_for_Windows_10_v$LatestRelease\Binaries"
Recurse = $true Recurse = $true
Force = $true Force = $true
} }

4
Scripts/Windows_10_LTSC_2019.ps1

@ -6,11 +6,11 @@ $LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_LTSC20
Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip" -Verbose Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease\bin" -ItemType Directory -Force New-Item -Path "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease\Binaries" -ItemType Directory -Force
$Parameters = @{ $Parameters = @{
Path = @("Scripts\LGPO.exe") Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease\bin" Destination = "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease\Binaries"
Recurse = $true Recurse = $true
Force = $true Force = $true
} }

4
Scripts/Windows_10_LTSC_2021.ps1

@ -6,11 +6,11 @@ $LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_LTSC20
Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2021.v$LatestRelease.zip" -Verbose Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2021.v$LatestRelease.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_10_LTSC_2021_v$LatestRelease\bin" -ItemType Directory -Force New-Item -Path "Sophia_Script_for_Windows_10_LTSC_2021_v$LatestRelease\Binaries" -ItemType Directory -Force
$Parameters = @{ $Parameters = @{
Path = @("Scripts\LGPO.exe") Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_10_LTSC_2021_v$LatestRelease\bin" Destination = "Sophia_Script_for_Windows_10_LTSC_2021_v$LatestRelease\Binaries"
Recurse = $true Recurse = $true
Force = $true Force = $true
} }

4
Scripts/Windows_10_PS_7.ps1

@ -6,11 +6,11 @@ $LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_PowerS
Write-Verbose -Message "Sophia.Script.for.Windows.10.PowerShell.7.v$LatestRelease.zip" -Verbose Write-Verbose -Message "Sophia.Script.for.Windows.10.PowerShell.7.v$LatestRelease.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_10_PowerShell_7_v$LatestRelease\bin" -ItemType Directory -Force New-Item -Path "Sophia_Script_for_Windows_10_PowerShell_7_v$LatestRelease\Binaries" -ItemType Directory -Force
$Parameters = @{ $Parameters = @{
Path = @("Scripts\LGPO.exe", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll") Path = @("Scripts\LGPO.exe", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll")
Destination = "Sophia_Script_for_Windows_10_PowerShell_7_v$LatestRelease\bin" Destination = "Sophia_Script_for_Windows_10_PowerShell_7_v$LatestRelease\Binaries"
Recurse = $true Recurse = $true
Force = $true Force = $true
} }

4
Scripts/Windows_11.ps1

@ -6,11 +6,11 @@ $LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerS
Write-Verbose -Message "Sophia.Script.for.Windows.11.v$LatestRelease.zip" -Verbose Write-Verbose -Message "Sophia.Script.for.Windows.11.v$LatestRelease.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_11_v$LatestRelease\bin" -ItemType Directory -Force New-Item -Path "Sophia_Script_for_Windows_11_v$LatestRelease\Binaries" -ItemType Directory -Force
$Parameters = @{ $Parameters = @{
Path = @("Scripts\LGPO.exe") Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_11_v$LatestRelease\bin" Destination = "Sophia_Script_for_Windows_11_v$LatestRelease\Binaries"
Recurse = $true Recurse = $true
Force = $true Force = $true
} }

4
Scripts/Windows_11_LTSC_2024.ps1

@ -6,11 +6,11 @@ $LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_LTSC20
Write-Verbose -Message "Sophia.Script.for.Windows.11.LTSC.2024.v$LatestRelease.zip" -Verbose Write-Verbose -Message "Sophia.Script.for.Windows.11.LTSC.2024.v$LatestRelease.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_11_LTSC_2024_v$LatestRelease\bin" -ItemType Directory -Force New-Item -Path "Sophia_Script_for_Windows_11_LTSC_2024_v$LatestRelease\Binaries" -ItemType Directory -Force
$Parameters = @{ $Parameters = @{
Path = @("Scripts\LGPO.exe") Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_11_LTSC_2024_v$LatestRelease\bin" Destination = "Sophia_Script_for_Windows_11_LTSC_2024_v$LatestRelease\Binaries"
Recurse = $true Recurse = $true
Force = $true Force = $true
} }

4
Scripts/Windows_11_PS_7.ps1

@ -6,11 +6,11 @@ $LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerS
Write-Verbose -Message "Sophia.Script.for.Windows.11.PowerShell.7.v$LatestRelease.zip" -Verbose Write-Verbose -Message "Sophia.Script.for.Windows.11.PowerShell.7.v$LatestRelease.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_11_PowerShell_7_v$LatestRelease\bin" -ItemType Directory -Force New-Item -Path "Sophia_Script_for_Windows_11_PowerShell_7_v$LatestRelease\Binaries" -ItemType Directory -Force
$Parameters = @{ $Parameters = @{
Path = @("Scripts\LGPO.exe", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll") Path = @("Scripts\LGPO.exe", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll")
Destination = "Sophia_Script_for_Windows_11_PowerShell_7_v$LatestRelease\bin" Destination = "Sophia_Script_for_Windows_11_PowerShell_7_v$LatestRelease\Binaries"
Recurse = $true Recurse = $true
Force = $true Force = $true
} }

6
Wrapper/Config/config_Windows_11.json

@ -876,13 +876,13 @@
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
"Function": "HideRecommendedSection", "Function": "StartRecommendedSection",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Disable" "Tag": "Hide"
}, },
"One": { "One": {
"Tag": "Enable" "Tag": "Show"
} }
}, },
"Preset": "Zero", "Preset": "Zero",

6
Wrapper/Config/config_Windows_11_LTSC.json

@ -896,13 +896,13 @@
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Control": "cmb", "Control": "cmb",
"Required": "false", "Required": "false",
"Function": "HideRecommendedSection", "Function": "StartRecommendedSection",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Disable" "Tag": "Hide"
}, },
"One": { "One": {
"Tag": "Enable" "Tag": "Show"
} }
}, },
"Preset": "Zero", "Preset": "Zero",

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

@ -830,7 +830,7 @@
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Disable", "Tag": "Disable",
"ToolTip": "Den Navigatiosbereich des Explorers(Linker Abschnitt) nicht auf den aktuellen Ordner erweitern (aufklappen) (Standardwert)." "ToolTip": "Den Navigatiosbereich des Explorers (Linker Abschnitt) nicht auf den aktuellen Ordner erweitern (Standardwert)."
}, },
"One": { "One": {
"Tag": "Enable", "Tag": "Enable",

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

@ -770,15 +770,15 @@
}, },
{ {
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "HideRecommendedSection", "Function": "StartRecommendedSection",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Disable", "Tag": "Hide",
"ToolTip": "Entfernen Sie den Abschnitt Empfohlen im Startmenü. Gilt nur für die Editionen Enterprise und Education, aber nicht für IoT Enterprise." "ToolTip": "Entfernen Sie den Abschnitt Empfohlen im Startmenü. Gilt nur für die Editionen Enterprise und Education, aber nicht für IoT Enterprise."
}, },
"One": { "One": {
"Tag": "Enable", "Tag": "Show",
"ToolTip": "Den Abschnitt Empfohlen im Startmenü nicht entfernen (Standardwert). Gilt nur für die Editionen Enterprise und Education, aber nicht für IoT Enterprise." "ToolTip": "Abschnitt Empfohlen im Startmenü anzeigen (Standardwert). Gilt nur für die Editionen Enterprise und Education, aber nicht für IoT Enterprise."
} }
} }
}, },

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

@ -770,15 +770,15 @@
}, },
{ {
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "HideRecommendedSection", "Function": "StartRecommendedSection",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Disable", "Tag": "Hide",
"ToolTip": "Remove Recommended section in Start Menu. Applicable only to Enterprise and Education editions, but not to IoT Enterprise." "ToolTip": "Remove Recommended section in Start Menu. Applicable only to Enterprise and Education editions, but not to IoT Enterprise."
}, },
"One": { "One": {
"Tag": "Enable", "Tag": "Show",
"ToolTip": "Do not remove Recommended section in Start Menu (default value). Applicable only to Enterprise and Education editions, but not to IoT Enterprise." "ToolTip": "Show Recommended section in Start Menu (default value). Applicable only to Enterprise and Education editions, but not to IoT Enterprise."
} }
} }
}, },

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

@ -770,15 +770,15 @@
}, },
{ {
"Region": "UI & Personalization", "Region": "UI & Personalization",
"Function": "HideRecommendedSection", "Function": "StartRecommendedSection",
"Arg": { "Arg": {
"Zero": { "Zero": {
"Tag": "Disable", "Tag": "Hide",
"ToolTip": "Удалить раздел \"Рекомендуем\" в меню \"Пуск\". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise." "ToolTip": "Удалить раздел \"Рекомендуем\" в меню \"Пуск\". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise."
}, },
"One": { "One": {
"Tag": "Enable", "Tag": "Show",
"ToolTip": "Не удалять раздел \"Рекомендуем\" в меню \"Пуск\". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise." "ToolTip": "Показывать раздел \"Рекомендуем\" в меню \"Пуск\". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise."
} }
} }
}, },

8
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -719,10 +719,10 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether LGPO.exe exists in the bin folder # Checking whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe")) if (-not (Test-Path -Path "$PSScriptRoot\..\Binaries\LGPO.exe"))
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\bin")) Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\Binaries"))
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose
@ -15214,11 +15214,11 @@ public static void PostMessage()
{ {
if (Test-Path -Path "$env:TEMP\Computer.txt") if (Test-Path -Path "$env:TEMP\Computer.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\Computer.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\Computer.txt"
} }
if (Test-Path -Path "$env:TEMP\User.txt") if (Test-Path -Path "$env:TEMP\User.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\User.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\User.txt"
} }
gpupdate /force gpupdate /force

8
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -679,10 +679,10 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether LGPO.exe exists in the bin folder # Checking whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe")) if (-not (Test-Path -Path "$PSScriptRoot\..\Binaries\LGPO.exe"))
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\bin")) Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\Binaries"))
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose
@ -11671,11 +11671,11 @@ public static void PostMessage()
{ {
if (Test-Path -Path "$env:TEMP\Computer.txt") if (Test-Path -Path "$env:TEMP\Computer.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\Computer.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\Computer.txt"
} }
if (Test-Path -Path "$env:TEMP\User.txt") if (Test-Path -Path "$env:TEMP\User.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\User.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\User.txt"
} }
gpupdate /force gpupdate /force

8
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -679,10 +679,10 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether LGPO.exe exists in the bin folder # Checking whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe")) if (-not (Test-Path -Path "$PSScriptRoot\..\Binaries\LGPO.exe"))
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\bin")) Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\Binaries"))
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose
@ -13036,11 +13036,11 @@ public static void PostMessage()
{ {
if (Test-Path -Path "$env:TEMP\Computer.txt") if (Test-Path -Path "$env:TEMP\Computer.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\Computer.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\Computer.txt"
} }
if (Test-Path -Path "$env:TEMP\User.txt") if (Test-Path -Path "$env:TEMP\User.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\User.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\User.txt"
} }
gpupdate /force gpupdate /force

20
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -733,14 +733,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
# Checking whether all necessary files exist in the script folder # Checking whether all necessary files exist in the script folder
$Files = @( $Files = @(
"$PSScriptRoot\..\bin\LGPO.exe", "$PSScriptRoot\..\Binaries\LGPO.exe",
"$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll", "$PSScriptRoot\..\Binaries\Microsoft.Windows.SDK.NET.dll",
"$PSScriptRoot\..\bin\WinRT.Runtime.dll" "$PSScriptRoot\..\Binaries\WinRT.Runtime.dll"
) )
if (($Files | Test-Path) -contains $false) if (($Files | Test-Path) -contains $false)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\bin")) Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\Binaries"))
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose
@ -11155,8 +11155,8 @@ function UninstallUWPApps
$ForAllUsers $ForAllUsers
) )
Add-Type -AssemblyName "$PSScriptRoot\..\bin\WinRT.Runtime.dll" Add-Type -AssemblyName "$PSScriptRoot\..\Binaries\WinRT.Runtime.dll"
Add-Type -AssemblyName "$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll" Add-Type -AssemblyName "$PSScriptRoot\..\Binaries\Microsoft.Windows.SDK.NET.dll"
Add-Type -AssemblyName PresentationCore, PresentationFramework Add-Type -AssemblyName PresentationCore, PresentationFramework
@ -15244,11 +15244,11 @@ public static void PostMessage()
{ {
if (Test-Path -Path "$env:TEMP\Computer.txt") if (Test-Path -Path "$env:TEMP\Computer.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\Computer.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\Computer.txt"
} }
if (Test-Path -Path "$env:TEMP\User.txt") if (Test-Path -Path "$env:TEMP\User.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\User.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\User.txt"
} }
gpupdate /force gpupdate /force
@ -15332,8 +15332,8 @@ public static void PostMessage()
# Determines whether the app can be seen in Settings where the user can turn notifications on or off # Determines whether the app can be seen in Settings where the user can turn notifications on or off
New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AppUserModelId\Sophia -Name ShowInSettings -Value 0 -PropertyType DWord -Force New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AppUserModelId\Sophia -Name ShowInSettings -Value 0 -PropertyType DWord -Force
Add-Type -AssemblyName "$PSScriptRoot\..\bin\WinRT.Runtime.dll" Add-Type -AssemblyName "$PSScriptRoot\..\Binaries\WinRT.Runtime.dll"
Add-Type -AssemblyName "$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll" Add-Type -AssemblyName "$PSScriptRoot\..\Binaries\Microsoft.Windows.SDK.NET.dll"
# Telegram group # Telegram group
# Extract the localized "Open" string from shell32.dll # Extract the localized "Open" string from shell32.dll

30
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -694,10 +694,10 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether LGPO.exe exists in the bin folder # Checking whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe")) if (-not (Test-Path -Path "$PSScriptRoot\..\Binaries\LGPO.exe"))
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\bin")) Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\Binaries"))
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose
@ -4611,38 +4611,38 @@ function NavigationPaneExpand
.SYNOPSIS .SYNOPSIS
Recommended section in Start Menu Recommended section in Start Menu
.PARAMETER Enable .PARAMETER Hide
Remove Recommended section in Start Menu Remove Recommended section in Start Menu
.PARAMETER Disable .PARAMETER Show
Do not remove Recommended section in Start Menu (default value) Do not remove Recommended section in Start Menu (default value)
.EXAMPLE .EXAMPLE
HideRecommendedSection -Enable StartRecommendedSection -Hide
.EXAMPLE .EXAMPLE
HideRecommendedSection -Disable StartRecommendedSection -Show
.NOTES .NOTES
Current user Current user
#> #>
function HideRecommendedSection function StartRecommendedSection
{ {
param param
( (
[Parameter( [Parameter(
Mandatory = $true, Mandatory = $true,
ParameterSetName = "Enable" ParameterSetName = "Hide"
)] )]
[switch] [switch]
$Enable, $Hide,
[Parameter( [Parameter(
Mandatory = $true, Mandatory = $true,
ParameterSetName = "Disable" ParameterSetName = "Show"
)] )]
[switch] [switch]
$Disable $Show
) )
# Windows 11 IoT Enterprise not supported # Windows 11 IoT Enterprise not supported
@ -4662,7 +4662,7 @@ function HideRecommendedSection
switch ($PSCmdlet.ParameterSetName) switch ($PSCmdlet.ParameterSetName)
{ {
"Enable" "Hide"
{ {
if (-not (Test-Path -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer)) if (-not (Test-Path -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer))
{ {
@ -4672,7 +4672,7 @@ function HideRecommendedSection
Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type DWORD -Value 1 Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type DWORD -Value 1
} }
"Disable" "Show"
{ {
Remove-ItemProperty -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore Remove-ItemProperty -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore
Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type CLEAR Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type CLEAR
@ -14125,11 +14125,11 @@ public static void PostMessage()
{ {
if (Test-Path -Path "$env:TEMP\Computer.txt") if (Test-Path -Path "$env:TEMP\Computer.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\Computer.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\Computer.txt"
} }
if (Test-Path -Path "$env:TEMP\User.txt") if (Test-Path -Path "$env:TEMP\User.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\User.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\User.txt"
} }
gpupdate /force gpupdate /force

8
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -604,11 +604,11 @@ NavigationPaneExpand -Disable
# Remove Recommended section in Start Menu. Applicable only to Enterprise and Education editions, but not to IoT Enterprise # Remove Recommended section in Start Menu. Applicable only to Enterprise and Education editions, but not to IoT Enterprise
# Удалить раздел "Рекомендуем" в меню "Пуск". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise # Удалить раздел "Рекомендуем" в меню "Пуск". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise
HideRecommendedSection -Enable StartRecommendedSection -Hide
# Do not remove Recommended section in Start Menu (default value). Applicable only to Enterprise and Education editions, but not to IoT Enterprise # Show Recommended section in Start Menu (default value). Applicable only to Enterprise and Education editions, but not to IoT Enterprise
# Не удалять раздел "Рекомендуем" в меню "Пуск" (значение по умолчанию). Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise # Показывать раздел "Рекомендуем" в меню "Пуск" (значение по умолчанию). Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise
# HideRecommendedSection -Disable # StartRecommendedSection -Show
#endregion UI & Personalization #endregion UI & Personalization
#region OneDrive #region OneDrive

30
src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1

@ -680,10 +680,10 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether LGPO.exe exists in the bin folder # Checking whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe")) if (-not (Test-Path -Path "$PSScriptRoot\..\Binaries\LGPO.exe"))
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\bin")) Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\Binaries"))
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose
@ -4453,38 +4453,38 @@ function NavigationPaneExpand
.SYNOPSIS .SYNOPSIS
Recommended section in Start Menu Recommended section in Start Menu
.PARAMETER Enable .PARAMETER Hide
Remove Recommended section in Start Menu Remove Recommended section in Start Menu
.PARAMETER Disable .PARAMETER Show
Do not remove Recommended section in Start Menu (default value) Do not remove Recommended section in Start Menu (default value)
.EXAMPLE .EXAMPLE
HideRecommendedSection -Enable StartRecommendedSection -Hide
.EXAMPLE .EXAMPLE
HideRecommendedSection -Disable StartRecommendedSection -Show
.NOTES .NOTES
Current user Current user
#> #>
function HideRecommendedSection function StartRecommendedSection
{ {
param param
( (
[Parameter( [Parameter(
Mandatory = $true, Mandatory = $true,
ParameterSetName = "Enable" ParameterSetName = "Hide"
)] )]
[switch] [switch]
$Enable, $Hide,
[Parameter( [Parameter(
Mandatory = $true, Mandatory = $true,
ParameterSetName = "Disable" ParameterSetName = "Show"
)] )]
[switch] [switch]
$Disable $Show
) )
# Windows 11 IoT Enterprise not supported # Windows 11 IoT Enterprise not supported
@ -4504,7 +4504,7 @@ function HideRecommendedSection
switch ($PSCmdlet.ParameterSetName) switch ($PSCmdlet.ParameterSetName)
{ {
"Enable" "Hide"
{ {
if (-not (Test-Path -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer)) if (-not (Test-Path -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer))
{ {
@ -4514,7 +4514,7 @@ function HideRecommendedSection
Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type DWORD -Value 1 Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type DWORD -Value 1
} }
"Disable" "Show"
{ {
Remove-ItemProperty -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore Remove-ItemProperty -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore
Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type CLEAR Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type CLEAR
@ -13039,11 +13039,11 @@ public static void PostMessage()
{ {
if (Test-Path -Path "$env:TEMP\Computer.txt") if (Test-Path -Path "$env:TEMP\Computer.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\Computer.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\Computer.txt"
} }
if (Test-Path -Path "$env:TEMP\User.txt") if (Test-Path -Path "$env:TEMP\User.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\User.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\User.txt"
} }
gpupdate /force gpupdate /force

8
src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1

@ -590,11 +590,11 @@ NavigationPaneExpand -Disable
# Remove Recommended section in Start Menu. Applicable only to Enterprise and Education editions, but not to IoT Enterprise # Remove Recommended section in Start Menu. Applicable only to Enterprise and Education editions, but not to IoT Enterprise
# Удалить раздел "Рекомендуем" в меню "Пуск". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise # Удалить раздел "Рекомендуем" в меню "Пуск". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise
HideRecommendedSection -Enable StartRecommendedSection -Hide
# Do not remove Recommended section in Start Menu (default value). Applicable only to Enterprise and Education editions, but not to IoT Enterprise # Show Recommended section in Start Menu (default value). Applicable only to Enterprise and Education editions, but not to IoT Enterprise
# Не удалять раздел "Рекомендуем" в меню "Пуск" (значение по умолчанию). Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise # Показывать раздел "Рекомендуем" в меню "Пуск" (значение по умолчанию). Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise
# HideRecommendedSection -Disable # StartRecommendedSection -Show
#endregion UI & Personalization #endregion UI & Personalization
#region System #region System

42
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -708,14 +708,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
# Checking whether all necessary files exist in the script folder # Checking whether all necessary files exist in the script folder
$Files = @( $Files = @(
"$PSScriptRoot\..\bin\LGPO.exe", "$PSScriptRoot\..\Binaries\LGPO.exe",
"$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll", "$PSScriptRoot\..\Binaries\Microsoft.Windows.SDK.NET.dll",
"$PSScriptRoot\..\bin\WinRT.Runtime.dll" "$PSScriptRoot\..\Binaries\WinRT.Runtime.dll"
) )
if (($Files | Test-Path) -contains $false) if (($Files | Test-Path) -contains $false)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\bin")) Write-Warning -Message ($Localization.Bin -f [IO.Path]::GetFullPath("$PSScriptRoot\..\Binaries"))
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" -Verbose
@ -4629,38 +4629,38 @@ function NavigationPaneExpand
.SYNOPSIS .SYNOPSIS
Recommended section in Start Menu Recommended section in Start Menu
.PARAMETER Enable .PARAMETER Hide
Remove Recommended section in Start Menu Remove Recommended section in Start Menu
.PARAMETER Disable .PARAMETER Show
Do not remove Recommended section in Start Menu (default value) Do not remove Recommended section in Start Menu (default value)
.EXAMPLE .EXAMPLE
HideRecommendedSection -Enable StartRecommendedSection -Hide
.EXAMPLE .EXAMPLE
HideRecommendedSection -Disable StartRecommendedSection -Show
.NOTES .NOTES
Current user Current user
#> #>
function HideRecommendedSection function StartRecommendedSection
{ {
param param
( (
[Parameter( [Parameter(
Mandatory = $true, Mandatory = $true,
ParameterSetName = "Enable" ParameterSetName = "Hide"
)] )]
[switch] [switch]
$Enable, $Hide,
[Parameter( [Parameter(
Mandatory = $true, Mandatory = $true,
ParameterSetName = "Disable" ParameterSetName = "Show"
)] )]
[switch] [switch]
$Disable $Show
) )
# Windows 11 IoT Enterprise not supported # Windows 11 IoT Enterprise not supported
@ -4680,7 +4680,7 @@ function HideRecommendedSection
switch ($PSCmdlet.ParameterSetName) switch ($PSCmdlet.ParameterSetName)
{ {
"Enable" "Hide"
{ {
if (-not (Test-Path -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer)) if (-not (Test-Path -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer))
{ {
@ -4690,7 +4690,7 @@ function HideRecommendedSection
Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type DWORD -Value 1 Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type DWORD -Value 1
} }
"Disable" "Show"
{ {
Remove-ItemProperty -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore Remove-ItemProperty -Path HKCU:\Software\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore
Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type CLEAR Set-Policy -Scope User -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type CLEAR
@ -10351,8 +10351,8 @@ function UninstallUWPApps
$ForAllUsers $ForAllUsers
) )
Add-Type -AssemblyName "$PSScriptRoot\..\bin\WinRT.Runtime.dll" Add-Type -AssemblyName "$PSScriptRoot\..\Binaries\WinRT.Runtime.dll"
Add-Type -AssemblyName "$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll" Add-Type -AssemblyName "$PSScriptRoot\..\Binaries\Microsoft.Windows.SDK.NET.dll"
Add-Type -AssemblyName PresentationCore, PresentationFramework Add-Type -AssemblyName PresentationCore, PresentationFramework
@ -14152,11 +14152,11 @@ public static void PostMessage()
{ {
if (Test-Path -Path "$env:TEMP\Computer.txt") if (Test-Path -Path "$env:TEMP\Computer.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\Computer.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\Computer.txt"
} }
if (Test-Path -Path "$env:TEMP\User.txt") if (Test-Path -Path "$env:TEMP\User.txt")
{ {
& "$PSScriptRoot\..\bin\LGPO.exe" /t "$env:TEMP\User.txt" & "$PSScriptRoot\..\Binaries\LGPO.exe" /t "$env:TEMP\User.txt"
} }
gpupdate /force gpupdate /force
@ -14230,8 +14230,8 @@ public static void PostMessage()
# Determines whether the app can be seen in Settings where the user can turn notifications on or off # Determines whether the app can be seen in Settings where the user can turn notifications on or off
New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AppUserModelId\Sophia -Name ShowInSettings -Value 0 -PropertyType DWord -Force New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AppUserModelId\Sophia -Name ShowInSettings -Value 0 -PropertyType DWord -Force
Add-Type -AssemblyName "$PSScriptRoot\..\bin\WinRT.Runtime.dll" Add-Type -AssemblyName "$PSScriptRoot\..\Binaries\WinRT.Runtime.dll"
Add-Type -AssemblyName "$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll" Add-Type -AssemblyName "$PSScriptRoot\..\Binaries\Microsoft.Windows.SDK.NET.dll"
# Telegram group # Telegram group
# Extract the localized "Open" string from shell32.dll # Extract the localized "Open" string from shell32.dll

8
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -608,11 +608,11 @@ NavigationPaneExpand -Disable
# Remove Recommended section in Start Menu. Applicable only to Enterprise and Education editions, but not to IoT Enterprise # Remove Recommended section in Start Menu. Applicable only to Enterprise and Education editions, but not to IoT Enterprise
# Удалить раздел "Рекомендуем" в меню "Пуск". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise # Удалить раздел "Рекомендуем" в меню "Пуск". Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise
HideRecommendedSection -Enable StartRecommendedSection -Hide
# Do not remove Recommended section in Start Menu (default value). Applicable only to Enterprise and Education editions, but not to IoT Enterprise # Show Recommended section in Start Menu (default value). Applicable only to Enterprise and Education editions, but not to IoT Enterprise
# Не удалять раздел "Рекомендуем" в меню "Пуск" (значение по умолчанию). Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise # Показывать раздел "Рекомендуем" в меню "Пуск" (значение по умолчанию). Применимо только к редакциям Enterprise и Education, но не к IoT Enterprise
# HideRecommendedSection -Disable # StartRecommendedSection -Show
#endregion UI & Personalization #endregion UI & Personalization
#region OneDrive #region OneDrive

Loading…
Cancel
Save