Browse Source

Added Wrapper LTSC configs

master
Dmitry Nefedov 3 months ago
parent
commit
e8eeb71546
  1. 2035
      Wrapper/Config/config_Windows_11_LTSC.json
  2. 18
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  3. 14
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  4. 14
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  5. 317
      src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1
  6. 40
      src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1

2035
Wrapper/Config/config_Windows_11_LTSC.json

File diff suppressed because it is too large

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

@ -788,11 +788,25 @@
"Arg": {
"Zero": {
"Tag": "Disable",
"ToolTip": "Den Navigatiosbereich des Explorers(Linker Abschnitt) nicht auf den aktuellen Ordner erweitern (aufklappen) (Standardeinstellung)."
"ToolTip": "Den Navigatiosbereich des Explorers(Linker Abschnitt) nicht auf den aktuellen Ordner erweitern (Standardeinstellung)."
},
"One": {
"Tag": "Enable",
"ToolTip": "Der Navigationsbereich des Explorers(Linker Abschnitt) wird auf den aktuellen Ordner erweitert (aufgeklappt)."
"ToolTip": "Der Navigationsbereich des Explorers(Linker Abschnitt) wird auf den aktuellen Ordner erweitert."
}
}
},
{
"Region": "UI & Personalization",
"Function": "HideRecommendedSection",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Entfernen Sie den Abschnitt Empfohlen im Startmenü."
},
"One": {
"Tag": "Disable",
"ToolTip": "Entfernen Sie nicht den Abschnitt Empfohlen im Startmenü (Standardeinstellung)."
}
}
},

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

@ -796,6 +796,20 @@
}
}
},
{
"Region": "UI & Personalization",
"Function": "HideRecommendedSection",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Do not expand to open folder on navigation pane (default value)."
},
"One": {
"Tag": "Disable",
"ToolTip": "Do not remove Recommended section in Start Menu (default value)."
}
}
},
{
"Region": "OneDrive",
"Function": "OneDrive",

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

@ -796,6 +796,20 @@
}
}
},
{
"Region": "UI & Personalization",
"Function": "NavigationPaneExpand",
"Arg": {
"Zero": {
"Tag": "Disable",
"ToolTip": "Удалить раздел \"Рекомендуем\" в меню \"Пуск\"."
},
"One": {
"Tag": "Enable",
"ToolTip": "Не удалять раздел \"Рекомендуем\" в меню \"Пуск\" (значение по умолчанию)."
}
}
},
{
"Region": "OneDrive",
"Function": "OneDrive",

317
src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1

@ -3123,70 +3123,6 @@ function TaskbarAlignment
}
}
<#
.SYNOPSIS
The widgets icon on the taskbar
.PARAMETER Hide
Hide the widgets icon on the taskbar
.PARAMETER Show
Show the widgets icon on the taskbar
.EXAMPLE
TaskbarWidgets -Hide
.EXAMPLE
TaskbarWidgets -Show
.NOTES
Current user
#>
function TaskbarWidgets
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
if (-not (Get-AppxPackage -Name MicrosoftWindows.Client.WebExperience))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
return
}
# We cannot set a value to TaskbarDa, 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)
{
"Hide"
{
& "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell_temp.exe" -Command {New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name TaskbarDa -PropertyType DWord -Value 0 -Force}
}
"Show"
{
& "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell_temp.exe" -Command {New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name TaskbarDa -PropertyType DWord -Value 1 -Force}
}
}
Remove-Item -Path "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell_temp.exe" -Force
}
<#
.SYNOPSIS
Search on the taskbar
@ -4637,17 +4573,17 @@ function NavigationPaneExpand
.SYNOPSIS
Recommended section in Start Menu
.PARAMETER Disable
.PARAMETER Enable
Remove Recommended section in Start Menu
.PARAMETER Enable
.PARAMETER Disable
Do not remove Recommended section in Start Menu (default value)
.EXAMPLE
HideRecommendedSection -Disable
HideRecommendedSection -Enable
.EXAMPLE
HideRecommendedSection -Enable
HideRecommendedSection -Disable
.NOTES
Current user
@ -4658,22 +4594,22 @@ function HideRecommendedSection
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
ParameterSetName = "Enable"
)]
[switch]
$Disable,
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
ParameterSetName = "Disable"
)]
[switch]
$Enable
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
"Enable"
{
if (-not (Test-Path -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer))
{
@ -4683,7 +4619,7 @@ function HideRecommendedSection
Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type DWORD -Value 1
}
"Enable"
"Disable"
{
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore
Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name HideRecommendedSection -Type CLEAR
@ -12815,71 +12751,6 @@ function CABInstallContext
}
}
<#
.SYNOPSIS
The "Edit with Clipchamp" item in the media files context menu
.PARAMETER Hide
Hide the "Edit with Clipchamp" item from the media files context menu
.PARAMETER Show
Show the "Edit with Clipchamp" item in the media files context menu
.EXAMPLE
EditWithClipchampContext -Hide
.EXAMPLE
EditWithClipchampContext -Show
.NOTES
Current user
#>
function EditWithClipchampContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
if (-not (Get-AppxPackage -Name Clipchamp.Clipchamp))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
return
}
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{8AB635F8-9A67-4698-AB99-784AD929F3B4}" -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 "{8AB635F8-9A67-4698-AB99-784AD929F3B4}" -PropertyType String -Value "" -Force
}
"Show"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{8AB635F8-9A67-4698-AB99-784AD929F3B4}" -Force -ErrorAction Ignore
}
}
}
<#
.SYNOPSIS
The "Print" item in the .bat and .cmd context menu
@ -13039,174 +12910,6 @@ function MultipleInvokeContext
}
}
}
<#
.SYNOPSIS
The "Open in Windows Terminal" item in the folders context menu
.PARAMETER Hide
Hide the "Open in Windows Terminal" item in the folders context menu
.PARAMETER Show
Show the "Open in Windows Terminal" item in the folders context menu
.EXAMPLE
OpenWindowsTerminalContext -Show
.EXAMPLE
OpenWindowsTerminalContext -Hide
.NOTES
Current user
#>
function OpenWindowsTerminalContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show,
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide
)
if (-not (Get-AppxPackage -Name Microsoft.WindowsTerminal))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
return
}
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{9F156763-7844-4DC4-B2B1-901F640F5155}" -Force -ErrorAction Ignore
switch ($PSCmdlet.ParameterSetName)
{
"Show"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{9F156763-7844-4DC4-B2B1-901F640F5155}" -Force -ErrorAction Ignore
}
"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 "{9F156763-7844-4DC4-B2B1-901F640F5155}" -PropertyType String -Value "" -Force
}
}
}
<#
.SYNOPSIS
Open Windows Terminal in context menu as administrator
.PARAMETER Enable
Open Windows Terminal in context menu as administrator by default
.PARAMETER Disable
Do not open Windows Terminal in context menu as administrator by default
.EXAMPLE
OpenWindowsTerminalAdminContext -Enable
.EXAMPLE
OpenWindowsTerminalAdminContext -Disable
.NOTES
Current user
#>
function OpenWindowsTerminalAdminContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
if (-not (Get-AppxPackage -Name Microsoft.WindowsTerminal))
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
return
}
if (-not (Test-Path -Path "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json"))
{
Start-Process -FilePath wt -PassThru
Start-Sleep -Seconds 2
Stop-Process -Name WindowsTerminal -Force -PassThru
}
try
{
$Terminal = Get-Content -Path "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Encoding UTF8 -Force | ConvertFrom-Json
}
catch [System.ArgumentException]
{
Write-Warning -Message (($Global:Error.Exception.Message | Select-Object -First 1))
Write-Error -Message (($Global:Error.Exception.Message | Select-Object -First 1)) -ErrorAction SilentlyContinue
Invoke-Item -Path "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState"
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
return
}
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{9F156763-7844-4DC4-B2B1-901F640F5155}" -ErrorAction Ignore
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{9F156763-7844-4DC4-B2B1-901F640F5155}" -ErrorAction Ignore
if ($Terminal.profiles.defaults.elevate)
{
$Terminal.profiles.defaults.elevate = $true
}
else
{
$Terminal.profiles.defaults | Add-Member -MemberType NoteProperty -Name elevate -Value $true -Force
}
}
"Disable"
{
if ($Terminal.profiles.defaults.elevate)
{
$Terminal.profiles.defaults.elevate = $false
}
else
{
$Terminal.profiles.defaults | Add-Member -MemberType NoteProperty -Name elevate -Value $false -Force
}
}
}
# Save in UTF-8 with BOM despite JSON must not has the BOM: https://datatracker.ietf.org/doc/html/rfc8259#section-8.1. Unless Terminal profile names which contains non-Latin characters will have "?" instead of titles
ConvertTo-Json -InputObject $Terminal -Depth 4 | Set-Content -Path "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Encoding UTF8 -Force
}
#endregion Context menu
#region Update Policies

40
src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1

@ -1,6 +1,6 @@
<#
.SYNOPSIS
Default preset file for "Sophia Script for Windows 11 LTSC 202024""
Default preset file for "Sophia Script for Windows 11 LTSC 2024"
Version: v6.6.9
Date: 16.08.2024
@ -92,7 +92,7 @@ catch [System.InvalidOperationException]
Запустить скрипт, указав в качестве аргумента функции
.EXAMPLE
.\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal"
.\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal", UninstallUWPApps
.NOTES
Use commas to separate funtions
@ -383,14 +383,6 @@ TaskbarAlignment -Center
# Установить выравнивание панели задач по левому краю
# TaskbarAlignment -Left
# Hide the widgets icon on the taskbar
# Скрыть кнопку "Мини-приложения" с панели задач
TaskbarWidgets -Hide
# Show the widgets icon on the taskbar (default value)
# Отобразить кнопку "Мини-приложения" на панели задач (значение по умолчанию)
# TaskbarWidgets -Show
# Hide the search on the taskbar
# Скрыть поле или значок поиска на панели задач
TaskbarSearch -Hide
@ -573,11 +565,11 @@ NavigationPaneExpand -Disable
# Remove Recommended section in Start Menu
# Удалить раздел "Рекомендуем" в меню "Пуск"
# HideRecommendedSection -Enable
HideRecommendedSection -Enable
# Do not remove Recommended section in Start Menu (default value)
# Не удалять раздел "Рекомендуем" в меню "Пуск" (значение по умолчанию)
HideRecommendedSection -Disable
# HideRecommendedSection -Disable
#endregion UI & Personalization
#region System
@ -1240,14 +1232,6 @@ CABInstallContext -Show
# Скрыть пункт "Установить" из контекстного меню .cab архивов (значение по умолчанию)
# CABInstallContext -Hide
# Hide the "Edit with Clipchamp" item from the media files context menu
# Скрыть пункт "Редактировать в Climpchamp" из контекстного меню
EditWithClipchampContext -Hide
# Show the "Edit with Clipchamp" item in the media files context menu (default value)
# Отобразить пункт "Редактировать в Climpchamp" в контекстном меню (значение по умолчанию)
# EditWithClipchampContext -Show
# Hide the "Print" item from the .bat and .cmd context menu
# Скрыть пункт "Печать" из контекстного меню .bat и .cmd файлов
PrintCMDContext -Hide
@ -1271,22 +1255,6 @@ MultipleInvokeContext -Enable
# Disable the "Open", "Print", and "Edit" context menu items for more than 15 items selected (default value)
# Отключить элементы контекстного меню "Открыть", "Изменить" и "Печать" при выделении более 15 элементов (значение по умолчанию)
# MultipleInvokeContext -Disable
# Show the "Open in Windows Terminal" item in the folders context menu (default value)
# Отобразить пункт "Открыть в Терминале Windows" в контекстном меню папок (значение по умолчанию)
OpenWindowsTerminalContext -Show
# Hide the "Open in Windows Terminal" item in the folders context menu
# Скрыть пункт "Открыть в Терминале Windows" в контекстном меню папок
# OpenWindowsTerminalContext -Hide
# Open Windows Terminal in context menu as administrator by default
# Открывать Windows Terminal из контекстного меню от имени администратора по умолчанию
OpenWindowsTerminalAdminContext -Enable
# Do not open Windows Terminal in context menu as administrator by default (default value)
# Не открывать Windows Terminal из контекстного меню от имени администратора по умолчанию (значение по умолчанию)
# OpenWindowsTerminalAdminContext -Disable
#endregion Context menu
#region Update Policies

Loading…
Cancel
Save