Browse Source

Added `RegistryBackup` function

master
Dmitry Nefedov 4 months ago
parent
commit
ecdd0de207
  1. 26
      Wrapper/Config/config_Windows_10.json
  2. 26
      Wrapper/Config/config_Windows_10_LTSC.json
  3. 26
      Wrapper/Config/config_Windows_11.json
  4. 108
      Wrapper/Localizations/de-DE/tooltip_Windows_10.json
  5. 80
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  6. 108
      Wrapper/Localizations/en-US/tooltip_Windows_10.json
  7. 80
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  8. 92
      Wrapper/Localizations/ru-RU/tooltip_Windows_10.json
  9. 80
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  10. 62
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  11. 8
      src/Sophia_Script_for_Windows_10/Sophia.ps1
  12. 62
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  13. 8
      src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1
  14. 62
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  15. 8
      src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1
  16. 62
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  17. 8
      src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1
  18. 62
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  19. 8
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  20. 62
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  21. 8
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

26
Wrapper/Config/config_Windows_10.json

@ -1560,6 +1560,19 @@
"Preset": "Zero",
"WindowsDefault": "Zero"
},
{
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": ""
}
},
"Preset": "",
"WindowsDefault": ""
},
{
"Region": "System",
"Control": "chk",
@ -1675,16 +1688,19 @@
},
{
"Region": "System",
"Control": "chk",
"Control": "cmb",
"Required": "false",
"Function": "Set-Association",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": ""
"Tag": "Enable"
},
"One": {
"Tag": "Disable"
}
},
"Preset": "",
"WindowsDefault": ""
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "WSL",

26
Wrapper/Config/config_Windows_10_LTSC.json

@ -1494,6 +1494,19 @@
"LTSC2019": "true",
"LTSC2021": "true"
},
{
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": ""
}
},
"Preset": "",
"WindowsDefault": ""
},
{
"Region": "System",
"Control": "chk",
@ -1610,16 +1623,19 @@
},
{
"Region": "System",
"Control": "chk",
"Control": "cmb",
"Required": "false",
"Function": "Set-Association",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": ""
"Tag": "Enable"
},
"One": {
"Tag": "Disable"
}
},
"Preset": "",
"WindowsDefault": ""
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "WSL",

26
Wrapper/Config/config_Windows_11.json

@ -1467,6 +1467,19 @@
"Preset": "Zero",
"WindowsDefault": "Zero"
},
{
"Region": "System",
"Control": "chk",
"Required": "false",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": ""
}
},
"Preset": "",
"WindowsDefault": ""
},
{
"Region": "System",
"Control": "chk",
@ -1598,16 +1611,19 @@
},
{
"Region": "System",
"Control": "chk",
"Control": "cmb",
"Required": "false",
"Function": "Set-Association",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": ""
"Tag": "Enable"
},
"One": {
"Tag": "Disable"
}
},
"Preset": "",
"WindowsDefault": ""
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "WSL",

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

@ -1068,20 +1068,6 @@
}
}
},
{
"Region": "System",
"Function": "LatestInstalled.NET",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Verwenden Sie die neueste installierte .NET-Laufzeitumgebung für alle Anwendungen."
},
"One": {
"Tag": "Disable",
"ToolTip": "Die zuletzt installierte .NET-Laufzeitumgebung nicht für alle Anwendungen verwenden (Standardeinstellung)."
}
}
},
{
"Region": "System",
"Function": "NetworkAdaptersSavePower",
@ -1146,6 +1132,20 @@
}
}
},
{
"Region": "System",
"Function": "LatestInstalled.NET",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Verwenden Sie die neueste installierte .NET-Laufzeitumgebung für alle Anwendungen."
},
"One": {
"Tag": "Disable",
"ToolTip": "Die zuletzt installierte .NET-Laufzeitumgebung nicht für alle Anwendungen verwenden (Standardeinstellung)."
}
}
},
{
"Region": "System",
"Function": "WinPrtScrFolder",
@ -1370,6 +1370,46 @@
}
}
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Registrieren Sie die App, berechnen Sie den Hash und verknüpfen Sie sie mit einer Erweiterung, wobei das Popup 'Wie möchten Sie diese öffnen?' ausgeblendet ist."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Pfad zur ausführbaren Datei."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Erweiterung."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Pfad zum Symbol."
}
}
},
{
"Region": "System",
"Function": "Export-Associations",
@ -1464,41 +1504,15 @@
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Registrieren Sie die App, berechnen Sie den Hash und verknüpfen Sie sie mit einer Erweiterung, wobei das Popup 'Wie möchten Sie diese öffnen?' ausgeblendet ist."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Pfad zur ausführbaren Datei."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Erweiterung."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Pfad zum Symbol."
"Tag": "Enable",
"ToolTip": "Sichern Sie die Systemregistrierung im Ordner %SystemRoot%\\System32\\config\\RegBack, wenn der PC neu gestartet wird, und erstellen Sie ein RegIdleBackup in der Taskplaner-Aufgabe, um nachfolgende Sicherungen zu verwalten."
},
"One": {
"Tag": "Disable",
"ToolTip": "Sichern Sie die Systemregistrierung nicht im Ordner %SystemRoot%\\System32\\config\\RegBack (Standardeinstellung)."
}
}
},

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

@ -1290,6 +1290,46 @@
}
}
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Registrieren Sie die App, berechnen Sie den Hash und verknüpfen Sie sie mit einer Erweiterung, wobei das Popup 'Wie möchten Sie diese öffnen?' ausgeblendet ist."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Pfad zur ausführbaren Datei."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Erweiterung."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Pfad zum Symbol."
}
}
},
{
"Region": "System",
"Function": "Export-Associations",
@ -1398,41 +1438,15 @@
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Registrieren Sie die App, berechnen Sie den Hash und verknüpfen Sie sie mit einer Erweiterung, wobei das Popup 'Wie möchten Sie diese öffnen?' ausgeblendet ist."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Pfad zur ausführbaren Datei."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Erweiterung."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Pfad zum Symbol."
"Tag": "Enable",
"ToolTip": "Sichern Sie die Systemregistrierung im Ordner %SystemRoot%\\System32\\config\\RegBack, wenn der PC neu gestartet wird, und erstellen Sie ein RegIdleBackup in der Taskplaner-Aufgabe, um nachfolgende Sicherungen zu verwalten."
},
"One": {
"Tag": "Disable",
"ToolTip": "Sichern Sie die Systemregistrierung nicht im Ordner %SystemRoot%\\System32\\config\\RegBack (Standardeinstellung)."
}
}
},

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

@ -1068,20 +1068,6 @@
}
}
},
{
"Region": "System",
"Function": "LatestInstalled.NET",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Use the latest installed .NET runtime for all apps."
},
"One": {
"Tag": "Disable",
"ToolTip": "Do not use the latest installed .NET runtime for all apps (default value)."
}
}
},
{
"Region": "System",
"Function": "NetworkAdaptersSavePower",
@ -1146,6 +1132,20 @@
}
}
},
{
"Region": "System",
"Function": "LatestInstalled.NET",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Use the latest installed .NET runtime for all apps."
},
"One": {
"Tag": "Disable",
"ToolTip": "Do not use the latest installed .NET runtime for all apps (default value)."
}
}
},
{
"Region": "System",
"Function": "WinPrtScrFolder",
@ -1370,6 +1370,46 @@
}
}
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Register app, calculate hash, and associate with an extension with the 'How do you want to open this' pop-up hidden."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Path to executable file."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Extension."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Path to icon."
}
}
},
{
"Region": "System",
"Function": "Export-Associations",
@ -1464,41 +1504,15 @@
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Register app, calculate hash, and associate with an extension with the 'How do you want to open this' pop-up hidden."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Path to executable file."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Extension."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Path to icon."
"Tag": "Enable",
"ToolTip": "Back up the system registry to %SystemRoot%\\System32\\config\\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups."
},
"One": {
"Tag": "Disable",
"ToolTip": "Do not back up the system registry to %SystemRoot%\\System32\\config\\RegBack folder (default value)."
}
}
},

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

@ -1290,6 +1290,46 @@
}
}
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Register app, calculate hash, and associate with an extension with the 'How do you want to open this' pop-up hidden."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Path to executable file."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Extension."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Path to icon."
}
}
},
{
"Region": "System",
"Function": "Export-Associations",
@ -1398,41 +1438,15 @@
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Register app, calculate hash, and associate with an extension with the 'How do you want to open this' pop-up hidden."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Path to executable file."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Extension."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Path to icon."
"Tag": "Enable",
"ToolTip": "Back up the system registry to %SystemRoot%\\System32\\config\\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups."
},
"One": {
"Tag": "Disable",
"ToolTip": "Do not back up the system registry to %SystemRoot%\\System32\\config\\RegBack folder (default value)."
}
}
},

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

@ -571,29 +571,29 @@
},
{
"Region": "UI & Personalization",
"Function": "SecondsInSystemClock",
"Function": "NotificationAreaIcons",
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Отобразить секунды в системных часах на панели задач."
"ToolTip": "Всегда отображать все значки в области уведомлений."
},
"One": {
"Tag": "Hide",
"ToolTip": "Скрыть секунды в системных часах на панели задач (значение по умолчанию)"
"ToolTip": "Скрыть все значки в области уведомлений (значение по умолчанию)."
}
}
},
{
"Region": "UI & Personalization",
"Function": "NotificationAreaIcons",
"Function": "SecondsInSystemClock",
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Всегда отображать все значки в области уведомлений."
"ToolTip": "Отобразить секунды в системных часах на панели задач."
},
"One": {
"Tag": "Hide",
"ToolTip": "Скрыть все значки в области уведомлений (значение по умолчанию)."
"ToolTip": "Скрыть секунды в системных часах на панели задач (значение по умолчанию)"
}
}
},
@ -1370,6 +1370,46 @@
}
}
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Зарегистрировать приложение, вычислить хэш и ассоциировать его с расширением без всплывающего окна 'Каким образом вы хотите открыть этот файл?'"
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Путь до исполняемого файла."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Расширение."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Путь до значка."
}
}
},
{
"Region": "System",
"Function": "Export-Associations",
@ -1464,41 +1504,15 @@
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Зарегистрируйте приложение, рассчитайте хэш и свяжите его с расширением со скрытым всплывающим окном 'Как вы хотите открыть это'."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Путь до исполняемого файла."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Расширение."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Путь до значка."
"Tag": "Enable",
"ToolTip": "Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями."
},
"One": {
"Tag": "Disable",
"ToolTip": "Не создавать копии реестра при перезагрузки ПК (значение по умолчанию)."
}
}
},

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

@ -1290,6 +1290,46 @@
}
}
},
{
"Region": "System",
"Function": "Set-Association",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Зарегистрировать приложение, вычислить хэш и ассоциировать его с расширением без всплывающего окна 'Каким образом вы хотите открыть этот файл?'"
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Путь до исполняемого файла."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Расширение."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Путь до значка."
}
}
},
{
"Region": "System",
"Function": "Export-Associations",
@ -1398,41 +1438,15 @@
},
{
"Region": "System",
"Function": "Set-Association",
"Function": "RegistryBackup",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Зарегистрируйте приложение, рассчитайте хэш и свяжите его с расширением со скрытым всплывающим окном 'Как вы хотите открыть это'."
}
}
},
{
"Region": "System",
"Function": "ProgramPath",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Путь до исполняемого файла."
}
}
},
{
"Region": "System",
"Function": "Extension",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Расширение."
}
}
},
{
"Region": "System",
"Function": "Icon",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Путь до значка."
"Tag": "Enable",
"ToolTip": "Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями."
},
"One": {
"Tag": "Disable",
"ToolTip": "Не создавать копии реестра при перезагрузки ПК (значение по умолчанию)."
}
}
},

62
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -269,7 +269,7 @@ public static string GetString(uint strId)
# https://hone.gg
Hone = "$env:LOCALAPPDATA\Programs\Hone\Hone.exe"
# https://github.com/ChrisTitusTech/winutil
winutil = "$env:TEMP\cttlogo.png", "$env:TEMP\Winutil.log"
winutil = "$env:TEMP\Winutil.log"
}
foreach ($Tweaker in $Tweakers.Keys)
{
@ -8880,11 +8880,6 @@ function NetworkDiscovery
$Disable
)
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain)
{
return
}
$FirewallRules = @(
# File and printer sharing
"@FirewallAPI.dll,-32752",
@ -10695,6 +10690,57 @@ function SATADrivesRemovableMedia
}
}
}
<#
.SYNOPSIS
Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
.PARAMETER Enable
Back up the system registry to %SystemRoot%\System32\config\RegBack folder
.PARAMETER Disable
Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder
.EXAMPLE
RegistryBackup -Enable
.EXAMPLE
RegistryBackup -Disable
.NOTES
Machine-wide
#>
function RegistryBackup
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Type DWord -Value 1 -Force
}
"Disable"
{
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Force -ErrorAction Ignore
}
}
}
#endregion System
#region WSL
@ -13530,9 +13576,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_
"`$env:SystemDrive\PerfLogs"
)
if ((Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName)
if ((Get-ChildItem -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Name -eq "ReAgentOld.xml"}).FullName)
{
`$Paths += (Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName
`$Paths += "$env:SystemDrive\Recovery"
}
Remove-Item -Path `$Paths -Recurse -Force

8
src/Sophia_Script_for_Windows_10/Sophia.ps1

@ -1026,6 +1026,14 @@ SATADrivesRemovableMedia -Disable
# Show up all internal SATA drives as removeable media in the taskbar notification area (default value)
# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию)
# SATADrivesRemovableMedia -Default
# Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
# Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями
# RegistryBackup -Enable
# Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder (default value)
# Не создавать копии реестра при перезагрузки ПК (значение по умолчанию)
# RegistryBackup -Disable
#endregion System
#region WSL

62
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -180,7 +180,7 @@ public static string GetString(uint strId)
# https://hone.gg
Hone = "$env:LOCALAPPDATA\Programs\Hone\Hone.exe"
# https://github.com/ChrisTitusTech/winutil
winutil = "$env:TEMP\cttlogo.png", "$env:TEMP\Winutil.log"
winutil = "$env:TEMP\Winutil.log"
}
foreach ($Tweaker in $Tweakers.Keys)
{
@ -7263,11 +7263,6 @@ function NetworkDiscovery
$Disable
)
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain)
{
return
}
$FirewallRules = @(
# File and printer sharing
"@FirewallAPI.dll,-32752",
@ -8928,6 +8923,57 @@ function SATADrivesRemovableMedia
}
}
}
<#
.SYNOPSIS
Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
.PARAMETER Enable
Back up the system registry to %SystemRoot%\System32\config\RegBack folder
.PARAMETER Disable
Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder
.EXAMPLE
RegistryBackup -Enable
.EXAMPLE
RegistryBackup -Disable
.NOTES
Machine-wide
#>
function RegistryBackup
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Type DWord -Value 1 -Force
}
"Disable"
{
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Force -ErrorAction Ignore
}
}
}
#endregion System
#region Start menu
@ -10058,9 +10104,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_
"`$env:SystemDrive\PerfLogs"
)
if ((Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName)
if ((Get-ChildItem -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Name -eq "ReAgentOld.xml"}).FullName)
{
`$Paths += (Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName
`$Paths += "$env:SystemDrive\Recovery"
}
Remove-Item -Path `$Paths -Recurse -Force

8
src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1

@ -807,6 +807,14 @@ SATADrivesRemovableMedia -Disable
# Show up all internal SATA drives as removeable media in the taskbar notification area (default value)
# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию)
# SATADrivesRemovableMedia -Default
# Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
# Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями
# RegistryBackup -Enable
# Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder (default value)
# Не создавать копии реестра при перезагрузки ПК (значение по умолчанию)
# RegistryBackup -Disable
#endregion System
#region Start menu

62
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -180,7 +180,7 @@ public static string GetString(uint strId)
# https://hone.gg
Hone = "$env:LOCALAPPDATA\Programs\Hone\Hone.exe"
# https://github.com/ChrisTitusTech/winutil
winutil = "$env:TEMP\cttlogo.png", "$env:TEMP\Winutil.log"
winutil = "$env:TEMP\Winutil.log"
}
foreach ($Tweaker in $Tweakers.Keys)
{
@ -7839,11 +7839,6 @@ function NetworkDiscovery
$Disable
)
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain)
{
return
}
$FirewallRules = @(
# File and printer sharing
"@FirewallAPI.dll,-32752",
@ -9555,6 +9550,57 @@ function SATADrivesRemovableMedia
}
}
}
<#
.SYNOPSIS
Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
.PARAMETER Enable
Back up the system registry to %SystemRoot%\System32\config\RegBack folder
.PARAMETER Disable
Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder
.EXAMPLE
RegistryBackup -Enable
.EXAMPLE
RegistryBackup -Disable
.NOTES
Machine-wide
#>
function RegistryBackup
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Type DWord -Value 1 -Force
}
"Disable"
{
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Force -ErrorAction Ignore
}
}
}
#endregion System
#region WSL
@ -11176,9 +11222,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_
"`$env:SystemDrive\PerfLogs"
)
if ((Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName)
if ((Get-ChildItem -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Name -eq "ReAgentOld.xml"}).FullName)
{
`$Paths += (Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName
`$Paths += "$env:SystemDrive\Recovery"
}
Remove-Item -Path `$Paths -Recurse -Force

8
src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1

@ -905,6 +905,14 @@ SATADrivesRemovableMedia -Disable
# Show up all internal SATA drives as removeable media in the taskbar notification area (default value)
# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию)
# SATADrivesRemovableMedia -Default
# Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
# Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями
# RegistryBackup -Enable
# Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder (default value)
# Не создавать копии реестра при перезагрузки ПК (значение по умолчанию)
# RegistryBackup -Disable
#endregion System
#region WSL

62
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -265,7 +265,7 @@ public static string GetString(uint strId)
# https://hone.gg
Hone = "$env:LOCALAPPDATA\Programs\Hone\Hone.exe"
# https://github.com/ChrisTitusTech/winutil
winutil = "$env:TEMP\cttlogo.png", "$env:TEMP\Winutil.log"
winutil = "$env:TEMP\Winutil.log"
}
foreach ($Tweaker in $Tweakers.Keys)
{
@ -8884,11 +8884,6 @@ function NetworkDiscovery
$Disable
)
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain)
{
return
}
$FirewallRules = @(
# File and printer sharing
"@FirewallAPI.dll,-32752",
@ -10699,6 +10694,57 @@ function SATADrivesRemovableMedia
}
}
}
<#
.SYNOPSIS
Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
.PARAMETER Enable
Back up the system registry to %SystemRoot%\System32\config\RegBack folder
.PARAMETER Disable
Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder
.EXAMPLE
RegistryBackup -Enable
.EXAMPLE
RegistryBackup -Disable
.NOTES
Machine-wide
#>
function RegistryBackup
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Type DWord -Value 1 -Force
}
"Disable"
{
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Force -ErrorAction Ignore
}
}
}
#endregion System
#region WSL
@ -13554,9 +13600,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_
"`$env:SystemDrive\PerfLogs"
)
if ((Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName)
if ((Get-ChildItem -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Name -eq "ReAgentOld.xml"}).FullName)
{
`$Paths += (Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName
`$Paths += "$env:SystemDrive\Recovery"
}
Remove-Item -Path `$Paths -Recurse -Force

8
src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1

@ -1035,6 +1035,14 @@ SATADrivesRemovableMedia -Disable
# Show up all internal SATA drives as removeable media in the taskbar notification area (default value)
# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию)
# SATADrivesRemovableMedia -Default
# Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
# Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями
# RegistryBackup -Enable
# Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder (default value)
# Не создавать копии реестра при перезагрузки ПК (значение по умолчанию)
# RegistryBackup -Disable
#endregion System
#region WSL

62
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -257,7 +257,7 @@ public static string GetString(uint strId)
# https://hone.gg
Hone = "$env:LOCALAPPDATA\Programs\Hone\Hone.exe"
# https://github.com/ChrisTitusTech/winutil
winutil = "$env:TEMP\cttlogo.png", "$env:TEMP\Winutil.log"
winutil = "$env:TEMP\Winutil.log"
}
foreach ($Tweaker in $Tweakers.Keys)
{
@ -8418,11 +8418,6 @@ function NetworkDiscovery
$Disable
)
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain)
{
return
}
$FirewallRules = @(
# File and printer sharing
"@FirewallAPI.dll,-32752",
@ -10136,6 +10131,57 @@ function SATADrivesRemovableMedia
}
}
}
<#
.SYNOPSIS
Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
.PARAMETER Enable
Back up the system registry to %SystemRoot%\System32\config\RegBack folder
.PARAMETER Disable
Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder
.EXAMPLE
RegistryBackup -Enable
.EXAMPLE
RegistryBackup -Disable
.NOTES
Machine-wide
#>
function RegistryBackup
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Type DWord -Value 1 -Force
}
"Disable"
{
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Force -ErrorAction Ignore
}
}
}
#endregion System
#region WSL
@ -12640,9 +12686,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_
"`$env:SystemDrive\PerfLogs"
)
if ((Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName)
if ((Get-ChildItem -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Name -eq "ReAgentOld.xml"}).FullName)
{
`$Paths += (Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName
`$Paths += "$env:SystemDrive\Recovery"
}
Remove-Item -Path `$Paths -Recurse -Force

8
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -994,6 +994,14 @@ SATADrivesRemovableMedia -Disable
# Show up all internal SATA drives as removeable media in the taskbar notification area (default value)
# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию)
# SATADrivesRemovableMedia -Default
# Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
# Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями
# RegistryBackup -Enable
# Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder (default value)
# Не создавать копии реестра при перезагрузки ПК (значение по умолчанию)
# RegistryBackup -Disable
#endregion System
#region WSL

62
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -253,7 +253,7 @@ public static string GetString(uint strId)
# https://hone.gg
Hone = "$env:LOCALAPPDATA\Programs\Hone\Hone.exe"
# https://github.com/ChrisTitusTech/winutil
winutil = "$env:TEMP\cttlogo.png", "$env:TEMP\Winutil.log"
winutil = "$env:TEMP\Winutil.log"
}
foreach ($Tweaker in $Tweakers.Keys)
{
@ -8419,11 +8419,6 @@ function NetworkDiscovery
$Disable
)
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain)
{
return
}
$FirewallRules = @(
# File and printer sharing
"@FirewallAPI.dll,-32752",
@ -10137,6 +10132,57 @@ function SATADrivesRemovableMedia
}
}
}
<#
.SYNOPSIS
Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
.PARAMETER Enable
Back up the system registry to %SystemRoot%\System32\config\RegBack folder
.PARAMETER Disable
Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder
.EXAMPLE
RegistryBackup -Enable
.EXAMPLE
RegistryBackup -Disable
.NOTES
Machine-wide
#>
function RegistryBackup
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Type DWord -Value 1 -Force
}
"Disable"
{
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager" -Name EnablePeriodicBackup -Force -ErrorAction Ignore
}
}
}
#endregion System
#region WSL
@ -12661,9 +12707,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_
"`$env:SystemDrive\PerfLogs"
)
if ((Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName)
if ((Get-ChildItem -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Name -eq "ReAgentOld.xml"}).FullName)
{
`$Paths += (Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName
`$Paths += "$env:SystemDrive\Recovery"
}
Remove-Item -Path `$Paths -Recurse -Force

8
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -1003,6 +1003,14 @@ SATADrivesRemovableMedia -Disable
# Show up all internal SATA drives as removeable media in the taskbar notification area (default value)
# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию)
# SATADrivesRemovableMedia -Default
# Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups
# Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями
# RegistryBackup -Enable
# Do not back up the system registry to %SystemRoot%\System32\config\RegBack folder (default value)
# Не создавать копии реестра при перезагрузки ПК (значение по умолчанию)
# RegistryBackup -Disable
#endregion System
#region WSL

Loading…
Cancel
Save