diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Functions.ps1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Functions.ps1 index 192f75ce..1c754521 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Functions.ps1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Functions.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS The TAB completion for functions and their arguments - Version: v5.2.19 - Date: 27.02.2022 + Version: v5.2.20 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -54,7 +54,7 @@ function Sophia Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC v5.2.19 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC v5.2.20 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/de-DE/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/de-DE/Sophia.psd1 index c221a1e4..930b2f70 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/de-DE/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/de-DE/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Sie versuchen ein Skript über Power UnsupportedISE = Das Skript unterstützt nicht die Ausführung über Windows PowerShell ISE Win10TweakerWarning = Wahrscheinlich wurde Ihr Betriebssystem über die Win 10 Tweaker-Hintertür infiziert Windows10DebloaterWarning = Die Stabilität des Windows-Betriebssystems kann durch die Verwendung des Windows10Debloater PowerShell-Skripts von Sycnex beeinträchtigt worden sein. Installieren Sie vorsorglich das gesamte Betriebssystem neu +RebootPending = Der PC wartet darauf, neu gestartet zu werden UnsupportedRelease = Neue Version gefunden CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen? ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/en-US/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/en-US/Sophia.psd1 index 58d03b55..462d8d2a 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/en-US/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/en-US/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = You're trying to run script via Powe UnsupportedISE = The script doesn't support running via Windows PowerShell ISE Win10TweakerWarning = Probably your OS was infected via the Win 10 Tweaker backdoor Windows10DebloaterWarning = The Windows OS stability may have been compromised by using Sycnex's Windows10Debloater PowerShell script. Preventively, reinstall the entire OS +RebootPending = The PC is waiting to be restarted UnsupportedRelease = A new version found CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script? ControlledFolderAccessDisabled = Controlled folder access disabled diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/es-ES/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/es-ES/Sophia.psd1 index 779f4a0a..2ae8ba14 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/es-ES/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/es-ES/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = Estás intentando ejecutar el script UnsupportedISE = El script no es compatible con la ejecución a través de Windows PowerShell ISE Win10TweakerWarning = Probablemente su sistema operativo fue infectado a través del backdoor Win 10 Tweaker Windows10DebloaterWarning = La estabilidad del sistema operativo Windows puede haberse visto comprometida al utilizar el script PowerShell Windows10Debloater de Sycnex. De forma preventiva, reinstale todo el sistema operativo +RebootPending = El PC está esperando a ser reiniciado UnsupportedRelease = Una nueva versión encontrada CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script? ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/fr-FR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/fr-FR/Sophia.psd1 index 55c6e9a3..4a6b3934 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/fr-FR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/fr-FR/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = Vous essayez d'exécuter le script v UnsupportedISE = Le script ne supporte pas l'exécution via Windows PowerShell ISE Win10TweakerWarning = Votre système d'exploitation a probablement été infecté par la porte dérobée Win 10 Tweaker Windows10DebloaterWarning = La stabilité de l'OS Windows peut avoir été compromise par l'utilisation du script PowerShell Windows10Debloater de Sycnex. De manière préventive, réinstallez l'ensemble de l'OS +RebootPending = Le PC attend d'être redémarré UnsupportedRelease = Nouvelle version trouvée CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script? ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/hu-HU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/hu-HU/Sophia.psd1 index 767c3900..b48dbaf4 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/hu-HU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/hu-HU/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = A PowerShell {0}.{1} segítségével UnsupportedISE = A szkript nem támogatja a Windows PowerShell ISE futtatását Win10TweakerWarning = Valószínűleg az operációs rendszerét a Win 10 Tweaker backdoor segítségével fertőzték meg Windows10DebloaterWarning = A Windows operációs rendszer stabilitását veszélyeztethette a Sycnex Windows10Debloater PowerShell szkriptje. Megelőzésképpen telepítse újra a teljes operációs rendszert +RebootPending = A számítógép újraindításra vár UnsupportedRelease = Új verzió érhető el CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet? ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/it-IT/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/it-IT/Sophia.psd1 index 5c452d19..2c2ff9e3 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/it-IT/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/it-IT/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = Stai cercando di eseguire lo script UnsupportedISE = Lo script non supporta l'esecuzione tramite Windows PowerShell ISE Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = La stabilità del sistema operativo Windows potrebbe essere stata compromessa dall'utilizzo dello script PowerShell Windows10Debloater di Sycnex. Preventivamente, reinstallare l'intero sistema operativo +RebootPending = Il PC è in attesa di essere riavviato UnsupportedRelease = Nuova versione trovata CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file delle preimpostazioni {0} prima di eseguire Sophia Script? ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/pt-BR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/pt-BR/Sophia.psd1 index 05deac04..8d3809be 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/pt-BR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/pt-BR/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = Você está tentando executar o scri UnsupportedISE = O guião não suporta a execução através do Windows PowerShell ISE Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = A estabilidade do sistema operacional Windows pode ter sido comprometida pela utilização do script Windows10Debloater PowerShell da Sycnex. Preventivamente, reinstale todo o sistema operacional +RebootPending = O PC está esperando para ser reiniciado UnsupportedRelease = Nova versão encontrada CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script? ControlledFolderAccessDisabled = Acesso controlado a pasta desativada diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/ru-RU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/ru-RU/Sophia.psd1 index a2abcf28..032dbaef 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/ru-RU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/ru-RU/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = Вы пытаетесь запуст UnsupportedISE = Скрипт не поддерживает работу через Windows PowerShell ISE Win10TweakerWarning = Ваша ОС, возможно, через бэкдор в Win 10 Tweaker была заражена трояном. Подробнее: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабильность Вашей ОС могла быть нарушена использованием скрипта Windows10Debloater от Sycnex. В целях профилактики переустановите ОС +RebootPending = Компьютер ожидает перезагрузки UnsupportedRelease = Обнаружена новая версия CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/tr-TR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/tr-TR/Sophia.psd1 index b29d745a..a940cc5c 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/tr-TR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/tr-TR/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = Komut dosyasını PowerShell {0}.{1} UnsupportedISE = Komut dosyası, Windows PowerShell ISE üzerinden çalıştırmayı desteklemiyor Win10TweakerWarning = Muhtemelen işletim sisteminize Win 10 Tweaker arka kapısı yoluyla bulaştı Windows10DebloaterWarning = Windows işletim sistemi kararlılığı, Sycnex'in Windows10Debloater PowerShell betiği kullanılarak tehlikeye atılmış olabilir. Önleyici olarak, tüm işletim sistemini yeniden yükleyin +RebootPending = PC yeniden başlatılmayı bekliyor UnsupportedRelease = Yeni sürüm bulundu CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi? ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/uk-UA/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/uk-UA/Sophia.psd1 index 3a432135..c442f8f3 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/uk-UA/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/uk-UA/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = Ви намагаєтеся запу UnsupportedISE = Скрипт не підтримує роботу через Windows PowerShell ISE Win10TweakerWarning = Ваша ОС, можливо, через бекдор в Win 10 Tweaker заражена трояном. Детальніше: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабільність вашої ОС могла бути порушена використанням скрипту Windows10Debloater від Sycnex. З метою профілактики перевстановіть ОС +RebootPending = Комп'ютер очікує на перезавантаження. UnsupportedRelease = Виявлено нову версію CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/zh-CN/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/zh-CN/Sophia.psd1 index cdcd5c41..269c7c64 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/zh-CN/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Localizations/zh-CN/Sophia.psd1 @@ -7,6 +7,7 @@ UnsupportedPowerShell = 你想通过PowerShell {0}.{1}运行 UnsupportedISE = 该脚本不支持通过Windows PowerShell ISE运行 Win10TweakerWarning = 可能你的操作系统是通过“Win 10 Tweaker”后门感染的 Windows10DebloaterWarning = 使用Sycnex的Windows10Debloater PowerShell脚本,Windows操作系统的稳定性可能已经受到影响。预防性地,重新安装整个操作系统 +RebootPending = 计算机正在等待重新启动 UnsupportedRelease = 找到新版本 CustomizationWarning = \n在运行Sophia Script之前,您是否已自定义{0}预设文件中的每个函数? ControlledFolderAccessDisabled = “受控文件夹访问”已禁用 diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Manifest/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Manifest/Sophia.psd1 index d899d69e..4734023b 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Manifest/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Manifest/Sophia.psd1 @@ -1,6 +1,6 @@ @{ RootModule = '..\Module\Sophia.psm1' - ModuleVersion = '5.2.19' + ModuleVersion = '5.2.20' GUID = 'a36a65ca-70f9-43df-856c-3048fc5e7f01' Author = 'Dmitry "farag" Nefedov' Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved' diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Module/Sophia.psm1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Module/Sophia.psm1 index 78b45a29..19fe7177 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Module/Sophia.psm1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Module/Sophia.psm1 @@ -2,8 +2,8 @@ .SYNOPSIS Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks - Version: v5.2.19 - Date: 27.02.2022 + Version: v5.2.20 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -73,6 +73,23 @@ function Checkings $false { Write-Warning -Message $Localization.UnsupportedOSBuild + + # Enable receiving updates for other Microsoft products when you update Windows + (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + + Start-Sleep -Seconds 1 + + # Open the "Windows Update" page + Start-Process -FilePath "ms-settings:windowsupdate-action" + + Start-Sleep -Seconds 1 + + # Trigger Windows Update for detecting new updates + (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() + + exit + } + } exit } } @@ -118,7 +135,7 @@ function Checkings exit } - # Check whether the OS was infected by Win 10 Tweaker's trojan + # Check whether the OS was infected by the Win 10 Tweaker's trojan # https://win10tweaker.ru if (Test-Path -Path "HKCU:\Software\Win 10 Tweaker") { @@ -138,6 +155,22 @@ function Checkings exit } + # Check for a pending reboot + $PendingActions = @( + # CBS pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending", + # Windows Update pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" + ) + if ($null -ne (Get-Item -Path $PendingActions -Force -ErrorAction Ignore)) + { + Write-Warning -Message $Localization.RebootPending + exit + } + # Check if the current module version is the latest one try { @@ -1764,13 +1797,13 @@ function TaskViewButton <# .SYNOPSIS - People button on the taskbar + People on the taskbar .PARAMETER Hide - Hide People button on the taskbar + Hide People on the taskbar .PARAMETER Show - Show People button on the taskbar + Show People on the taskbar .EXAMPLE PeopleTaskbar -Hide @@ -3348,7 +3381,7 @@ function WaitNetworkStartup { "Enable" { - if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain -eq $true) + if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain) { if (-not (Test-Path -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon")) { @@ -3359,7 +3392,7 @@ function WaitNetworkStartup } "Disable" { - if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain -eq $true) + if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain) { Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name SyncForegroundPolicy -Force -ErrorAction Ignore } @@ -4160,7 +4193,7 @@ function UpdateMicrosoftProducts } "Disable" { - if (((New-Object -ComObject Microsoft.Update.ServiceManager).Services | Where-Object -FilterScript {$_.ServiceID -eq "7971f918-a847-4430-9279-4a52d1efe18d"}).IsDefaultAUService -eq $true) + if (((New-Object -ComObject Microsoft.Update.ServiceManager).Services | Where-Object -FilterScript {$_.ServiceID -eq "7971f918-a847-4430-9279-4a52d1efe18d"}).IsDefaultAUService) { (New-Object -ComObject Microsoft.Update.ServiceManager).RemoveService("7971f918-a847-4430-9279-4a52d1efe18d") } @@ -5741,13 +5774,13 @@ function CapsLock <# .SYNOPSIS - The keyboard schortcut for Stick keys + The shortcut to start Sticky Keys .PARAMETER Disable - Turn off pressing the Shift key 5 times to turn Sticky keys + Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times .PARAMETER Enable - Turn on pressing the Shift key 5 times to turn Sticky keys + Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times .EXAMPLE StickyShift -Disable @@ -5943,7 +5976,7 @@ function NetworkDiscovery { "Enable" { - if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain -eq $false) + if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain) { Set-NetFirewallRule -Group $FirewallRules -Profile Private -Enabled True @@ -5953,7 +5986,7 @@ function NetworkDiscovery } "Disable" { - if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain -eq $false) + if (-not (Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain) { Set-NetFirewallRule -Group $FirewallRules -Profile Private -Enabled False } @@ -6679,16 +6712,25 @@ function InstallVCRedistx64 { $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $Parameters = @{ - Uri = "https://aka.ms/vs/16/release/vc_redist.x64.exe" - OutFile = "$DownloadsFolder\vc_redist.x64.exe" + Uri = "https://aka.ms/vs/17/release/VC_redist.x64.exe" + OutFile = "$DownloadsFolder\VC_redist.x64.exe" UseBasicParsing = $true Verbose = $true } Invoke-WebRequest @Parameters - Start-Process -FilePath "$DownloadsFolder\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\VC_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + + <# + PowerShell 5.1 (7.2 too) interprets the 8.3 file name literally, if an environment variable contains a non-latin word, + so you won't be able to remove "$env:TEMP\dd_vcredist_amd64_*.log" file explicitly - Remove-Item -Path "$DownloadsFolder\vc_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force -ErrorAction Ignore + Another ways to get normal path to %TEMP% + [Environment]::GetEnvironmentVariable("TEMP", "User") + (Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP + [System.IO.Path]::GetTempPath() + #> + Get-ChildItem -Path "$DownloadsFolder\VC_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore } #endregion System @@ -6965,41 +7007,43 @@ function CleanupTask { "Register" { - Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { - Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore - } + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Windows Cleanup" -ErrorAction Ignore)) + { + Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { + Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore + } - $VolumeCaches = @( - # Delivery Optimization Files - "Delivery Optimization Files", + $VolumeCaches = @( + # Delivery Optimization Files + "Delivery Optimization Files", - # Device driver packages - "Device Driver Packages", + # Device driver packages + "Device Driver Packages", - # Previous Windows Installation(s) - "Previous Installations", + # Previous Windows Installation(s) + "Previous Installations", - # Setup log files - "Setup Log Files", + # Setup log files + "Setup Log Files", - # Temporary Setup Files - "Temporary Setup Files", + # Temporary Setup Files + "Temporary Setup Files", - # Windows Update Cleanup - "Update Cleanup", + # Windows Update Cleanup + "Update Cleanup", - # Windows Defender - "Windows Defender", + # Microsoft Defender + "Windows Defender", - # Windows upgrade log files - "Windows Upgrade Log Files" - ) - foreach ($VolumeCache in $VolumeCaches) - { - New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force - } + # Windows upgrade log files + "Windows Upgrade Log Files" + ) + foreach ($VolumeCache in $VolumeCaches) + { + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force + } - $CleanupTask = @" + $CleanupTask = @" Get-Process -Name cleanmgr | Stop-Process -Force Get-Process -Name Dism | Stop-Process -Force Get-Process -Name DismHost | Stop-Process -Force @@ -7067,40 +7111,40 @@ while (`$true) `$Process.Start() | Out-Null "@ - # Create the "Windows Cleanup" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Parameters = @{ - TaskName = "Windows Cleanup" - TaskPath = "Sophia Script" - Principal = $Principal - Action = $Action - Description = $Localization.CleanupTaskDescription - Settings = $Settings - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Parameters = @{ + TaskName = "Windows Cleanup" + TaskPath = "Sophia Script" + Principal = $Principal + Action = $Action + Description = $Localization.CleanupTaskDescription + Settings = $Settings + } + Register-ScheduledTask @Parameters -Force - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) - { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast - if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) - { - New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force - } - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force + # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast + if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) + { + New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force + } + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force - # Start the "Windows Cleanup" task if the "Run" button clicked - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force + # Start the "Windows Cleanup" task if the "Run" button clicked + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force - $ToastNotification = @" + $ToastNotification = @" [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null @@ -7142,21 +7186,22 @@ while (`$true) [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Windows Cleanup Notification" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm - $Parameters = @{ - TaskName = "Windows Cleanup Notification" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription + # Create the "Windows Cleanup Notification" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm + $Parameters = @{ + TaskName = "Windows Cleanup Notification" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.CleanupNotificationTaskDescription + } + Register-ScheduledTask @Parameters -Force } - Register-ScheduledTask @Parameters -Force } "Delete" { @@ -7166,8 +7211,7 @@ while (`$true) Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -Force -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup" -Confirm:$false -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName "Windows Cleanup", "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore Remove-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Recurse -Force -ErrorAction Ignore } @@ -7219,14 +7263,16 @@ function SoftwareDistributionTask { "Register" { - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "SoftwareDistribution" -ErrorAction Ignore)) { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - $SoftwareDistributionTask = @" + $SoftwareDistributionTask = @" (Get-Service -Name wuauserv).WaitForStatus('Stopped', '01:00:00') Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -Force | Remove-Item -Recurse -Force @@ -7256,25 +7302,26 @@ Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -For [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "SoftwareDistribution" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm - $Parameters = @{ - TaskName = "SoftwareDistribution" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + # Create the "SoftwareDistribution" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm + $Parameters = @{ + TaskName = "SoftwareDistribution" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + } + Register-ScheduledTask @Parameters -Force } - Register-ScheduledTask @Parameters -Force } "Delete" { - Unregister-ScheduledTask -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore } } } @@ -7324,7 +7371,9 @@ function TempTask { "Register" { - $TempTask = @" + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Temp" -ErrorAction Ignore)) + { + $TempTask = @" Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Recurse -Force [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null @@ -7353,25 +7402,26 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Temp" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm - $Parameters = @{ - TaskName = "Temp" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" + # Create the "Temp" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm + $Parameters = @{ + TaskName = "Temp" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%TEMP%" + } + Register-ScheduledTask @Parameters -Force } - Register-ScheduledTask @Parameters -Force } "Delete" { - Unregister-ScheduledTask -TaskName Temp -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName Temp -Confirm:$false -ErrorAction Ignore } } } @@ -7420,14 +7470,14 @@ function NetworkProtection { "Enable" { - if ((Get-MpComputerStatus).AntivirusEnabled -eq $true) + if ((Get-MpComputerStatus).AntivirusEnabled) { Set-MpPreference -EnableNetworkProtection Enabled } } "Disable" { - if ((Get-MpComputerStatus).AntivirusEnabled -eq $true) + if ((Get-MpComputerStatus).AntivirusEnabled) { Set-MpPreference -EnableNetworkProtection Disabled } @@ -7477,14 +7527,14 @@ function PUAppsDetection { "Enable" { - if ((Get-MpComputerStatus).AntivirusEnabled -eq $true) + if ((Get-MpComputerStatus).AntivirusEnabled) { Set-MpPreference -PUAProtection Enabled } } "Disable" { - if ((Get-MpComputerStatus).AntivirusEnabled -eq $true) + if ((Get-MpComputerStatus).AntivirusEnabled) { Set-MpPreference -PUAProtection Disabled } @@ -7512,7 +7562,7 @@ function PUAppsDetection There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows .NOTES - Current user + Machine-wide #> function DefenderSandbox { @@ -7537,14 +7587,14 @@ function DefenderSandbox { "Enable" { - if ((Get-MpComputerStatus).AntivirusEnabled -eq $true) + if ((Get-MpComputerStatus).AntivirusEnabled) { setx /M MP_FORCE_USE_SANDBOX 1 } } "Disable" { - if ((Get-MpComputerStatus).AntivirusEnabled -eq $true) + if ((Get-MpComputerStatus).AntivirusEnabled) { setx /M MP_FORCE_USE_SANDBOX 0 } @@ -7677,10 +7727,10 @@ function CommandLineProcessAudit The "Process Creation" Event Viewer custom view .PARAMETER Enable - Create the "Process Creation" Event Viewer сustom view to log executed processes and their arguments + Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments .PARAMETER Disable - Remove the "Process Creation" Event Viewer custom view + Remove the "Process Creation" custom view in the Event Viewer .EXAMPLE EventViewerCustomView -Enable @@ -8075,10 +8125,10 @@ function WindowsSandbox { "Disable" { - if (Get-WindowsEdition -Online | Where-Object -FilterScript {$_.Edition -eq "Professional" -or $_.Edition -like "Enterprise*"}) + if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*")}) { # Checking whether x86 virtualization is enabled in the firmware - if ((Get-CimInstance -ClassName CIM_Processor).VirtualizationFirmwareEnabled -eq $true) + if ((Get-CimInstance -ClassName CIM_Processor).VirtualizationFirmwareEnabled) { Disable-WindowsOptionalFeature -FeatureName Containers-DisposableClientVM -Online -NoRestart } @@ -8087,7 +8137,7 @@ function WindowsSandbox try { # Determining whether Hyper-V is enabled - if ((Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent -eq $true) + if ((Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent) { Disable-WindowsOptionalFeature -FeatureName Containers-DisposableClientVM -Online -NoRestart } @@ -8101,10 +8151,10 @@ function WindowsSandbox } "Enable" { - if (Get-WindowsEdition -Online | Where-Object -FilterScript {$_.Edition -eq "Professional" -or $_.Edition -like "Enterprise*"}) + if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*")}) { # Checking whether x86 virtualization is enabled in the firmware - if ((Get-CimInstance -ClassName CIM_Processor).VirtualizationFirmwareEnabled -eq $true) + if ((Get-CimInstance -ClassName CIM_Processor).VirtualizationFirmwareEnabled) { Enable-WindowsOptionalFeature -FeatureName Containers-DisposableClientVM -All -Online -NoRestart } @@ -8113,7 +8163,7 @@ function WindowsSandbox try { # Determining whether Hyper-V is enabled - if ((Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent -eq $true) + if ((Get-CimInstance -ClassName CIM_ComputerSystem).HypervisorPresent) { Enable-WindowsOptionalFeature -FeatureName Containers-DisposableClientVM -All -Online -NoRestart } @@ -8969,61 +9019,6 @@ function MultipleInvokeContext } } } - -<# - .SYNOPSIS - The "Look for an app in the Microsoft Store" item in the "Open with" dialog - - .PARAMETER Hide - Hide the "Look for an app in the Microsoft Store" item in the "Open with" dialog - - .PARAMETER Show - Show the "Look for an app in the Microsoft Store" item in the "Open with" dialog - - .EXAMPLE - UseStoreOpenWith -Hide - - .EXAMPLE - UseStoreOpenWith -Show - - .NOTES - Current user -#> -function UseStoreOpenWith -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Hide" - )] - [switch] - $Hide, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Show" - )] - [switch] - $Show - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Hide" - { - if (-not (Test-Path -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) - { - New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force - } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force - } - "Show" - { - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore - } - } -} #endregion Context menu #region Refresh Environment diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Sophia.ps1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Sophia.ps1 index ecb5f4ee..3e17122f 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Sophia.ps1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2019/Sophia.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS Default preset file for "Sophia Script for Windows 10 LTSC 2019" - Version: v5.2.19 - Date: 27.02.2022 + Version: v5.2.20 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -71,7 +71,7 @@ param Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC v5.2.19 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC v5.2.20 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force @@ -221,11 +221,11 @@ HiddenItems -Enable # Не показывать скрытые файлы, папки и диски (значение по умолчанию) # HiddenItems -Disable -# Show the file name extensions +# Show file name extensions # Отобразить расширения имён файлов FileExtensions -Show -# Hide the file name extensions (default value) +# Hide file name extensions (default value) # Скрывать расширения имён файлов файлов (значение по умолчанию) # FileExtensions -Hide @@ -309,11 +309,11 @@ TaskViewButton -Hide # Отобразить кнопку Просмотра задач (значение по умолчанию) # TaskViewButton -Show -# Hide People button on the taskbar +# Hide People on the taskbar # Скрыть панель "Люди" на панели задач PeopleTaskbar -Hide -# Show People button on the taskbar (default value) +# Show People on the taskbar (default value) # Отобразить панель "Люди" на панели задач (значение по умолчанию) # PeopleTaskbar -Show @@ -481,12 +481,12 @@ Win32LongPathLimit -Disable # Включить ограничение Windows на 260 символов в пути (значение по умолчанию) # Win32LongPathLimit -Enable -# Display Stop error code when BSoD occurs -# Отображать код Stop-ошибки при появлении BSoD +# Display the Stop error information on the BSoD +# Отображать Stop-ошибку при появлении BSoD BSoDStopError -Enable -# Do not Stop error code when BSoD occurs (default value) -# Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию) +# Do not display the Stop error information on the BSoD (default value) +# Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию) # BSoDStopError -Disable # Choose when to be notified about changes to your computer: never notify @@ -691,12 +691,12 @@ NumLock -Enable # Включить Caps Lock (значение по умолчанию) # CapsLock -Enable -# Turn off pressing the Shift key 5 times to turn Sticky keys -# Выключить залипание клавиши Shift после 5 нажатий +# Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times +# Не разрешать включения залипания клавиши Shift после 5 нажатий StickyShift -Disable -# Turn on pressing the Shift key 5 times to turn Sticky keys (default value) -# Включить залипание клавиши Shift после 5 нажатий (значение по умолчанию) +# Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times (default value) +# Разрешать включения залипания клавиши Shift после 5 нажатий (значение по умолчанию) # StickyShift -Enable # Don't use AutoPlay for all media and devices @@ -881,7 +881,7 @@ CommandLineProcessAudit -Enable # CommandLineProcessAudit -Disable <# - Create the "Process Creation" Event Viewer сustom view to log executed processes and their arguments + Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов @@ -889,7 +889,7 @@ CommandLineProcessAudit -Enable #> EventViewerCustomView -Enable -# Remove "Process Creation" Event Viewer сustom view to log executed processes and their arguments (default value) +# Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value) # Удалить настаиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов (значение по умолчанию) # EventViewerCustomView -Disable @@ -954,7 +954,7 @@ MSIExtractContext -Show # Hide the "Extract all" item from the Windows Installer (.msi) context menu (default value) # Скрыть пункт "Извлечь все" из контекстного меню Windows Installer (.msi) (значение по умолчанию) -# MSIExtractContext -Remove +# MSIExtractContext -Hide # Show the "Install" item in the Cabinet (.cab) filenames extensions context menu # Отобразить пункт "Установить" в контекстное меню .cab архивов @@ -1059,14 +1059,6 @@ MultipleInvokeContext -Enable # Disable the "Open", "Print", and "Edit" context menu items for more than 15 items selected (default value) # Отключить элементы контекстного меню "Открыть", "Изменить" и "Печать" при выделении более 15 элементов (значение по умолчанию) # MultipleInvokeContext -Disable - -# Hide the "Look for an app in the Microsoft Store" item in the "Open with" dialog -# Скрыть пункт "Поиск приложения в Microsoft Store" в диалоге "Открыть с помощью" -UseStoreOpenWith -Hide - -# Show the "Look for an app in the Microsoft Store" item in the "Open with" dialog (default value) -# Отобразить пункт "Поиск приложения в Microsoft Store" в диалоге "Открыть с помощью" (значение по умолчанию) -# UseStoreOpenWith -Show #endregion Context menu <# diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Functions.ps1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Functions.ps1 index 70b11976..da627e46 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Functions.ps1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Functions.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS The TAB completion for functions and their arguments - Version: v5.12.11 - Date: 27.02.2022 + Version: v5.12.12 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -54,7 +54,7 @@ function Sophia Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.11 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.12 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/de-DE/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/de-DE/Sophia.psd1 index b77faf97..d6e7b8cb 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/de-DE/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/de-DE/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Sie versuchen ein Skript über Power UnsupportedISE = Das Skript unterstützt nicht die Ausführung über Windows PowerShell ISE Win10TweakerWarning = Wahrscheinlich wurde Ihr Betriebssystem über die Win 10 Tweaker-Hintertür infiziert Windows10DebloaterWarning = Die Stabilität des Windows-Betriebssystems kann durch die Verwendung des Windows10Debloater PowerShell-Skripts von Sycnex beeinträchtigt worden sein. Installieren Sie vorsorglich das gesamte Betriebssystem neu +RebootPending = Der PC wartet darauf, neu gestartet zu werden UnsupportedRelease = Neue Version gefunden CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen? ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/en-US/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/en-US/Sophia.psd1 index 8d86f8d8..70277ea5 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/en-US/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/en-US/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = You're trying to run script via Powe UnsupportedISE = The script doesn't support running via Windows PowerShell ISE Win10TweakerWarning = Probably your OS was infected via the Win 10 Tweaker backdoor Windows10DebloaterWarning = The Windows OS stability may have been compromised by using Sycnex's Windows10Debloater PowerShell script. Preventively, reinstall the entire OS +RebootPending = The PC is waiting to be restarted UnsupportedRelease = A new version found CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script? ControlledFolderAccessDisabled = Controlled folder access disabled diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/es-ES/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/es-ES/Sophia.psd1 index 28aaabbf..39354ff4 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/es-ES/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/es-ES/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Estás intentando ejecutar el script UnsupportedISE = El script no es compatible con la ejecución a través de Windows PowerShell ISE Win10TweakerWarning = Probablemente su sistema operativo fue infectado a través del backdoor Win 10 Tweaker Windows10DebloaterWarning = La estabilidad del sistema operativo Windows puede haberse visto comprometida al utilizar el script PowerShell Windows10Debloater de Sycnex. De forma preventiva, reinstale todo el sistema operativo +RebootPending = El PC está esperando a ser reiniciado UnsupportedRelease = Una nueva versión encontrada CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script? ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/fr-FR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/fr-FR/Sophia.psd1 index 654df0f8..76738525 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/fr-FR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/fr-FR/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Vous essayez d'exécuter le script v UnsupportedISE = Le script ne supporte pas l'exécution via Windows PowerShell ISE Win10TweakerWarning = Votre système d'exploitation a probablement été infecté par la porte dérobée Win 10 Tweaker Windows10DebloaterWarning = La stabilité de l'OS Windows peut avoir été compromise par l'utilisation du script PowerShell Windows10Debloater de Sycnex. De manière préventive, réinstallez l'ensemble de l'OS +RebootPending = Le PC attend d'être redémarré UnsupportedRelease = Nouvelle version trouvée CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script? ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/hu-HU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/hu-HU/Sophia.psd1 index 4522da15..8f028ec6 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/hu-HU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/hu-HU/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = A PowerShell {0}.{1} segítségével UnsupportedISE = A szkript nem támogatja a Windows PowerShell ISE futtatását Win10TweakerWarning = Valószínűleg az operációs rendszerét a Win 10 Tweaker backdoor segítségével fertőzték meg Windows10DebloaterWarning = A Windows operációs rendszer stabilitását veszélyeztethette a Sycnex Windows10Debloater PowerShell szkriptje. Megelőzésképpen telepítse újra a teljes operációs rendszert +RebootPending = A számítógép újraindításra vár UnsupportedRelease = Új verzió érhető el CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet? ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/it-IT/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/it-IT/Sophia.psd1 index f456e510..12b6af5a 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/it-IT/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/it-IT/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Stai cercando di eseguire lo script UnsupportedISE = Lo script non supporta l'esecuzione tramite Windows PowerShell ISE Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = La stabilità del sistema operativo Windows potrebbe essere stata compromessa dall'utilizzo dello script PowerShell Windows10Debloater di Sycnex. Preventivamente, reinstallare l'intero sistema operativo +RebootPending = Il PC è in attesa di essere riavviato UnsupportedRelease = Nuova versione trovata CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file delle preimpostazioni {0} prima di eseguire Sophia Script? ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/pt-BR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/pt-BR/Sophia.psd1 index 5ffb9f0e..288874b2 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/pt-BR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/pt-BR/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Você está tentando executar o scri UnsupportedISE = O guião não suporta a execução através do Windows PowerShell ISE Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = A estabilidade do sistema operacional Windows pode ter sido comprometida pela utilização do script Windows10Debloater PowerShell da Sycnex. Preventivamente, reinstale todo o sistema operacional +RebootPending = O PC está esperando para ser reiniciado UnsupportedRelease = Nova versão encontrada CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script? ControlledFolderAccessDisabled = Acesso controlado a pasta desativada diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/ru-RU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/ru-RU/Sophia.psd1 index d90497bc..bafea7c3 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/ru-RU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/ru-RU/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Вы пытаетесь запуст UnsupportedISE = Скрипт не поддерживает работу через Windows PowerShell ISE Win10TweakerWarning = Ваша ОС, возможно, через бэкдор в Win 10 Tweaker была заражена трояном. Подробнее: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабильность Вашей ОС могла быть нарушена использованием скрипта Windows10Debloater от Sycnex. В целях профилактики переустановите ОС +RebootPending = Компьютер ожидает перезагрузки UnsupportedRelease = Обнаружена новая версия CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/tr-TR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/tr-TR/Sophia.psd1 index e2c9fbe0..e580cf94 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/tr-TR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/tr-TR/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Komut dosyasını PowerShell {0}.{1} UnsupportedISE = Komut dosyası, Windows PowerShell ISE üzerinden çalıştırmayı desteklemiyor Win10TweakerWarning = Muhtemelen işletim sisteminize Win 10 Tweaker arka kapısı yoluyla bulaştı Windows10DebloaterWarning = Windows işletim sistemi kararlılığı, Sycnex'in Windows10Debloater PowerShell betiği kullanılarak tehlikeye atılmış olabilir. Önleyici olarak, tüm işletim sistemini yeniden yükleyin +RebootPending = PC yeniden başlatılmayı bekliyor UnsupportedRelease = Yeni sürüm bulundu CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi? ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/uk-UA/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/uk-UA/Sophia.psd1 index b291f529..61628955 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/uk-UA/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/uk-UA/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Ви намагаєтеся запу UnsupportedISE = Скрипт не підтримує роботу через Windows PowerShell ISE Win10TweakerWarning = Ваша ОС, можливо, через бекдор в Win 10 Tweaker заражена трояном. Детальніше: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабільність вашої ОС могла бути порушена використанням скрипту Windows10Debloater від Sycnex. З метою профілактики перевстановіть ОС +RebootPending = Комп'ютер очікує на перезавантаження. UnsupportedRelease = Виявлено нову версію CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/zh-CN/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/zh-CN/Sophia.psd1 index 0b34ac5c..3d88f39d 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/zh-CN/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Localizations/zh-CN/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = 你想通过PowerShell {0}.{1}运行 UnsupportedISE = 该脚本不支持通过Windows PowerShell ISE运行 Win10TweakerWarning = 可能你的操作系统是通过“Win 10 Tweaker”后门感染的 Windows10DebloaterWarning = 使用Sycnex的Windows10Debloater PowerShell脚本,Windows操作系统的稳定性可能已经受到影响。预防性地,重新安装整个操作系统 +RebootPending = 计算机正在等待重新启动 UnsupportedRelease = 找到新版本 CustomizationWarning = \n在运行Sophia Script之前,您是否已自定义{0}预设文件中的每个函数? ControlledFolderAccessDisabled = “受控文件夹访问”已禁用 diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Manifest/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Manifest/Sophia.psd1 index 0a60d535..185b3b8b 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Manifest/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Manifest/Sophia.psd1 @@ -1,6 +1,6 @@ @{ RootModule = '..\Module\Sophia.psm1' - ModuleVersion = '5.12.11' + ModuleVersion = '5.12.12' GUID = '109cc881-c42b-45af-a74a-550781989d6a' Author = 'Dmitry "farag" Nefedov' Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved' diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Module/Sophia.psm1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Module/Sophia.psm1 index 50b2b5c2..cb0d3707 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Module/Sophia.psm1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Module/Sophia.psm1 @@ -2,8 +2,8 @@ .SYNOPSIS Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks - Version: v5.12.11 - Date: 27.02.2022 + Version: v5.12.12 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -73,6 +73,23 @@ function Checkings $false { Write-Warning -Message $Localization.UnsupportedOSBuild + + # Enable receiving updates for other Microsoft products when you update Windows + (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + + Start-Sleep -Seconds 1 + + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + + # Open the "Windows Update" page + Start-Process -FilePath "ms-settings:windowsupdate-action" + + Start-Sleep -Seconds 1 + + # Trigger Windows Update for detecting new updates + (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() + exit } } @@ -85,7 +102,7 @@ function Checkings $Version = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR Write-Warning -Message ($Localization.UpdateWarning -f $Version) - # Receive updates for other Microsoft products when you update Windows + # Enable receiving updates for other Microsoft products when you update Windows (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") Start-Sleep -Seconds 1 @@ -143,7 +160,7 @@ function Checkings exit } - # Check whether the OS was infected by Win 10 Tweaker's trojan + # Check whether the OS was infected by the Win 10 Tweaker's trojan # https://win10tweaker.ru if (Test-Path -Path "HKCU:\Software\Win 10 Tweaker") { @@ -163,6 +180,22 @@ function Checkings exit } + # Check for a pending reboot + $PendingActions = @( + # CBS pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending", + # Windows Update pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" + ) + if ($null -ne (Get-Item -Path $PendingActions -Force -ErrorAction Ignore)) + { + Write-Warning -Message $Localization.RebootPending + exit + } + # Check if the current module version is the latest one try { @@ -1950,13 +1983,13 @@ function TaskViewButton <# .SYNOPSIS - People button on the taskbar + People on the taskbar .PARAMETER Hide - Hide People button on the taskbar + Hide People on the taskbar .PARAMETER Show - Show People button on the taskbar + Show People on the taskbar .EXAMPLE PeopleTaskbar -Hide @@ -6229,13 +6262,13 @@ function CapsLock <# .SYNOPSIS - The keyboard schortcut for Stick keys + The shortcut to start Sticky Keys .PARAMETER Disable - Turn off pressing the Shift key 5 times to turn Sticky keys + Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times .PARAMETER Enable - Turn on pressing the Shift key 5 times to turn Sticky keys + Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times .EXAMPLE StickyShift -Disable @@ -7268,16 +7301,25 @@ function InstallVCRedistx64 { $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $Parameters = @{ - Uri = "https://aka.ms/vs/16/release/vc_redist.x64.exe" - OutFile = "$DownloadsFolder\vc_redist.x64.exe" + Uri = "https://aka.ms/vs/17/release/VC_redist.x64.exe" + OutFile = "$DownloadsFolder\VC_redist.x64.exe" UseBasicParsing = $true Verbose = $true } Invoke-WebRequest @Parameters - Start-Process -FilePath "$DownloadsFolder\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\VC_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait - Remove-Item -Path "$DownloadsFolder\vc_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force -ErrorAction Ignore + <# + PowerShell 5.1 (7.2 too) interprets the 8.3 file name literally, if an environment variable contains a non-latin word, + so you won't be able to remove "$env:TEMP\dd_vcredist_amd64_*.log" file explicitly + + Another ways to get normal path to %TEMP% + [Environment]::GetEnvironmentVariable("TEMP", "User") + (Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP + [System.IO.Path]::GetTempPath() + #> + Get-ChildItem -Path "$DownloadsFolder\VC_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore } #endregion System @@ -8100,41 +8142,43 @@ function CleanupTask { "Register" { - Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { - Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore - } + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Windows Cleanup" -ErrorAction Ignore)) + { + Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { + Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore + } - $VolumeCaches = @( - # Delivery Optimization Files - "Delivery Optimization Files", + $VolumeCaches = @( + # Delivery Optimization Files + "Delivery Optimization Files", - # Device driver packages - "Device Driver Packages", + # Device driver packages + "Device Driver Packages", - # Previous Windows Installation(s) - "Previous Installations", + # Previous Windows Installation(s) + "Previous Installations", - # Setup log files - "Setup Log Files", + # Setup log files + "Setup Log Files", - # Temporary Setup Files - "Temporary Setup Files", + # Temporary Setup Files + "Temporary Setup Files", - # Windows Update Cleanup - "Update Cleanup", + # Windows Update Cleanup + "Update Cleanup", - # Microsoft Defender - "Windows Defender", + # Microsoft Defender + "Windows Defender", - # Windows upgrade log files - "Windows Upgrade Log Files" - ) - foreach ($VolumeCache in $VolumeCaches) - { - New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force - } + # Windows upgrade log files + "Windows Upgrade Log Files" + ) + foreach ($VolumeCache in $VolumeCaches) + { + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force + } - $CleanupTask = @" + $CleanupTask = @" Get-Process -Name cleanmgr | Stop-Process -Force Get-Process -Name Dism | Stop-Process -Force Get-Process -Name DismHost | Stop-Process -Force @@ -8202,40 +8246,40 @@ while (`$true) `$Process.Start() | Out-Null "@ - # Create the "Windows Cleanup" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Parameters = @{ - TaskName = "Windows Cleanup" - TaskPath = "Sophia Script" - Principal = $Principal - Action = $Action - Description = $Localization.CleanupTaskDescription - Settings = $Settings - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Parameters = @{ + TaskName = "Windows Cleanup" + TaskPath = "Sophia Script" + Principal = $Principal + Action = $Action + Description = $Localization.CleanupTaskDescription + Settings = $Settings + } + Register-ScheduledTask @Parameters -Force - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) - { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast - if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) - { - New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force - } - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force + # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast + if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) + { + New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force + } + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force - # Start the "Windows Cleanup" task if the "Run" button clicked - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force + # Start the "Windows Cleanup" task if the "Run" button clicked + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force - $ToastNotification = @" + $ToastNotification = @" [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null @@ -8277,21 +8321,22 @@ while (`$true) [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Windows Cleanup Notification" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm - $Parameters = @{ - TaskName = "Windows Cleanup Notification" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup Notification" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm + $Parameters = @{ + TaskName = "Windows Cleanup Notification" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.CleanupNotificationTaskDescription + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { @@ -8301,8 +8346,7 @@ while (`$true) Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -Force -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup" -Confirm:$false -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName "Windows Cleanup", "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore Remove-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Recurse -Force -ErrorAction Ignore } @@ -8354,14 +8398,16 @@ function SoftwareDistributionTask { "Register" { - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "SoftwareDistribution" -ErrorAction Ignore)) { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - $SoftwareDistributionTask = @" + $SoftwareDistributionTask = @" (Get-Service -Name wuauserv).WaitForStatus('Stopped', '01:00:00') Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -Force | Remove-Item -Recurse -Force @@ -8391,25 +8437,26 @@ Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -For [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "SoftwareDistribution" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm - $Parameters = @{ - TaskName = "SoftwareDistribution" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" - } - Register-ScheduledTask @Parameters -Force + # Create the "SoftwareDistribution" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm + $Parameters = @{ + TaskName = "SoftwareDistribution" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore } } } @@ -8459,7 +8506,9 @@ function TempTask { "Register" { - $TempTask = @" + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Temp" -ErrorAction Ignore)) + { + $TempTask = @" Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Recurse -Force [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null @@ -8488,25 +8537,26 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Temp" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm - $Parameters = @{ - TaskName = "Temp" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" - } - Register-ScheduledTask @Parameters -Force + # Create the "Temp" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm + $Parameters = @{ + TaskName = "Temp" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%TEMP%" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName Temp -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName Temp -Confirm:$false -ErrorAction Ignore } } } @@ -8647,7 +8697,7 @@ function PUAppsDetection There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows .NOTES - Current user + Machine-wide #> function DefenderSandbox { @@ -8812,10 +8862,10 @@ function CommandLineProcessAudit The "Process Creation" Event Viewer custom view .PARAMETER Enable - Create the "Process Creation" Event Viewer сustom view to log executed processes and their arguments + Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments .PARAMETER Disable - Remove the "Process Creation" Event Viewer custom view + Remove the "Process Creation" custom view in the Event Viewer .EXAMPLE EventViewerCustomView -Enable diff --git a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Sophia.ps1 b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Sophia.ps1 index 669406e0..08274f93 100644 --- a/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Sophia.ps1 +++ b/Sophia Script/Sophia Script for Windows 10 LTSC 2021/Sophia.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS Default preset file for "Sophia Script for Windows 10 LTSC 2021" - Version: v5.12.11 - Date: 27.02.2022 + Version: v5.12.12 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -71,7 +71,7 @@ param Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.11 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.12 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force @@ -332,11 +332,11 @@ TaskViewButton -Hide # Отобразить кнопку Просмотра задач (значение по умолчанию) # TaskViewButton -Show -# Hide People button on the taskbar +# Hide People on the taskbar # Скрыть панель "Люди" на панели задач PeopleTaskbar -Hide -# Show People button on the taskbar (default value) +# Show People on the taskbar (default value) # Отобразить панель "Люди" на панели задач (значение по умолчанию) # PeopleTaskbar -Show @@ -764,12 +764,12 @@ NumLock -Enable # Включить Caps Lock (значение по умолчанию) # CapsLock -Enable -# Turn off pressing the Shift key 5 times to turn Sticky keys -# Выключить залипание клавиши Shift после 5 нажатий +# Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times +# Не разрешать включения залипания клавиши Shift после 5 нажатий StickyShift -Disable -# Turn on pressing the Shift key 5 times to turn Sticky keys (default value) -# Включить залипание клавиши Shift после 5 нажатий (значение по умолчанию) +# Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times (default value) +# Разрешать включения залипания клавиши Shift после 5 нажатий (значение по умолчанию) # StickyShift -Enable # Don't use AutoPlay for all media and devices @@ -1012,7 +1012,7 @@ CommandLineProcessAudit -Enable # CommandLineProcessAudit -Disable <# - Create the "Process Creation" Event Viewer сustom view to log executed processes and their arguments + Create the "Process Creation" сustom view in the Event Viewer to log executed processes and their arguments In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled Создать настраиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов @@ -1020,7 +1020,7 @@ CommandLineProcessAudit -Enable #> EventViewerCustomView -Enable -# Remove "Process Creation" Event Viewer сustom view to log executed processes and their arguments (default value) +# Remove the "Process Creation" custom view in the Event Viewer to log executed processes and their arguments (default value) # Удалить настаиваемое представление "Создание процесса" в Просмотре событий для журналирования запускаемых процессов и их аргументов (значение по умолчанию) # EventViewerCustomView -Disable @@ -1085,7 +1085,7 @@ MSIExtractContext -Show # Hide the "Extract all" item from the Windows Installer (.msi) context menu (default value) # Скрыть пункт "Извлечь все" из контекстного меню Windows Installer (.msi) (значение по умолчанию) -# MSIExtractContext -Remove +# MSIExtractContext -Hide # Show the "Install" item in the Cabinet (.cab) filenames extensions context menu # Отобразить пункт "Установить" в контекстное меню .cab архивов diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Functions.ps1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Functions.ps1 index abc5c3b0..d1f8c411 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Functions.ps1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Functions.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS The TAB completion for functions and their arguments - Version: v5.12.12 - Date: 27.02.2022 + Version: v5.12.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -54,7 +54,7 @@ function Sophia Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.12 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.14 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/de-DE/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/de-DE/Sophia.psd1 index a445fe6d..49d857ec 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/de-DE/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/de-DE/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = Das Skript unterstützt nicht die Au Win10TweakerWarning = Wahrscheinlich wurde Ihr Betriebssystem über die Win 10 Tweaker-Hintertür infiziert Windows10DebloaterWarning = Die Stabilität des Windows-Betriebssystems kann durch die Verwendung des Windows10Debloater PowerShell-Skripts von Sycnex beeinträchtigt worden sein. Installieren Sie vorsorglich das gesamte Betriebssystem neu PowerShellLibraries = Im Ordner "Libraries" befinden sich keine Dateien. Bitte das Archiv erneut herunterladen +RebootPending = Der PC wartet darauf, neu gestartet zu werden UnsupportedRelease = Neue Version gefunden CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen? ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/en-US/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/en-US/Sophia.psd1 index c28a1c03..69f820f9 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/en-US/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/en-US/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = The script doesn't support running v Win10TweakerWarning = Probably your OS was infected via the Win 10 Tweaker backdoor Windows10DebloaterWarning = The Windows OS stability may have been compromised by using Sycnex's Windows10Debloater PowerShell script. Preventively, reinstall the entire OS PowerShellLibraries = There are no files in the Libraries folder. Please, re-download the archive +RebootPending = The PC is waiting to be restarted UnsupportedRelease = A new version found CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script? ControlledFolderAccessDisabled = Controlled folder access disabled diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/es-ES/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/es-ES/Sophia.psd1 index d587830c..6ab031b8 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/es-ES/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/es-ES/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = El script no es compatible con la ej Win10TweakerWarning = Probablemente su sistema operativo fue infectado a través del backdoor Win 10 Tweaker Windows10DebloaterWarning = La estabilidad del sistema operativo Windows puede haberse visto comprometida al utilizar el script PowerShell Windows10Debloater de Sycnex. De forma preventiva, reinstale todo el sistema operativo PowerShellLibraries = No hay archivos en la carpeta Libraries. Por favor, vuelva a descargar el archivo +RebootPending = El PC está esperando a ser reiniciado UnsupportedRelease = Una nueva versión encontrada CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script? ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/fr-FR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/fr-FR/Sophia.psd1 index d171f3f5..1682c87d 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/fr-FR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/fr-FR/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = Le script ne supporte pas l'exécuti Win10TweakerWarning = Votre système d'exploitation a probablement été infecté par la porte dérobée Win 10 Tweaker Windows10DebloaterWarning = La stabilité de l'OS Windows peut avoir été compromise par l'utilisation du script PowerShell Windows10Debloater de Sycnex. De manière préventive, réinstallez l'ensemble de l'OS PowerShellLibraries = Il n'y a pas de fichiers dans le dossier Libraries. Veuillez retélécharger l'archive +RebootPending = Le PC attend d'être redémarré UnsupportedRelease = Nouvelle version trouvée CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script? ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/hu-HU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/hu-HU/Sophia.psd1 index 8322f982..bbc4056e 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/hu-HU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/hu-HU/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = A szkript nem támogatja a Windows P Win10TweakerWarning = Valószínűleg az operációs rendszerét a Win 10 Tweaker backdoor segítségével fertőzték meg Windows10DebloaterWarning = A Windows operációs rendszer stabilitását veszélyeztethette a Sycnex Windows10Debloater PowerShell szkriptje. Megelőzésképpen telepítse újra a teljes operációs rendszert PowerShellLibraries = A Libraries mappában nincsenek fájlok. Kérjük, töltse le újra az archívumot +RebootPending = A számítógép újraindításra vár UnsupportedRelease = Új verzió érhető el CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet? ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/it-IT/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/it-IT/Sophia.psd1 index 9648a884..f7de40e9 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/it-IT/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/it-IT/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = Lo script non supporta l'esecuzione Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = La stabilità del sistema operativo Windows potrebbe essere stata compromessa dall'utilizzo dello script PowerShell Windows10Debloater di Sycnex. Preventivamente, reinstallare l'intero sistema operativo PowerShellLibraries = Non ci sono file nella cartella Libraries. Per favore, scarica di nuovo l'archivio +RebootPending = Il PC è in attesa di essere riavviato UnsupportedRelease = Nuova versione trovata CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file delle preimpostazioni {0} prima di eseguire Sophia Script? ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/pt-BR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/pt-BR/Sophia.psd1 index 3a04d76a..cf3fb64b 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/pt-BR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/pt-BR/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = O guião não suporta a execução a Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = A estabilidade do sistema operacional Windows pode ter sido comprometida pela utilização do script Windows10Debloater PowerShell da Sycnex. Preventivamente, reinstale todo o sistema operacional PowerShellLibraries = Não existem ficheiros na pasta Libraries. Por favor, volte a descarregar o arquivo +RebootPending = O PC está esperando para ser reiniciado UnsupportedRelease = Nova versão encontrada CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script? ControlledFolderAccessDisabled = Acesso controlado a pasta desativada diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/ru-RU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/ru-RU/Sophia.psd1 index 13c296f4..7e1121b6 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/ru-RU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/ru-RU/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = Скрипт не поддержив Win10TweakerWarning = Ваша ОС, возможно, через бэкдор в Win 10 Tweaker была заражена трояном. Подробнее: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабильность Вашей ОС могла быть нарушена использованием скрипта Windows10Debloater от Sycnex. В целях профилактики переустановите ОС PowerShellLibraries = В папке Libraries отсутствутствуют файлы. Пожалуйста, перекачайте архив +RebootPending = Компьютер ожидает перезагрузки UnsupportedRelease = Обнаружена новая версия CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/tr-TR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/tr-TR/Sophia.psd1 index 98a3cb12..516a865f 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/tr-TR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/tr-TR/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = Komut dosyası, Windows PowerShell I Win10TweakerWarning = Muhtemelen işletim sisteminize Win 10 Tweaker arka kapısı yoluyla bulaştı Windows10DebloaterWarning = Windows işletim sistemi kararlılığı, Sycnex'in Windows10Debloater PowerShell betiği kullanılarak tehlikeye atılmış olabilir. Önleyici olarak, tüm işletim sistemini yeniden yükleyin PowerShellLibraries = Libraries klasöründe dosya yok. Lütfen arşivi yeniden indirin +RebootPending = PC yeniden başlatılmayı bekliyor UnsupportedRelease = Yeni sürüm bulundu CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi? ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/uk-UA/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/uk-UA/Sophia.psd1 index e655f5a2..a74fae2a 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/uk-UA/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/uk-UA/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = Скрипт не підтримує Win10TweakerWarning = Ваша ОС, можливо, через бекдор в Win 10 Tweaker заражена трояном. Детальніше: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабільність вашої ОС могла бути порушена використанням скрипту Windows10Debloater від Sycnex. З метою профілактики перевстановіть ОС PowerShellLibraries = У папці Libraries немає файлів. Будь ласка, повторно завантажте архів +RebootPending = Комп'ютер очікує на перезавантаження UnsupportedRelease = Виявлено нову версію CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/zh-CN/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/zh-CN/Sophia.psd1 index bd156071..26e8fa1a 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/zh-CN/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Localizations/zh-CN/Sophia.psd1 @@ -9,6 +9,7 @@ UnsupportedISE = 该脚本不支持通过Windows Powe Win10TweakerWarning = 可能你的操作系统是通过“Win 10 Tweaker”后门感染的 Windows10DebloaterWarning = 使用Sycnex的Windows10Debloater PowerShell脚本,Windows操作系统的稳定性可能已经受到影响。预防性地,重新安装整个操作系统 PowerShellLibraries = Libraries文件夹中没有文件。请重新下载该档案 +RebootPending = 计算机正在等待重新启动 UnsupportedRelease = 找到新版本 CustomizationWarning = \n在运行Sophia Script之前,您是否已自定义{0}预设文件中的每个函数? ControlledFolderAccessDisabled = “受控文件夹访问”已禁用 diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Manifest/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Manifest/Sophia.psd1 index 4bab772a..a2beb017 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Manifest/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Manifest/Sophia.psd1 @@ -1,11 +1,11 @@ @{ RootModule = '..\Module\Sophia.psm1' - ModuleVersion = '5.12.12' + ModuleVersion = '5.12.14' GUID = 'aa0b47a7-1770-4b5d-8c9f-cc6c505bcc7a' Author = 'Dmitry "farag" Nefedov' Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved' Description = 'Module for Windows fine-tuning and automating the routine tasks' - PowerShellVersion = '7.1' + PowerShellVersion = '7.2' ProcessorArchitecture = 'AMD64' FunctionsToExport = '*' diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Module/Sophia.psm1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Module/Sophia.psm1 index ae427f17..3f5a7b96 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Module/Sophia.psm1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Module/Sophia.psm1 @@ -2,8 +2,8 @@ .SYNOPSIS Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks - Version: v5.12.12 - Date: 27.02.2022 + Version: v5.12.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -14,9 +14,9 @@ Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring .NOTES - Supported Windows 10 versions + Minimum Supported Windows 10 versions Versions: 2004/20H2/21H1/21H2 - Builds: 19041/19042/19043/19044 + Build: 1904x.1151 Editions: Home/Pro/Enterprise Architecture: x64 @@ -73,6 +73,23 @@ function Checkings $false { Write-Warning -Message $Localization.UnsupportedOSBuild + + # Enable receiving updates for other Microsoft products when you update Windows + (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + + Start-Sleep -Seconds 1 + + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + + # Open the "Windows Update" page + Start-Process -FilePath "ms-settings:windowsupdate-action" + + Start-Sleep -Seconds 1 + + # Trigger Windows Update for detecting new updates + (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() + exit } } @@ -85,11 +102,14 @@ function Checkings $Version = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR Write-Warning -Message ($Localization.UpdateWarning -f $Version) - # Receive updates for other Microsoft products when you update Windows + # Enable receiving updates for other Microsoft products when you update Windows (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") Start-Sleep -Seconds 1 + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + # Open the "Windows Update" page Start-Process -FilePath "ms-settings:windowsupdate-action" @@ -143,7 +163,7 @@ function Checkings exit } - # Check whether the OS was infected by Win 10 Tweaker's trojan + # Check whether the OS was infected by the Win 10 Tweaker's trojan # https://win10tweaker.ru if (Test-Path -Path "HKCU:\Software\Win 10 Tweaker") { @@ -176,6 +196,22 @@ function Checkings exit } + # Check for a pending reboot + $PendingActions = @( + # CBS pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending", + # Windows Update pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" + ) + if ($null -ne (Get-Item -Path $PendingActions -Force -ErrorAction Ignore)) + { + Write-Warning -Message $Localization.RebootPending + exit + } + # Check if the current module version is the latest one try { @@ -1119,13 +1155,13 @@ function WindowsWelcomeExperience <# .SYNOPSIS - Getting tip, trick, and suggestions as you use Windows + Getting tips, tricks, and suggestions as you use Windows .PARAMETER Enable - Get tip, trick, and suggestions as you use Windows + Get tips, tricks, and suggestions as you use Windows .PARAMETER Disable - Do not get tip, trick, and suggestions as you use Windows + Do not get tips, tricks, and suggestions as you use Windows .EXAMPLE WindowsTips -Enable @@ -2361,13 +2397,13 @@ function TaskViewButton <# .SYNOPSIS - People button on the taskbar + People on the taskbar .PARAMETER Hide - Hide People button on the taskbar + Hide People on the taskbar .PARAMETER Show - Show People button on the taskbar + Show People on the taskbar .EXAMPLE PeopleTaskbar -Hide @@ -7172,13 +7208,13 @@ function CapsLock <# .SYNOPSIS - The keyboard schortcut for Stick keys + The shortcut to start Sticky Keys .PARAMETER Disable - Turn off pressing the Shift key 5 times to turn Sticky keys + Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times .PARAMETER Enable - Turn on pressing the Shift key 5 times to turn Sticky keys + Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times .EXAMPLE StickyShift -Disable @@ -8196,7 +8232,7 @@ public static void Refresh() <# .SYNOPSIS - Uninstall the "PC Health Check" app + Uninstall the "PC Health Check" app and prevent it from installing in the future .EXAMPLE UninstallPCHealthCheck @@ -8224,6 +8260,13 @@ function UninstallPCHealthCheck break } } + + # Prevent the "PC Health Check" app from installing in the future + if (-not (Test-Path -Path HKLM:\SOFTWARE\Microsoft\PCHC)) + { + New-Item -Path HKLM:\SOFTWARE\Microsoft\PCHC -Force + } + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\PCHC -Name PreviousUninstall -PropertyType DWord -Value 1 -Force } <# @@ -8243,16 +8286,25 @@ function InstallVCRedistx64 { $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $Parameters = @{ - Uri = "https://aka.ms/vs/16/release/vc_redist.x64.exe" - OutFile = "$DownloadsFolder\vc_redist.x64.exe" + Uri = "https://aka.ms/vs/17/release/VC_redist.x64.exe" + OutFile = "$DownloadsFolder\VC_redist.x64.exe" UseBasicParsing = $true Verbose = $true } Invoke-WebRequest @Parameters - Start-Process -FilePath "$DownloadsFolder\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\VC_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + + <# + PowerShell 5.1 (7.2 too) interprets the 8.3 file name literally, if an environment variable contains a non-latin word, + so you won't be able to remove "$env:TEMP\dd_vcredist_amd64_*.log" file explicitly - Remove-Item -Path "$DownloadsFolder\vc_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force -ErrorAction Ignore + Another ways to get normal path to %TEMP% + [Environment]::GetEnvironmentVariable("TEMP", "User") + (Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP + [System.IO.Path]::GetTempPath() + #> + Get-ChildItem -Path "$DownloadsFolder\VC_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore } #endregion System @@ -10298,41 +10350,43 @@ function CleanupTask { "Register" { - Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { - Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore - } + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Windows Cleanup" -ErrorAction Ignore)) + { + Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { + Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore + } - $VolumeCaches = @( - # Delivery Optimization Files - "Delivery Optimization Files", + $VolumeCaches = @( + # Delivery Optimization Files + "Delivery Optimization Files", - # Device driver packages - "Device Driver Packages", + # Device driver packages + "Device Driver Packages", - # Previous Windows Installation(s) - "Previous Installations", + # Previous Windows Installation(s) + "Previous Installations", - # Setup log files - "Setup Log Files", + # Setup log files + "Setup Log Files", - # Temporary Setup Files - "Temporary Setup Files", + # Temporary Setup Files + "Temporary Setup Files", - # Windows Update Cleanup - "Update Cleanup", + # Windows Update Cleanup + "Update Cleanup", - # Microsoft Defender - "Windows Defender", + # Microsoft Defender + "Windows Defender", - # Windows upgrade log files - "Windows Upgrade Log Files" - ) - foreach ($VolumeCache in $VolumeCaches) - { - New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force - } + # Windows upgrade log files + "Windows Upgrade Log Files" + ) + foreach ($VolumeCache in $VolumeCaches) + { + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force + } - $CleanupTask = @" + $CleanupTask = @" Get-Process -Name cleanmgr | Stop-Process -Force Get-Process -Name Dism | Stop-Process -Force Get-Process -Name DismHost | Stop-Process -Force @@ -10400,40 +10454,40 @@ while (`$true) `$Process.Start() | Out-Null "@ - # Create the "Windows Cleanup" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Parameters = @{ - TaskName = "Windows Cleanup" - TaskPath = "Sophia Script" - Principal = $Principal - Action = $Action - Description = $Localization.CleanupTaskDescription - Settings = $Settings - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Parameters = @{ + TaskName = "Windows Cleanup" + TaskPath = "Sophia Script" + Principal = $Principal + Action = $Action + Description = $Localization.CleanupTaskDescription + Settings = $Settings + } + Register-ScheduledTask @Parameters -Force - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) - { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast - if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) - { - New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force - } - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force + # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast + if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) + { + New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force + } + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force - # Start the "Windows Cleanup" task if the "Run" button clicked - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force + # Start the "Windows Cleanup" task if the "Run" button clicked + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force - $ToastNotification = @" + $ToastNotification = @" [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null @@ -10475,21 +10529,22 @@ while (`$true) [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Windows Cleanup Notification" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm - $Parameters = @{ - TaskName = "Windows Cleanup Notification" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup Notification" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm + $Parameters = @{ + TaskName = "Windows Cleanup Notification" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.CleanupNotificationTaskDescription + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { @@ -10499,8 +10554,7 @@ while (`$true) Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -Force -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup" -Confirm:$false -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName "Windows Cleanup", "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore Remove-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Recurse -Force -ErrorAction Ignore } @@ -10552,14 +10606,16 @@ function SoftwareDistributionTask { "Register" { - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "SoftwareDistribution" -ErrorAction Ignore)) { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - $SoftwareDistributionTask = @" + $SoftwareDistributionTask = @" (Get-Service -Name wuauserv).WaitForStatus('Stopped', '01:00:00') Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -Force | Remove-Item -Recurse -Force @@ -10589,25 +10645,26 @@ Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -For [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "SoftwareDistribution" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm - $Parameters = @{ - TaskName = "SoftwareDistribution" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" - } - Register-ScheduledTask @Parameters -Force + # Create the "SoftwareDistribution" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm + $Parameters = @{ + TaskName = "SoftwareDistribution" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore } } } @@ -10657,7 +10714,9 @@ function TempTask { "Register" { - $TempTask = @" + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Temp" -ErrorAction Ignore)) + { + $TempTask = @" Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Recurse -Force [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null @@ -10686,25 +10745,26 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Temp" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm - $Parameters = @{ - TaskName = "Temp" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" - } - Register-ScheduledTask @Parameters -Force + # Create the "Temp" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm + $Parameters = @{ + TaskName = "Temp" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%TEMP%" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName Temp -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName Temp -Confirm:$false -ErrorAction Ignore } } } @@ -12524,15 +12584,15 @@ function UseStoreOpenWith { "Hide" { - if (-not (Test-Path -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) + if (-not (Test-Path -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) { - New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force + New-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force } "Show" { - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore } } } diff --git a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Sophia.ps1 b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Sophia.ps1 index bbdfb7a4..eeff669e 100644 --- a/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Sophia.ps1 +++ b/Sophia Script/Sophia Script for Windows 10 PowerShell 7/Sophia.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS Default preset file for "Sophia Script for Windows 10 (PowerShell 7)" - Version: v5.12.12 - Date: 27.02.2022 + Version: v5.12.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -25,9 +25,9 @@ irm script.sophi.app | iex .NOTES - Supported Windows 10 versions + Minimum Supported Windows 10 versions Versions: 2004/20H2/21H1/21H2 - Builds: 19041/19042/19043/19044 + Build: 1904x.1151 Editions: Home/Pro/Enterprise Architecture: x64 @@ -71,7 +71,7 @@ param Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.12 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.14 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force @@ -392,11 +392,11 @@ TaskViewButton -Hide # Отобразить кнопку Просмотра задач (значение по умолчанию) # TaskViewButton -Show -# Hide People button on the taskbar +# Hide People on the taskbar # Скрыть панель "Люди" на панели задач PeopleTaskbar -Hide -# Show People button on the taskbar (default value) +# Show People on the taskbar (default value) # Отобразить панель "Люди" на панели задач (значение по умолчанию) # PeopleTaskbar -Show @@ -548,7 +548,7 @@ AeroShaking -Enable #region OneDrive # Uninstall OneDrive. The OneDrive user folder won't be removed # Удалить OneDrive. Папка пользователя OneDrive не будет удалена -OneDrive -Uninstall +# OneDrive -Uninstall # Install OneDrive 64-bit (default value) # Установить OneDrive 64-бит (значение по умолчанию) @@ -606,12 +606,12 @@ Win32LongPathLimit -Disable # Включить ограничение Windows на 260 символов в пути (значение по умолчанию) # Win32LongPathLimit -Enable -# Display Stop error code when BSoD occurs -# Отображать код Stop-ошибки при появлении BSoD +# Display the Stop error information on the BSoD +# Отображать Stop-ошибку при появлении BSoD BSoDStopError -Enable -# Do not Stop error code when BSoD occurs (default value) -# Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию) +# Do not display the Stop error information on the BSoD (default value) +# Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию) # BSoDStopError -Disable # Choose when to be notified about changes to your computer: never notify @@ -849,12 +849,12 @@ NumLock -Enable # Включить Caps Lock (значение по умолчанию) # CapsLock -Enable -# Turn off pressing the Shift key 5 times to turn Sticky keys -# Выключить залипание клавиши Shift после 5 нажатий +# Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times +# Не разрешать включения залипания клавиши Shift после 5 нажатий StickyShift -Disable -# Turn on pressing the Shift key 5 times to turn Sticky keys (default value) -# Включить залипание клавиши Shift после 5 нажатий (значение по умолчанию) +# Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times (default value) +# Разрешать включения залипания клавиши Shift после 5 нажатий (значение по умолчанию) # StickyShift -Enable # Don't use AutoPlay for all media and devices @@ -915,10 +915,10 @@ RestartDeviceAfterUpdate -Enable # Set-Association -ProgramPath "%ProgramFiles%\Notepad++\notepad++.exe" -Extension .txt -Icon "%ProgramFiles%\Notepad++\notepad++.exe,0" <# - Uninstall the "PC Health Check" app + Uninstall the "PC Health Check" app and prevent it from installing in the future This application is installed with the KB5005463 update to check if PC meets the system requirements of Windows 11 - Удалить приложение "Проверка работоспособности ПК WIndows" + Удалить приложение "Проверка работоспособности ПК Windows" и заблокировать его установку в будущем Данное приложение устанавливается обновлением KB5005463 для проверки соответствия компьютера системным требованиям Windows 11 https://support.microsoft.com/en-us/topic/kb5005463-pc-health-check-application-e33cf4e2-49e2-4727-b913-f3c5b1ee0e56 diff --git a/Sophia Script/Sophia Script for Windows 10/Functions.ps1 b/Sophia Script/Sophia Script for Windows 10/Functions.ps1 index 27068c78..ce4bf637 100644 --- a/Sophia Script/Sophia Script for Windows 10/Functions.ps1 +++ b/Sophia Script/Sophia Script for Windows 10/Functions.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS The TAB completion for functions and their arguments - Version: v5.12.12 - Date: 27.02.2022 + Version: v5.12.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -54,7 +54,7 @@ function Sophia Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.12 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.14 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/de-DE/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/de-DE/Sophia.psd1 index 7f7546f7..1a36adf2 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/de-DE/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/de-DE/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Sie versuchen ein Skript über Power UnsupportedISE = Das Skript unterstützt nicht die Ausführung über Windows PowerShell ISE Win10TweakerWarning = Wahrscheinlich wurde Ihr Betriebssystem über die Win 10 Tweaker-Hintertür infiziert Windows10DebloaterWarning = Die Stabilität des Windows-Betriebssystems kann durch die Verwendung des Windows10Debloater PowerShell-Skripts von Sycnex beeinträchtigt worden sein. Installieren Sie vorsorglich das gesamte Betriebssystem neu +RebootPending = Der PC wartet darauf, neu gestartet zu werden UnsupportedRelease = Neue Version gefunden CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen? ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/en-US/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/en-US/Sophia.psd1 index b07af89a..3c74d4ef 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/en-US/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/en-US/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = You're trying to run script via Powe UnsupportedISE = The script doesn't support running via Windows PowerShell ISE Win10TweakerWarning = Probably your OS was infected via the Win 10 Tweaker backdoor Windows10DebloaterWarning = The Windows OS stability may have been compromised by using Sycnex's Windows10Debloater PowerShell script. Preventively, reinstall the entire OS +RebootPending = The PC is waiting to be restarted UnsupportedRelease = A new version found CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script? ControlledFolderAccessDisabled = Controlled folder access disabled diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/es-ES/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/es-ES/Sophia.psd1 index f028a794..7404a995 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/es-ES/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/es-ES/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Estás intentando ejecutar el script UnsupportedISE = El script no es compatible con la ejecución a través de Windows PowerShell ISE Win10TweakerWarning = Probablemente su sistema operativo fue infectado a través del backdoor Win 10 Tweaker Windows10DebloaterWarning = La estabilidad del sistema operativo Windows puede haberse visto comprometida al utilizar el script PowerShell Windows10Debloater de Sycnex. De forma preventiva, reinstale todo el sistema operativo +RebootPending = El PC está esperando a ser reiniciado UnsupportedRelease = Una nueva versión encontrada CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script? ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/fr-FR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/fr-FR/Sophia.psd1 index 211e14b2..c8c262db 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/fr-FR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/fr-FR/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Vous essayez d'exécuter le script v UnsupportedISE = Le script ne supporte pas l'exécution via Windows PowerShell ISE Win10TweakerWarning = Votre système d'exploitation a probablement été infecté par la porte dérobée Win 10 Tweaker Windows10DebloaterWarning = La stabilité de l'OS Windows peut avoir été compromise par l'utilisation du script PowerShell Windows10Debloater de Sycnex. De manière préventive, réinstallez l'ensemble de l'OS +RebootPending = Le PC attend d'être redémarré UnsupportedRelease = Nouvelle version trouvée CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script? ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/hu-HU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/hu-HU/Sophia.psd1 index 87cd21a7..13895310 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/hu-HU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/hu-HU/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = A PowerShell {0}.{1} segítségével UnsupportedISE = A szkript nem támogatja a Windows PowerShell ISE futtatását Win10TweakerWarning = Valószínűleg az operációs rendszerét a Win 10 Tweaker backdoor segítségével fertőzték meg Windows10DebloaterWarning = A Windows operációs rendszer stabilitását veszélyeztethette a Sycnex Windows10Debloater PowerShell szkriptje. Megelőzésképpen telepítse újra a teljes operációs rendszert +RebootPending = A számítógép újraindításra vár UnsupportedRelease = Új verzió érhető el CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet? ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/it-IT/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/it-IT/Sophia.psd1 index 5c1e1ec3..71943be3 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/it-IT/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/it-IT/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Stai cercando di eseguire lo script UnsupportedISE = Lo script non supporta l'esecuzione tramite Windows PowerShell ISE Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = La stabilità del sistema operativo Windows potrebbe essere stata compromessa dall'utilizzo dello script PowerShell Windows10Debloater di Sycnex. Preventivamente, reinstallare l'intero sistema operativo +RebootPending = Il PC è in attesa di essere riavviato UnsupportedRelease = Nuova versione trovata CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file delle preimpostazioni {0} prima di eseguire Sophia Script? ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/pt-BR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/pt-BR/Sophia.psd1 index f625a0bc..73c2a5fb 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/pt-BR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/pt-BR/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Você está tentando executar o scri UnsupportedISE = O guião não suporta a execução através do Windows PowerShell ISE Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = A estabilidade do sistema operacional Windows pode ter sido comprometida pela utilização do script Windows10Debloater PowerShell da Sycnex. Preventivamente, reinstale todo o sistema operacional +RebootPending = O PC está esperando para ser reiniciado UnsupportedRelease = Nova versão encontrada CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script? ControlledFolderAccessDisabled = Acesso controlado a pasta desativada diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/ru-RU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/ru-RU/Sophia.psd1 index cc5c3a0e..a01b13f5 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/ru-RU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/ru-RU/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Вы пытаетесь запуст UnsupportedISE = Скрипт не поддерживает работу через Windows PowerShell ISE Win10TweakerWarning = Ваша ОС, возможно, через бэкдор в Win 10 Tweaker была заражена трояном. Подробнее: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабильность Вашей ОС могла быть нарушена использованием скрипта Windows10Debloater от Sycnex. В целях профилактики переустановите ОС +RebootPending = Компьютер ожидает перезагрузки UnsupportedRelease = Обнаружена новая версия CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/tr-TR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/tr-TR/Sophia.psd1 index 75f6a43d..8fb0a1eb 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/tr-TR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/tr-TR/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Komut dosyasını PowerShell {0}.{1} UnsupportedISE = Komut dosyası, Windows PowerShell ISE üzerinden çalıştırmayı desteklemiyor Win10TweakerWarning = Muhtemelen işletim sisteminize Win 10 Tweaker arka kapısı yoluyla bulaştı Windows10DebloaterWarning = Windows işletim sistemi kararlılığı, Sycnex'in Windows10Debloater PowerShell betiği kullanılarak tehlikeye atılmış olabilir. Önleyici olarak, tüm işletim sistemini yeniden yükleyin +RebootPending = PC yeniden başlatılmayı bekliyor UnsupportedRelease = Yeni sürüm bulundu CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi? ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/uk-UA/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/uk-UA/Sophia.psd1 index 40b4a8b4..945ac673 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/uk-UA/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/uk-UA/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = Ви намагаєтеся запу UnsupportedISE = Скрипт не підтримує роботу через Windows PowerShell ISE Win10TweakerWarning = Ваша ОС, можливо, через бекдор в Win 10 Tweaker заражена трояном. Детальніше: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабільність вашої ОС могла бути порушена використанням скрипту Windows10Debloater від Sycnex. З метою профілактики перевстановіть ОС +RebootPending = Комп'ютер очікує на перезавантаження UnsupportedRelease = Виявлено нову версію CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений diff --git a/Sophia Script/Sophia Script for Windows 10/Localizations/zh-CN/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Localizations/zh-CN/Sophia.psd1 index f575da74..c2c841cb 100644 --- a/Sophia Script/Sophia Script for Windows 10/Localizations/zh-CN/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Localizations/zh-CN/Sophia.psd1 @@ -8,6 +8,7 @@ UnsupportedPowerShell = 你想通过PowerShell {0}.{1}运行 UnsupportedISE = 该脚本不支持通过Windows PowerShell ISE运行 Win10TweakerWarning = 可能你的操作系统是通过“Win 10 Tweaker”后门感染的 Windows10DebloaterWarning = 使用Sycnex的Windows10Debloater PowerShell脚本,Windows操作系统的稳定性可能已经受到影响。预防性地,重新安装整个操作系统 +RebootPending = 计算机正在等待重新启动 UnsupportedRelease = 找到新版本 CustomizationWarning = \n在运行Sophia Script之前,您是否已自定义{0}预设文件中的每个函数? ControlledFolderAccessDisabled = “受控文件夹访问”已禁用 diff --git a/Sophia Script/Sophia Script for Windows 10/Manifest/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 10/Manifest/Sophia.psd1 index d0901e8a..dd048016 100644 --- a/Sophia Script/Sophia Script for Windows 10/Manifest/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 10/Manifest/Sophia.psd1 @@ -1,6 +1,6 @@ @{ RootModule = '..\Module\Sophia.psm1' - ModuleVersion = '5.12.12' + ModuleVersion = '5.12.14' GUID = '109cc881-c42b-45af-a74a-550781989d6a' Author = 'Dmitry "farag" Nefedov' Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved' diff --git a/Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1 b/Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1 index 21a82226..c0c927b3 100644 --- a/Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1 +++ b/Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1 @@ -2,8 +2,8 @@ .SYNOPSIS Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks - Version: v5.12.12 - Date: 27.02.2022 + Version: v5.12.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -14,9 +14,9 @@ Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring .NOTES - Supported Windows 10 versions + Minimum Supported Windows 10 versions Versions: 2004/20H2/21H1/21H2 - Builds: 19041/19042/19043/19044 + Build: 1904x.1151 Editions: Home/Pro/Enterprise Architecture: x64 @@ -73,6 +73,23 @@ function Checkings $false { Write-Warning -Message $Localization.UnsupportedOSBuild + + # Enable receiving updates for other Microsoft products when you update Windows + (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + + Start-Sleep -Seconds 1 + + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + + # Open the "Windows Update" page + Start-Process -FilePath "ms-settings:windowsupdate-action" + + Start-Sleep -Seconds 1 + + # Trigger Windows Update for detecting new updates + (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() + exit } } @@ -85,11 +102,14 @@ function Checkings $Version = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR Write-Warning -Message ($Localization.UpdateWarning -f $Version) - # Receive updates for other Microsoft products when you update Windows + # Enable receiving updates for other Microsoft products when you update Windows (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") Start-Sleep -Seconds 1 + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + # Open the "Windows Update" page Start-Process -FilePath "ms-settings:windowsupdate-action" @@ -143,7 +163,7 @@ function Checkings exit } - # Check whether the OS was infected by Win 10 Tweaker's trojan + # Check whether the OS was infected by the Win 10 Tweaker's trojan # https://win10tweaker.ru if (Test-Path -Path "HKCU:\Software\Win 10 Tweaker") { @@ -163,6 +183,22 @@ function Checkings exit } + # Check for a pending reboot + $PendingActions = @( + # CBS pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending", + # Windows Update pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" + ) + if ($null -ne (Get-Item -Path $PendingActions -Force -ErrorAction Ignore)) + { + Write-Warning -Message $Localization.RebootPending + exit + } + # Check if the current module version is the latest one try { @@ -2346,13 +2382,13 @@ function TaskViewButton <# .SYNOPSIS - People button on the taskbar + People on the taskbar .PARAMETER Hide - Hide People button on the taskbar + Hide People on the taskbar .PARAMETER Show - Show People button on the taskbar + Show People on the taskbar .EXAMPLE PeopleTaskbar -Hide @@ -7139,13 +7175,13 @@ function CapsLock <# .SYNOPSIS - The keyboard schortcut for Stick keys + The shortcut to start Sticky Keys .PARAMETER Disable - Turn off pressing the Shift key 5 times to turn Sticky keys + Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times .PARAMETER Enable - Turn on pressing the Shift key 5 times to turn Sticky keys + Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times .EXAMPLE StickyShift -Disable @@ -8163,7 +8199,7 @@ public static void Refresh() <# .SYNOPSIS - Uninstall the "PC Health Check" app + Uninstall the "PC Health Check" app and prevent it from installing in the future .EXAMPLE UninstallPCHealthCheck @@ -8191,6 +8227,13 @@ function UninstallPCHealthCheck break } } + + # Prevent the "PC Health Check" app from installing in the future + if (-not (Test-Path -Path HKLM:\SOFTWARE\Microsoft\PCHC)) + { + New-Item -Path HKLM:\SOFTWARE\Microsoft\PCHC -Force + } + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\PCHC -Name PreviousUninstall -PropertyType DWord -Value 1 -Force } <# @@ -8210,16 +8253,25 @@ function InstallVCRedistx64 { $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $Parameters = @{ - Uri = "https://aka.ms/vs/16/release/vc_redist.x64.exe" - OutFile = "$DownloadsFolder\vc_redist.x64.exe" + Uri = "https://aka.ms/vs/17/release/VC_redist.x64.exe" + OutFile = "$DownloadsFolder\VC_redist.x64.exe" UseBasicParsing = $true Verbose = $true } Invoke-WebRequest @Parameters - Start-Process -FilePath "$DownloadsFolder\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\VC_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + + <# + PowerShell 5.1 (7.2 too) interprets the 8.3 file name literally, if an environment variable contains a non-latin word, + so you won't be able to remove "$env:TEMP\dd_vcredist_amd64_*.log" file explicitly - Remove-Item -Path "$DownloadsFolder\vc_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force -ErrorAction Ignore + Another ways to get normal path to %TEMP% + [Environment]::GetEnvironmentVariable("TEMP", "User") + (Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP + [System.IO.Path]::GetTempPath() + #> + Get-ChildItem -Path "$DownloadsFolder\VC_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore } #endregion System @@ -10240,41 +10292,43 @@ function CleanupTask { "Register" { - Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { - Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore - } + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Windows Cleanup" -ErrorAction Ignore)) + { + Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { + Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore + } - $VolumeCaches = @( - # Delivery Optimization Files - "Delivery Optimization Files", + $VolumeCaches = @( + # Delivery Optimization Files + "Delivery Optimization Files", - # Device driver packages - "Device Driver Packages", + # Device driver packages + "Device Driver Packages", - # Previous Windows Installation(s) - "Previous Installations", + # Previous Windows Installation(s) + "Previous Installations", - # Setup log files - "Setup Log Files", + # Setup log files + "Setup Log Files", - # Temporary Setup Files - "Temporary Setup Files", + # Temporary Setup Files + "Temporary Setup Files", - # Windows Update Cleanup - "Update Cleanup", + # Windows Update Cleanup + "Update Cleanup", - # Microsoft Defender - "Windows Defender", + # Microsoft Defender + "Windows Defender", - # Windows upgrade log files - "Windows Upgrade Log Files" - ) - foreach ($VolumeCache in $VolumeCaches) - { - New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force - } + # Windows upgrade log files + "Windows Upgrade Log Files" + ) + foreach ($VolumeCache in $VolumeCaches) + { + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force + } - $CleanupTask = @" + $CleanupTask = @" Get-Process -Name cleanmgr | Stop-Process -Force Get-Process -Name Dism | Stop-Process -Force Get-Process -Name DismHost | Stop-Process -Force @@ -10342,40 +10396,40 @@ while (`$true) `$Process.Start() | Out-Null "@ - # Create the "Windows Cleanup" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Parameters = @{ - TaskName = "Windows Cleanup" - TaskPath = "Sophia Script" - Principal = $Principal - Action = $Action - Description = $Localization.CleanupTaskDescription - Settings = $Settings - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Parameters = @{ + TaskName = "Windows Cleanup" + TaskPath = "Sophia Script" + Principal = $Principal + Action = $Action + Description = $Localization.CleanupTaskDescription + Settings = $Settings + } + Register-ScheduledTask @Parameters -Force - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) - { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast - if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) - { - New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force - } - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force + # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast + if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) + { + New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force + } + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force - # Start the "Windows Cleanup" task if the "Run" button clicked - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force + # Start the "Windows Cleanup" task if the "Run" button clicked + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force - $ToastNotification = @" + $ToastNotification = @" [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null @@ -10417,21 +10471,22 @@ while (`$true) [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Windows Cleanup Notification" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm - $Parameters = @{ - TaskName = "Windows Cleanup Notification" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup Notification" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm + $Parameters = @{ + TaskName = "Windows Cleanup Notification" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.CleanupNotificationTaskDescription + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { @@ -10441,8 +10496,7 @@ while (`$true) Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -Force -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup" -Confirm:$false -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName "Windows Cleanup", "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore Remove-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Recurse -Force -ErrorAction Ignore } @@ -10494,14 +10548,16 @@ function SoftwareDistributionTask { "Register" { - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "SoftwareDistribution" -ErrorAction Ignore)) { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - $SoftwareDistributionTask = @" + $SoftwareDistributionTask = @" (Get-Service -Name wuauserv).WaitForStatus('Stopped', '01:00:00') Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -Force | Remove-Item -Recurse -Force @@ -10531,25 +10587,26 @@ Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -For [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "SoftwareDistribution" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm - $Parameters = @{ - TaskName = "SoftwareDistribution" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" - } - Register-ScheduledTask @Parameters -Force + # Create the "SoftwareDistribution" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm + $Parameters = @{ + TaskName = "SoftwareDistribution" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore } } } @@ -10599,7 +10656,9 @@ function TempTask { "Register" { - $TempTask = @" + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Temp" -ErrorAction Ignore)) + { + $TempTask = @" Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Recurse -Force [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null @@ -10628,25 +10687,26 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Temp" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm - $Parameters = @{ - TaskName = "Temp" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" - } - Register-ScheduledTask @Parameters -Force + # Create the "Temp" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm + $Parameters = @{ + TaskName = "Temp" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%TEMP%" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName Temp -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName Temp -Confirm:$false -ErrorAction Ignore } } } @@ -12464,15 +12524,15 @@ function UseStoreOpenWith { "Hide" { - if (-not (Test-Path -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) + if (-not (Test-Path -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) { - New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force + New-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force } "Show" { - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore } } } diff --git a/Sophia Script/Sophia Script for Windows 10/Sophia.ps1 b/Sophia Script/Sophia Script for Windows 10/Sophia.ps1 index ea5e3e96..70d42be4 100644 --- a/Sophia Script/Sophia Script for Windows 10/Sophia.ps1 +++ b/Sophia Script/Sophia Script for Windows 10/Sophia.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS Default preset file for "Sophia Script for Windows 10" - Version: v5.12.12 - Date: 27.02.2022 + Version: v5.12.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -25,9 +25,9 @@ irm script.sophi.app | iex .NOTES - Supported Windows 10 versions + Minimum Supported Windows 10 versions Versions: 2004/20H2/21H1/21H2 - Builds: 19041/19042/19043/19044 + Build: 1904x.1151 Editions: Home/Pro/Enterprise Architecture: x64 @@ -71,7 +71,7 @@ param Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.12 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.14 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force @@ -276,11 +276,11 @@ HiddenItems -Enable # Не показывать скрытые файлы, папки и диски (значение по умолчанию) # HiddenItems -Disable -# Show file name extensions +# Show the file name extensions # Отобразить расширения имён файлов FileExtensions -Show -# Hide file name extensions (default value) +# Hide the file name extensions (default value) # Скрывать расширения имён файлов файлов (значение по умолчанию) # FileExtensions -Hide @@ -392,11 +392,11 @@ TaskViewButton -Hide # Отобразить кнопку Просмотра задач (значение по умолчанию) # TaskViewButton -Show -# Hide People button on the taskbar +# Hide People on the taskbar # Скрыть панель "Люди" на панели задач PeopleTaskbar -Hide -# Show People button on the taskbar (default value) +# Show People on the taskbar (default value) # Отобразить панель "Люди" на панели задач (значение по умолчанию) # PeopleTaskbar -Show @@ -548,7 +548,7 @@ AeroShaking -Enable #region OneDrive # Uninstall OneDrive. The OneDrive user folder won't be removed # Удалить OneDrive. Папка пользователя OneDrive не будет удалена -OneDrive -Uninstall +# OneDrive -Uninstall # Install OneDrive 64-bit (default value) # Установить OneDrive 64-бит (значение по умолчанию) @@ -849,12 +849,12 @@ NumLock -Enable # Включить Caps Lock (значение по умолчанию) # CapsLock -Enable -# Turn off pressing the Shift key 5 times to turn Sticky keys -# Выключить залипание клавиши Shift после 5 нажатий +# Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times +# Не разрешать включения залипания клавиши Shift после 5 нажатий StickyShift -Disable -# Turn on pressing the Shift key 5 times to turn Sticky keys (default value) -# Включить залипание клавиши Shift после 5 нажатий (значение по умолчанию) +# Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times (default value) +# Разрешать включения залипания клавиши Shift после 5 нажатий (значение по умолчанию) # StickyShift -Enable # Don't use AutoPlay for all media and devices @@ -915,10 +915,10 @@ RestartDeviceAfterUpdate -Enable # Set-Association -ProgramPath "%ProgramFiles%\Notepad++\notepad++.exe" -Extension .txt -Icon "%ProgramFiles%\Notepad++\notepad++.exe,0" <# - Uninstall the "PC Health Check" app + Uninstall the "PC Health Check" app and prevent it from installing in the future This application is installed with the KB5005463 update to check if PC meets the system requirements of Windows 11 - Удалить приложение "Проверка работоспособности ПК WIndows" + Удалить приложение "Проверка работоспособности ПК Windows" и заблокировать его установку в будущем Данное приложение устанавливается обновлением KB5005463 для проверки соответствия компьютера системным требованиям Windows 11 https://support.microsoft.com/en-us/topic/kb5005463-pc-health-check-application-e33cf4e2-49e2-4727-b913-f3c5b1ee0e56 diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Functions.ps1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Functions.ps1 index 8d79d5f2..02e8dc5d 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Functions.ps1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Functions.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS The TAB completion for functions and their arguments - Version: v6.0.13 - Date: 27.02.2022 + Version: v6.0.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -54,7 +54,7 @@ function Sophia Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.13 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.14 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/de-DE/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/de-DE/Sophia.psd1 index 95eb6102..5fb5aca4 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/de-DE/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/de-DE/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Das Skript unterstützt Windows 11 2004/20H2/21H1-Versionen und höher -UpdateWarning = Ihr Windows 11-Build: {0}.{1}. Unterstützter Build: 22000.438 und höher +UpdateWarning = Ihr Windows 11-Build: {0}.{1}. Unterstützter Builds: 22000.556, 22509 und höher UnsupportedLanguageMode = Die PowerShell-Sitzung wird in einem eingeschränkten Sprachmodus ausgeführt LoggedInUserNotAdmin = Der angemeldete Benutzer hat keine Administratorrechte UnsupportedPowerShell = Sie versuchen ein Skript über PowerShell {0}.{1} auszuführen. Das Skript in der entsprechenden PowerShell-Version ausführen @@ -8,6 +8,7 @@ UnsupportedISE = Das Skript unterstützt nicht die Au Win10TweakerWarning = Wahrscheinlich wurde Ihr Betriebssystem über die Win 10 Tweaker-Hintertür infiziert Windows10DebloaterWarning = Die Stabilität des Windows-Betriebssystems kann durch die Verwendung des Windows10Debloater PowerShell-Skripts von Sycnex beeinträchtigt worden sein. Installieren Sie vorsorglich das gesamte Betriebssystem neu PowerShellLibraries = Im Ordner Libraries befinden sich keine Dateien. Bitte das Archiv erneut herunterladen +RebootPending = Der PC wartet darauf, neu gestartet zu werden UnsupportedRelease = Neue Version gefunden CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen? ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/en-US/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/en-US/Sophia.psd1 index 3530c4f8..75640d65 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/en-US/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/en-US/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = The script supports Windows 11 21H2 version and higher -UpdateWarning = Your Windows 11 build: {0}.{1}. Supported build: 22000.438 and higher +UpdateWarning = Your Windows 11 build: {0}.{1}. Supported builds: 22000.556, 22509 and higher UnsupportedLanguageMode = The PowerShell session in running in a limited language mode LoggedInUserNotAdmin = The logged-on user doesn't have admin rights UnsupportedPowerShell = You're trying to run script via PowerShell {0}.{1}. Run the script in the appropriate PowerShell version @@ -8,6 +8,7 @@ UnsupportedISE = The script doesn't support running v Win10TweakerWarning = Probably your OS was infected via the Win 10 Tweaker backdoor Windows10DebloaterWarning = The Windows OS stability may have been compromised by using Sycnex's Windows10Debloater PowerShell script. Preventively, reinstall the entire OS PowerShellLibraries = There are no files in the Libraries folder. Please, re-download the archive +RebootPending = The PC is waiting to be restarted UnsupportedRelease = A new version found CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script? ControlledFolderAccessDisabled = Controlled folder access disabled diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/es-ES/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/es-ES/Sophia.psd1 index c673a8fa..871ba8ec 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/es-ES/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/es-ES/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = El script es compatible con versión Windows 11 21H2 y superiores -UpdateWarning = Su build de Windows 11: {0}.{1}. Compilación compatible: 22000.438 y superiores +UpdateWarning = Su build de Windows 11: {0}.{1}. Compilaciones compatibles: 22000.556, 22509 y superiores UnsupportedLanguageMode = Sesión de PowerShell ejecutada en modo de lenguaje limitado LoggedInUserNotAdmin = El usuario que inició sesión no tiene derechos de administrador UnsupportedPowerShell = Estás intentando ejecutar el script a través de PowerShell {0}.{1}. Ejecute el script en la versión apropiada de PowerShell @@ -8,6 +8,7 @@ UnsupportedISE = El script no es compatible con la ej Win10TweakerWarning = Probablemente su sistema operativo fue infectado a través del backdoor Win 10 Tweaker Windows10DebloaterWarning = La estabilidad del sistema operativo Windows puede haberse visto comprometida al utilizar el script PowerShell Windows10Debloater de Sycnex. De forma preventiva, reinstale todo el sistema operativo PowerShellLibraries = No hay archivos en la carpeta Libraries. Por favor, vuelva a descargar el archivo +RebootPending = El PC está esperando a ser reiniciado UnsupportedRelease = Una nueva versión encontrada CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script? ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/fr-FR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/fr-FR/Sophia.psd1 index 25c2e2de..1d95af04 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/fr-FR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/fr-FR/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Le script supporte les versions Windows 11 21H2 et ultérieures -UpdateWarning = Votre version de Windows 11 : {0}.{1}. Version prise en charge : 22000.438 et ultérieures +UpdateWarning = Votre version de Windows 11 : {0}.{1}. Versions prises en charge: 22000.556, 22509 et ultérieures UnsupportedLanguageMode = La session PowerShell s'exécute dans un mode de langue limité LoggedInUserNotAdmin = L'utilisateur connecté n'a pas de droits d'administrateur UnsupportedPowerShell = Vous essayez d'exécuter le script via PowerShell {0}.{1}. Exécutez le script dans la version appropriée de PowerShell @@ -8,6 +8,7 @@ UnsupportedISE = Le script ne supporte pas l'exécuti Win10TweakerWarning = Votre système d'exploitation a probablement été infecté par la porte dérobée Win 10 Tweaker Windows10DebloaterWarning = La stabilité de l'OS Windows peut avoir été compromise par l'utilisation du script PowerShell Windows10Debloater de Sycnex. De manière préventive, réinstallez l'ensemble de l'OS PowerShellLibraries = Il n'y a pas de fichiers dans le dossier Libraries. Veuillez retélécharger l'archive +RebootPending = Le PC attend d'être redémarré UnsupportedRelease = Nouvelle version trouvée CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script? ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/hu-HU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/hu-HU/Sophia.psd1 index b0a255e0..7967fe0f 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/hu-HU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/hu-HU/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = A szkript a Windows 11 21H2 és újabb kiadásokat támogatja -UpdateWarning = Az Ön Windows 11 építése: {0}.{1}. Támogatott build: 22000.438 és magasabb verziószámok +UpdateWarning = Az Ön Windows 11 építése: {0}.{1}. Támogatott buildek: 22000.556, 22509 és magasabb verziószámok UnsupportedLanguageMode = A PowerShell munkamenet korlátozott nyelvi üzemmódban fut LoggedInUserNotAdmin = A bejelentkezett felhasználó nem rendelkezik admin jogokkal UnsupportedPowerShell = A PowerShell {0}.{1} segítségével próbálja futtatni a szkriptet. Futtassa a szkriptet a megfelelő PowerShell-verzióban @@ -8,6 +8,7 @@ UnsupportedISE = A szkript nem támogatja a Windows P Win10TweakerWarning = Valószínűleg az operációs rendszerét a Win 10 Tweaker backdoor segítségével fertőzték meg Windows10DebloaterWarning = A Windows operációs rendszer stabilitását veszélyeztethette a Sycnex Windows10Debloater PowerShell szkriptje. Megelőzésképpen telepítse újra a teljes operációs rendszert PowerShellLibraries = A Libraries mappában nincsenek fájlok. Kérjük, töltse le újra az archívumot +RebootPending = A számítógép újraindításra vár UnsupportedRelease = Új verzió érhető el CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet? ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/it-IT/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/it-IT/Sophia.psd1 index 173a1e74..e686915e 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/it-IT/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/it-IT/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Lo script supporta Windows 11, 21H2 versioni e superiori -UpdateWarning = La tua build di Windows 11: {0}.{1}. Build supportata: 22000.438 e successive +UpdateWarning = La tua build di Windows 11: {0}.{1}. Build supportate: 22000.556, 22509 e successive UnsupportedLanguageMode = La sessione PowerShell è in esecuzione in una modalità di lingua limitata LoggedInUserNotAdmin = L'utente connesso non ha i diritti di amministratore UnsupportedPowerShell = Stai cercando di eseguire lo script tramite PowerShell {0}.{1}. Esegui lo script nella versione di PowerShell appropriata @@ -8,6 +8,7 @@ UnsupportedISE = Lo script non supporta l'esecuzione Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = La stabilità del sistema operativo Windows potrebbe essere stata compromessa dall'utilizzo dello script PowerShell Windows10Debloater di Sycnex. Preventivamente, reinstallare l'intero sistema operativo PowerShellLibraries = Non ci sono file nella cartella Libraries. Per favore, scarica di nuovo l'archivio +RebootPending = Il PC è in attesa di essere riavviato UnsupportedRelease = Nuova versione trovata CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file delle preimpostazioni {0} prima di eseguire Sophia Script? ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/pt-BR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/pt-BR/Sophia.psd1 index bf2be287..df2e6034 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/pt-BR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/pt-BR/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = O script suporta versões Windows 11 21H2 e superior -UpdateWarning = La tua build di Windows 11: {0}.{1}. Build supportata: 22000.438 e successive +UpdateWarning = La tua build di Windows 11: {0}.{1}. Build suportadas: 22000.556, 22509 e successive UnsupportedLanguageMode = A sessão PowerShell em funcionamento em um modo de linguagem limitada LoggedInUserNotAdmin = O usuário logado não tem direitos de administrador UnsupportedPowerShell = Você está tentando executar o script via PowerShell {0}.{1}. Execute o script na versão apropriada do PowerShell @@ -8,6 +8,7 @@ UnsupportedISE = O guião não suporta a execução a Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = A estabilidade do sistema operacional Windows pode ter sido comprometida pela utilização do script Windows10Debloater PowerShell da Sycnex. Preventivamente, reinstale todo o sistema operacional PowerShellLibraries = Não existem ficheiros na pasta Libraries. Por favor, volte a descarregar o arquivo +RebootPending = O PC está esperando para ser reiniciado UnsupportedRelease = Nova versão encontrada CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script? ControlledFolderAccessDisabled = Acesso controlado a pasta desativada diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/ru-RU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/ru-RU/Sophia.psd1 index 1794231b..93d1e3a2 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/ru-RU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/ru-RU/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Скрипт поддерживает только Windows 11 21H2 и выше -UpdateWarning = Ваш билд Windows 11: {0}.{1}. Поддерживаемый билд: 22000.438 и выше +UpdateWarning = Ваш билд Windows 11: {0}.{1}. Поддерживаемые сборки: 22000.556, 22509 и выше UnsupportedLanguageMode = Сессия PowerShell работает в ограниченном режиме LoggedInUserNotAdmin = Текущий вошедший пользователь не обладает правами администратора UnsupportedPowerShell = Вы пытаетесь запустить скрипт в PowerShell {0}.{1}. Запустите скрипт в соответствующей версии PowerShell @@ -8,6 +8,7 @@ UnsupportedISE = Скрипт не поддержив Win10TweakerWarning = Ваша ОС, возможно, через бэкдор в Win 10 Tweaker была заражена трояном. Подробнее: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабильность Вашей ОС могла быть нарушена использованием скрипта Windows10Debloater от Sycnex. В целях профилактики переустановите ОС PowerShellLibraries = В папке Libraries отсутствутствуют файлы. Пожалуйста, перекачайте архив +RebootPending = Компьютер ожидает перезагрузки UnsupportedRelease = Обнаружена новая версия CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/tr-TR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/tr-TR/Sophia.psd1 index c0728259..d4e1e3bd 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/tr-TR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/tr-TR/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Bu betik sadece Windows 11 21H2 sürüm ve üstünü destekliyor -UpdateWarning = Windows 11 yapınız: {0}.{1}. Desteklenen yapı: 22000.438 ve üstünü destekliyor +UpdateWarning = Windows 11 yapınız: {0}.{1}. Desteklenen yapılar: 22000.556, 22509 ve üstünü destekliyor UnsupportedLanguageMode = Sınırlı bir dil modunda çalışan PowerShell oturumu LoggedInUserNotAdmin = Oturum açan kullanıcının yönetici hakları yok UnsupportedPowerShell = Komut dosyasını PowerShell {0}.{1} aracılığıyla çalıştırmaya çalışıyorsunuz. Komut dosyasını uygun PowerShell sürümünde çalıştırın @@ -8,6 +8,7 @@ UnsupportedISE = Komut dosyası, Windows PowerShell I Win10TweakerWarning = Muhtemelen işletim sisteminize Win 10 Tweaker arka kapısı yoluyla bulaştı Windows10DebloaterWarning = Windows işletim sistemi kararlılığı, Sycnex'in Windows10Debloater PowerShell betiği kullanılarak tehlikeye atılmış olabilir. Önleyici olarak, tüm işletim sistemini yeniden yükleyin PowerShellLibraries = Libraries klasöründe dosya yok. Lütfen arşivi yeniden indirin +RebootPending = PC yeniden başlatılmayı bekliyor UnsupportedRelease = Yeni sürüm bulundu CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi? ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/uk-UA/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/uk-UA/Sophia.psd1 index 5d008704..50a2d526 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/uk-UA/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/uk-UA/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Скрипт підтримує тільки Windows 11 версії 21H2 та вище -UpdateWarning = Ваш білд Windows 11: {0}.{1}. Підтримуваний білд: 22000.438 та вище +UpdateWarning = Ваш білд Windows 11: {0}.{1}. Підтримуваний збірки: 22000.556, 22509 та вище UnsupportedLanguageMode = Сесія PowerShell працює в обмеженому режимі LoggedInUserNotAdmin = Поточний увійшов користувач не володіє правами адміністратора UnsupportedPowerShell = Ви намагаєтеся запустити скрипт в PowerShell {0}.{1}. Запустіть скрипт у відповідній версії PowerShell @@ -8,6 +8,7 @@ UnsupportedISE = Скрипт не підтримує Win10TweakerWarning = Ваша ОС, можливо, через бекдор в Win 10 Tweaker заражена трояном. Детальніше: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабільність вашої ОС могла бути порушена використанням скрипту Windows10Debloater від Sycnex. З метою профілактики перевстановіть ОС PowerShellLibraries = У папці Libraries немає файлів. Будь ласка, повторно завантажте архів +RebootPending = Комп'ютер очікує на перезавантаження UnsupportedRelease = Виявлено нову версію CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/zh-CN/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/zh-CN/Sophia.psd1 index 31a46417..5fdd8ad9 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/zh-CN/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Localizations/zh-CN/Sophia.psd1 @@ -1,6 +1,6 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = 该脚本支持Windows 11版本21H2和更高版本 -UpdateWarning = 您的Windows 11构建。{0}.{1}。支持的构建。22000.438和更高版本 +UpdateWarning = 您的Windows 11构建。{0}.{1}。支持的构建: 22000.556, 22509和更高版本 UnsupportedLanguageMode = PowerShell会话在有限的语言模式下运行 LoggedInUserNotAdmin = 登录的用户没有管理员的权利 UnsupportedPowerShell = 你想通过PowerShell {0}.{1}运行脚本。在适当的PowerShell版本中运行该脚本 @@ -8,6 +8,7 @@ UnsupportedISE = 该脚本不支持通过Windows Powe Win10TweakerWarning = 可能你的操作系统是通过“Win 10 Tweaker”后门感染的 Windows10DebloaterWarning = 使用Sycnex的Windows10Debloater PowerShell脚本,Windows操作系统的稳定性可能已经受到影响。预防性地,重新安装整个操作系统 PowerShellLibraries = Libraries文件夹中没有文件。请重新下载该档案 +RebootPending = 计算机正在等待重新启动 UnsupportedRelease = 找到新版本 CustomizationWarning = \n在运行Sophia Script之前,您是否已自定义{0}预设文件中的每个函数? ControlledFolderAccessDisabled = “受控文件夹访问”已禁用 diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Manifest/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Manifest/Sophia.psd1 index 15d86ea4..06cb6fca 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Manifest/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Manifest/Sophia.psd1 @@ -1,11 +1,11 @@ @{ RootModule = '..\Module\Sophia.psm1' - ModuleVersion = '6.0.13' + ModuleVersion = '6.0.14' GUID = '109cc881-c42b-45af-a74a-550781989d6a' Author = 'Dmitry "farag" Nefedov' Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved' Description = 'Module for Windows fine-tuning and automating the routine tasks' - PowerShellVersion = '5.1' + PowerShellVersion = '7.2' ProcessorArchitecture = 'AMD64' FunctionsToExport = '*' diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1 index aeb06533..7f22ca13 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1 @@ -2,8 +2,8 @@ .SYNOPSIS Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks - Version: v6.0.13 - Date: 27.02.2022 + Version: v6.0.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -16,7 +16,7 @@ .NOTES Supported Windows 11 version Version: 21H2 - Build: 22000.438 + Build: 22000.556, 22509 Editions: Home/Pro/Enterprise .NOTES @@ -62,23 +62,15 @@ function Checkings $false { Write-Warning -Message $Localization.UnsupportedOSBuild - exit - } - } - - # Check whether the OS minor build version is 438 minimum - switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 438) - { - $false - { - $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" - Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version.UBR) - # Receive updates for other Microsoft products when you update Windows + # Enable receiving updates for other Microsoft products when you update Windows (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") Start-Sleep -Seconds 1 + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + # Open the "Windows Update" page Start-Process -FilePath "ms-settings:windowsupdate-action" @@ -91,6 +83,37 @@ function Checkings } } + # Check whether the OS minor build version is 556 minimum + switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 556) + { + $false + { + if ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber -lt 22509) + { + $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" + Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version.UBR) + + # Enable receiving updates for other Microsoft products when you update Windows + (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + + Start-Sleep -Seconds 1 + + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + + # Open the "Windows Update" page + Start-Process -FilePath "ms-settings:windowsupdate-action" + + Start-Sleep -Seconds 1 + + # Trigger Windows Update for detecting new updates + (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() + + exit + } + } + } + # Check the language mode switch ($ExecutionContext.SessionState.LanguageMode -ne "FullLanguage") { @@ -132,7 +155,7 @@ function Checkings exit } - # Check whether the OS was infected by Win 10 Tweaker's trojan + # Check whether the OS was infected by the Win 10 Tweaker's trojan # https://win10tweaker.ru if (Test-Path -Path "HKCU:\Software\Win 10 Tweaker") { @@ -165,6 +188,22 @@ function Checkings exit } + # Check for a pending reboot + $PendingActions = @( + # CBS pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending", + # Windows Update pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" + ) + if ($null -ne (Get-Item -Path $PendingActions -Force -ErrorAction Ignore)) + { + Write-Warning -Message $Localization.RebootPending + exit + } + # Check if the current module version is the latest one try { @@ -6828,13 +6867,13 @@ function CapsLock <# .SYNOPSIS - The keyboard schortcut for Stick keys + The shortcut to start Sticky Keys .PARAMETER Disable - Turn off pressing the Shift key 5 times to turn Sticky keys + Turn off Sticky keys by pressing the Shift key 5 times .PARAMETER Enable - Turn on pressing the Shift key 5 times to turn Sticky keys + Turn on Sticky keys by pressing the Shift key 5 times .EXAMPLE StickyShift -Disable @@ -7894,22 +7933,27 @@ function DefaultTerminalApp { if (Get-AppxPackage -Name Microsoft.WindowsTerminal) { - if (-not (Test-Path -Path "HKCU:\Console\%%Startup")) + # Checking if the Terminal version supports such feature + $TerminalVersion = (Get-AppxPackage -Name Microsoft.WindowsTerminal).Version + if ([System.Version]$TerminalVersion -ge [System.Version]"1.11") { - New-Item -Path "HKCU:\Console\%%Startup" -Force - } - - # Find the current GUID of Windows Terminal - $PackageFullName = (Get-AppxPackage -Name Microsoft.WindowsTerminal).PackageFullName - Get-ChildItem -Path "HKLM:\SOFTWARE\Classes\PackagedCom\Package\$PackageFullName\Class" | ForEach-Object -Process { - if ((Get-ItemPropertyValue -Path $_.PSPath -Name ServerId) -eq 0) + if (-not (Test-Path -Path "HKCU:\Console\%%Startup")) { - New-ItemProperty -Path "HKCU:\Console\%%Startup" -Name DelegationConsole -PropertyType String -Value $_.PSChildName -Force + New-Item -Path "HKCU:\Console\%%Startup" -Force } - if ((Get-ItemPropertyValue -Path $_.PSPath -Name ServerId) -eq 1) - { - New-ItemProperty -Path "HKCU:\Console\%%Startup" -Name DelegationTerminal -PropertyType String -Value $_.PSChildName -Force + # Find the current GUID of Windows Terminal + $PackageFullName = (Get-AppxPackage -Name Microsoft.WindowsTerminal).PackageFullName + Get-ChildItem -Path "HKLM:\SOFTWARE\Classes\PackagedCom\Package\$PackageFullName\Class" | ForEach-Object -Process { + if ((Get-ItemPropertyValue -Path $_.PSPath -Name ServerId) -eq 0) + { + New-ItemProperty -Path "HKCU:\Console\%%Startup" -Name DelegationConsole -PropertyType String -Value $_.PSChildName -Force + } + + if ((Get-ItemPropertyValue -Path $_.PSPath -Name ServerId) -eq 1) + { + New-ItemProperty -Path "HKCU:\Console\%%Startup" -Name DelegationTerminal -PropertyType String -Value $_.PSChildName -Force + } } } } @@ -7939,16 +7983,25 @@ function InstallVCRedistx64 { $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $Parameters = @{ - Uri = "https://aka.ms/vs/16/release/vc_redist.x64.exe" - OutFile = "$DownloadsFolder\vc_redist.x64.exe" + Uri = "https://aka.ms/vs/17/release/VC_redist.x64.exe" + OutFile = "$DownloadsFolder\VC_redist.x64.exe" UseBasicParsing = $true Verbose = $true } Invoke-WebRequest @Parameters - Start-Process -FilePath "$DownloadsFolder\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\VC_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait - Remove-Item -Path "$DownloadsFolder\vc_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force -ErrorAction Ignore + <# + PowerShell 5.1 (7.2 too) interprets the 8.3 file name literally, if an environment variable contains a non-latin word, + so you won't be able to remove "$env:TEMP\dd_vcredist_amd64_*.log" file explicitly + + Another ways to get normal path to %TEMP% + [Environment]::GetEnvironmentVariable("TEMP", "User") + (Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP + [System.IO.Path]::GetTempPath() + #> + Get-ChildItem -Path "$DownloadsFolder\VC_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore } #endregion System @@ -8215,6 +8268,85 @@ function RunPowerShellShortcut } } } + +<# + .SYNOPSIS + Configure Start layout + + .PARAMETER Default + Show default Start layout + + .PARAMETER ShowMorePins + Show more pins on Start + + .PARAMETER ShowMoreRecommendations + Show more recommendations on Start + + .EXAMPLE + RunPowerShellShortcut -Default + + .EXAMPLE + RunPowerShellShortcut -ShowMorePins + + .EXAMPLE + RunPowerShellShortcut -ShowMoreRecommendations + + .NOTES + For Windows 11 Insider Preview 22509+ build only + + .NOTES + Current user + + +#> +function StartLayout +{ + param + ( + [Parameter( + Mandatory = $true, + ParameterSetName = "Default" + )] + [switch] + $Default, + + [Parameter( + Mandatory = $true, + ParameterSetName = "ShowMorePins" + )] + [switch] + $ShowMorePins, + + [Parameter( + Mandatory = $true, + ParameterSetName = "ShowMoreRecommendations" + )] + [switch] + $ShowMoreRecommendations + ) + + if ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber -ge 22509) + { + switch ($PSCmdlet.ParameterSetName) + { + "Default" + { + # Default + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name Start_Layout -PropertyType DWord -Value 0 -Force + } + "ShowMorePins" + { + # Show More Pins + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name Start_Layout -PropertyType DWord -Value 1 -Force + } + "ShowMoreRecommendations" + { + # Show More Recommendations + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name Start_Layout -PropertyType DWord -Value 2 -Force + } + } + } +} #endregion Start menu #region UWP apps @@ -9642,41 +9774,43 @@ function CleanupTask { "Register" { - Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { - Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore - } + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Windows Cleanup" -ErrorAction Ignore)) + { + Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { + Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore + } - $VolumeCaches = @( - # Delivery Optimization Files - "Delivery Optimization Files", + $VolumeCaches = @( + # Delivery Optimization Files + "Delivery Optimization Files", - # Device driver packages - "Device Driver Packages", + # Device driver packages + "Device Driver Packages", - # Previous Windows Installation(s) - "Previous Installations", + # Previous Windows Installation(s) + "Previous Installations", - # Setup log files - "Setup Log Files", + # Setup log files + "Setup Log Files", - # Temporary Setup Files - "Temporary Setup Files", + # Temporary Setup Files + "Temporary Setup Files", - # Windows Update Cleanup - "Update Cleanup", + # Windows Update Cleanup + "Update Cleanup", - # Microsoft Defender - "Windows Defender", + # Microsoft Defender + "Windows Defender", - # Windows upgrade log files - "Windows Upgrade Log Files" - ) - foreach ($VolumeCache in $VolumeCaches) - { - New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force - } + # Windows upgrade log files + "Windows Upgrade Log Files" + ) + foreach ($VolumeCache in $VolumeCaches) + { + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force + } - $CleanupTask = @" + $CleanupTask = @" Get-Process -Name cleanmgr | Stop-Process -Force Get-Process -Name Dism | Stop-Process -Force Get-Process -Name DismHost | Stop-Process -Force @@ -9744,40 +9878,40 @@ while (`$true) `$Process.Start() | Out-Null "@ - # Create the "Windows Cleanup" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Parameters = @{ - TaskName = "Windows Cleanup" - TaskPath = "Sophia Script" - Principal = $Principal - Action = $Action - Description = $Localization.CleanupTaskDescription - Settings = $Settings - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Parameters = @{ + TaskName = "Windows Cleanup" + TaskPath = "Sophia Script" + Principal = $Principal + Action = $Action + Description = $Localization.CleanupTaskDescription + Settings = $Settings + } + Register-ScheduledTask @Parameters -Force - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) - { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast - if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) - { - New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force - } - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force + # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast + if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) + { + New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force + } + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force - # Start the "Windows Cleanup" task if the "Run" button clicked - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force + # Start the "Windows Cleanup" task if the "Run" button clicked + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force - $ToastNotification = @" + $ToastNotification = @" [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null @@ -9819,21 +9953,22 @@ while (`$true) [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Windows Cleanup Notification" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm - $Parameters = @{ - TaskName = "Windows Cleanup Notification" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup Notification" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm + $Parameters = @{ + TaskName = "Windows Cleanup Notification" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.CleanupNotificationTaskDescription + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { @@ -9843,8 +9978,7 @@ while (`$true) Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -Force -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup" -Confirm:$false -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName "Windows Cleanup", "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore Remove-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Recurse -Force -ErrorAction Ignore } @@ -9896,14 +10030,16 @@ function SoftwareDistributionTask { "Register" { - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "SoftwareDistribution" -ErrorAction Ignore)) { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - $SoftwareDistributionTask = @" + $SoftwareDistributionTask = @" (Get-Service -Name wuauserv).WaitForStatus('Stopped', '01:00:00') Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -Force | Remove-Item -Recurse -Force @@ -9933,25 +10069,26 @@ Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -For [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "SoftwareDistribution" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm - $Parameters = @{ - TaskName = "SoftwareDistribution" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" - } - Register-ScheduledTask @Parameters -Force + # Create the "SoftwareDistribution" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm + $Parameters = @{ + TaskName = "SoftwareDistribution" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore } } } @@ -10001,7 +10138,9 @@ function TempTask { "Register" { - $TempTask = @" + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Temp" -ErrorAction Ignore)) + { + $TempTask = @" Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Recurse -Force [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null @@ -10030,25 +10169,26 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Temp" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm - $Parameters = @{ - TaskName = "Temp" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" - } - Register-ScheduledTask @Parameters -Force + # Create the "Temp" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm + $Parameters = @{ + TaskName = "Temp" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%TEMP%" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName Temp -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName Temp -Confirm:$false -ErrorAction Ignore } } } @@ -10169,66 +10309,6 @@ function PUAppsDetection } } -<# - .SYNOPSIS - Sandboxing for Microsoft Defender - - .PARAMETER Enable - Enable sandboxing for Microsoft Defender - - .PARAMETER Disable - Disable sandboxing for Microsoft Defender - - .EXAMPLE - DefenderSandbox -Enable - - .EXAMPLE - DefenderSandbox -Disable - - .NOTES - There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows - - .NOTES - Machine-wide -#> -function DefenderSandbox -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Enable" - )] - [switch] - $Enable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Enable" - { - if ((Get-MpComputerStatus).AntivirusEnabled) - { - setx /M MP_FORCE_USE_SANDBOX 1 - } - } - "Disable" - { - if ((Get-MpComputerStatus).AntivirusEnabled) - { - setx /M MP_FORCE_USE_SANDBOX 0 - } - } - } -} - # Dismiss Microsoft Defender offer in the Windows Security about signing in Microsoft account function DismissMSAccount { @@ -11681,22 +11761,22 @@ function UseStoreOpenWith { "Hide" { - if (-not (Test-Path -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) + if (-not (Test-Path -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) { - New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force + New-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force } "Show" { - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore } } } <# .SYNOPSIS - The "Open in Windows Terminal" item in the context menu + 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 diff --git a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1 b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1 index 4d2f45fb..f13d5e34 100644 --- a/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1 +++ b/Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS Default preset file for "Sophia Script for Windows 11" - Version: v6.0.13 - Date: 27.02.2022 + Version: v6.0.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -25,9 +25,9 @@ irm script.sophi.app | iex .NOTES - Supported Windows 11 version + Minimum Supported Windows 11 version Version: 21H2 - Build: 22000.438 + Build: 22000.556, 22509 Editions: Home/Pro/Enterprise .NOTES @@ -70,7 +70,7 @@ param Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.13 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.14 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force @@ -261,7 +261,7 @@ ThisPC -Show # Enable the Windows 10 File Explorer # Включить проводник из Windows 10 -Windows10FileExplorer -Enable +# Windows10FileExplorer -Enable # Disable the Windows 10 File Explorer (default value) # Выключить проводник из Windows 10 (значение по умолчанию) @@ -387,7 +387,7 @@ TaskbarSearch -Hide # Отобразить кнопку поиска на панели задач # TaskbarSearch -Show -# Hide the Task view button on the taskbar +# Hide the Task view button from the taskbar # Скрыть кнопку "Представление задач" с панели задач TaskViewButton -Hide @@ -511,7 +511,7 @@ AeroShaking -Enable #region OneDrive # Uninstall OneDrive. The OneDrive user folder won't be removed # Удалить OneDrive. Папка пользователя OneDrive не будет удалена -OneDrive -Uninstall +# OneDrive -Uninstall # Install OneDrive 64-bit (default value) # Установить OneDrive 64-бит (значение по умолчанию) @@ -917,6 +917,18 @@ RunPowerShellShortcut -Elevated # Run the Windows PowerShell shortcut from the Start menu as user (default value) # Запускать ярлык Windows PowerShell в меню "Пуск" от имени пользователя (значение по умолчанию) # RunPowerShellShortcut -NonElevated + +# Show default Start layout (for 22509+ build only) (default value) +# Отображать стандартный макет начального экрана (только для сборки 22509+) (значение по умолчанию) +# StartLayout -Default + +# Show more pins on Start (for 22509+ build only) +# Отображать больше закреплений на начальном экране (только для сборки 22509+) +StartLayout -ShowMorePins + +# Show more recommendations on Start (for 22509+ build only) +# Отображать больше рекомендаций на начальном экране (только для сборки 22509+) +StartLayout -ShowMoreRecommendations #endregion Start menu #region UWP apps @@ -966,7 +978,7 @@ CortanaAutostart -Disable TeamsAutostart -Disable # Enable Microsoft Teams autostarting (default value) -# Включить автозагрузкуMicrosoft Teams (значение по умолчанию) +# Включить автозагрузку Microsoft Teams (значение по умолчанию) # TeamsAutostart -Enable # Check for UWP apps updates @@ -1067,19 +1079,6 @@ PUAppsDetection -Enable # Выключить обнаружение потенциально нежелательных приложений и блокировать их (значение по умолчанию) # PUAppsDetection -Disable -<# - Enable sandboxing for Microsoft Defender - There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows - - Включить песочницу для Microsoft Defender - В KVM с QEMU присутствует баг: включение этой функции приводит ВМ к зависанию во время загрузки Windows -#> -DefenderSandbox -Enable - -# Disable sandboxing for Microsoft Defender (default value) -# Выключить песочницу для Microsoft Defender (значение по умолчанию) -# DefenderSandbox -Disable - # Dismiss Microsoft Defender offer in the Windows Security about signing in Microsoft account # Отклонить предложение Microsoft Defender в "Безопасность Windows" о входе в аккаунт Microsoft DismissMSAccount diff --git a/Sophia Script/Sophia Script for Windows 11/Functions.ps1 b/Sophia Script/Sophia Script for Windows 11/Functions.ps1 index 4bf0606f..ab4e6259 100644 --- a/Sophia Script/Sophia Script for Windows 11/Functions.ps1 +++ b/Sophia Script/Sophia Script for Windows 11/Functions.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS The TAB completion for functions and their arguments - Version: v6.0.13 - Date: 27.02.2022 + Version: v6.0.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -54,7 +54,7 @@ function Sophia Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.13 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.14 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/de-DE/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/de-DE/Sophia.psd1 index dcdc140c..e3c43fec 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/de-DE/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/de-DE/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Das Skript unterstützt Windows 11 2004/20H2/21H1-Versionen und höher -UpdateWarning = Ihr Windows 11-Build: {0}.{1}. Unterstützter Build: 22000.438 und höher +UpdateWarning = Ihr Windows 11-Build: {0}.{1}. Unterstützter Builds: 22000.556, 22509 und höher UnsupportedLanguageMode = Die PowerShell-Sitzung wird in einem eingeschränkten Sprachmodus ausgeführt LoggedInUserNotAdmin = Der angemeldete Benutzer hat keine Administratorrechte UnsupportedPowerShell = Sie versuchen ein Skript über PowerShell {0}.{1} auszuführen. Das Skript in der entsprechenden PowerShell-Version ausführen UnsupportedISE = Das Skript unterstützt nicht die Ausführung über Windows PowerShell ISE Win10TweakerWarning = Wahrscheinlich wurde Ihr Betriebssystem über die Win 10 Tweaker-Hintertür infiziert Windows10DebloaterWarning = Die Stabilität des Windows-Betriebssystems kann durch die Verwendung des Windows10Debloater PowerShell-Skripts von Sycnex beeinträchtigt worden sein. Installieren Sie vorsorglich das gesamte Betriebssystem neu +RebootPending = Der PC wartet darauf, neu gestartet zu werden UnsupportedRelease = Neue Version gefunden CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen? ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/en-US/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/en-US/Sophia.psd1 index bd1f1c85..ed685ed3 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/en-US/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/en-US/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = The script supports Windows 11 21H2 version and higher -UpdateWarning = Your Windows 11 build: {0}.{1}. Supported build: 22000.438 and higher +UpdateWarning = Your Windows 11 build: {0}.{1}. Supported builds: 22000.556, 22509 and higher UnsupportedLanguageMode = The PowerShell session in running in a limited language mode LoggedInUserNotAdmin = The logged-on user doesn't have admin rights UnsupportedPowerShell = You're trying to run script via PowerShell {0}.{1}. Run the script in the appropriate PowerShell version UnsupportedISE = The script doesn't support running via Windows PowerShell ISE Win10TweakerWarning = Probably your OS was infected via the Win 10 Tweaker backdoor Windows10DebloaterWarning = The Windows OS stability may have been compromised by using Sycnex's Windows10Debloater PowerShell script. Preventively, reinstall the entire OS +RebootPending = The PC is waiting to be restarted UnsupportedRelease = A new version found CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script? ControlledFolderAccessDisabled = Controlled folder access disabled diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/es-ES/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/es-ES/Sophia.psd1 index 04619c7b..073f8390 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/es-ES/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/es-ES/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = El script es compatible con versión Windows 11 21H2 y superiores -UpdateWarning = Su build de Windows 11: {0}.{1}. Compilación compatible: 22000.438 y superiores +UpdateWarning = Su build de Windows 11: {0}.{1}. Compilaciones compatibles: 22000.556, 22509 y superiores UnsupportedLanguageMode = Sesión de PowerShell ejecutada en modo de lenguaje limitado LoggedInUserNotAdmin = El usuario que inició sesión no tiene derechos de administrador UnsupportedPowerShell = Estás intentando ejecutar el script a través de PowerShell {0}.{1}. Ejecute el script en la versión apropiada de PowerShell UnsupportedISE = El script no es compatible con la ejecución a través de Windows PowerShell ISE Win10TweakerWarning = Probablemente su sistema operativo fue infectado a través del backdoor Win 10 Tweaker Windows10DebloaterWarning = La estabilidad del sistema operativo Windows puede haberse visto comprometida al utilizar el script PowerShell Windows10Debloater de Sycnex. De forma preventiva, reinstale todo el sistema operativo +RebootPending = El PC está esperando a ser reiniciado UnsupportedRelease = Una nueva versión encontrada CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script? ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/fr-FR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/fr-FR/Sophia.psd1 index b4c49c7a..fc6e23fc 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/fr-FR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/fr-FR/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Le script supporte les versions Windows 11 21H2 et ultérieures -UpdateWarning = Votre version de Windows 11 : {0}.{1}. Version prise en charge : 22000.438 et ultérieures +UpdateWarning = Votre version de Windows 11 : {0}.{1}. Versions prises en charge: 22000.556, 22509 et ultérieures UnsupportedLanguageMode = La session PowerShell s'exécute dans un mode de langue limité LoggedInUserNotAdmin = L'utilisateur connecté n'a pas de droits d'administrateur UnsupportedPowerShell = Vous essayez d'exécuter le script via PowerShell {0}.{1}. Exécutez le script dans la version appropriée de PowerShell UnsupportedISE = Le script ne supporte pas l'exécution via Windows PowerShell ISE Win10TweakerWarning = Votre système d'exploitation a probablement été infecté par la porte dérobée Win 10 Tweaker Windows10DebloaterWarning = La stabilité de l'OS Windows peut avoir été compromise par l'utilisation du script PowerShell Windows10Debloater de Sycnex. De manière préventive, réinstallez l'ensemble de l'OS +RebootPending = Le PC attend d'être redémarré UnsupportedRelease = Nouvelle version trouvée CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script? ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/hu-HU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/hu-HU/Sophia.psd1 index ec6155b6..16d00794 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/hu-HU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/hu-HU/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = A szkript a Windows 11 21H2 és újabb kiadásokat támogatja -UpdateWarning = Az Ön Windows 11 építése: {0}.{1}. Támogatott build: 22000.438 és magasabb verziószámok +UpdateWarning = Az Ön Windows 11 építése: {0}.{1}. Támogatott buildek: 22000.556, 22509 és magasabb verziószámok UnsupportedLanguageMode = A PowerShell munkamenet korlátozott nyelvi üzemmódban fut LoggedInUserNotAdmin = A bejelentkezett felhasználó nem rendelkezik admin jogokkal UnsupportedPowerShell = A PowerShell {0}.{1} segítségével próbálja futtatni a szkriptet. Futtassa a szkriptet a megfelelő PowerShell-verzióban UnsupportedISE = A szkript nem támogatja a Windows PowerShell ISE futtatását Win10TweakerWarning = Valószínűleg az operációs rendszerét a Win 10 Tweaker backdoor segítségével fertőzték meg Windows10DebloaterWarning = A Windows operációs rendszer stabilitását veszélyeztethette a Sycnex Windows10Debloater PowerShell szkriptje. Megelőzésképpen telepítse újra a teljes operációs rendszert +RebootPending = A számítógép újraindításra vár UnsupportedRelease = Új verzió érhető el CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet? ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/it-IT/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/it-IT/Sophia.psd1 index 3d11e4d0..2f638fc0 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/it-IT/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/it-IT/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Lo script supporta Windows 11, 21H2 versioni e superiori -UpdateWarning = La tua build di Windows 11: {0}.{1}. Build supportata: 22000.438 e successive +UpdateWarning = La tua build di Windows 11: {0}.{1}. Build supportate: 22000.556, 22509 e successive UnsupportedLanguageMode = La sessione PowerShell è in esecuzione in una modalità di lingua limitata LoggedInUserNotAdmin = L'utente connesso non ha i diritti di amministratore UnsupportedPowerShell = Stai cercando di eseguire lo script tramite PowerShell {0}.{1}. Esegui lo script nella versione di PowerShell appropriata UnsupportedISE = Lo script non supporta l'esecuzione tramite Windows PowerShell ISE Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = La stabilità del sistema operativo Windows potrebbe essere stata compromessa dall'utilizzo dello script PowerShell Windows10Debloater di Sycnex. Preventivamente, reinstallare l'intero sistema operativo +RebootPending = Il PC è in attesa di essere riavviato UnsupportedRelease = Nuova versione trovata CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file delle preimpostazioni {0} prima di eseguire Sophia Script? ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/pt-BR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/pt-BR/Sophia.psd1 index 6d5ed400..495174db 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/pt-BR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/pt-BR/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = O script suporta versões Windows 11 21H2 e superior -UpdateWarning = La tua build di Windows 11: {0}.{1}. Build supportata: 22000.438 e successive +UpdateWarning = La tua build di Windows 11: {0}.{1}. Build suportadas: 22000.556, 22509 e successive UnsupportedLanguageMode = A sessão PowerShell em funcionamento em um modo de linguagem limitada LoggedInUserNotAdmin = O usuário logado não tem direitos de administrador UnsupportedPowerShell = Você está tentando executar o script via PowerShell {0}.{1}. Execute o script na versão apropriada do PowerShell UnsupportedISE = O guião não suporta a execução através do Windows PowerShell ISE Win10TweakerWarning = Probabilmente il tuo sistema operativo è stato infettato tramite la backdoor Win 10 Tweaker Windows10DebloaterWarning = A estabilidade do sistema operacional Windows pode ter sido comprometida pela utilização do script Windows10Debloater PowerShell da Sycnex. Preventivamente, reinstale todo o sistema operacional +RebootPending = O PC está esperando para ser reiniciado UnsupportedRelease = Nova versão encontrada CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script? ControlledFolderAccessDisabled = Acesso controlado a pasta desativada diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/ru-RU/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/ru-RU/Sophia.psd1 index 01318c39..5d21a54f 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/ru-RU/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/ru-RU/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Скрипт поддерживает только Windows 11 21H2 и выше -UpdateWarning = Ваш билд Windows 11: {0}.{1}. Поддерживаемый билд: 22000.438 и выше +UpdateWarning = Ваш билд Windows 11: {0}.{1}. Поддерживаемые сборки: 22000.556, 22509 и выше UnsupportedLanguageMode = Сессия PowerShell работает в ограниченном режиме LoggedInUserNotAdmin = Текущий вошедший пользователь не обладает правами администратора UnsupportedPowerShell = Вы пытаетесь запустить скрипт в PowerShell {0}.{1}. Запустите скрипт в соответствующей версии PowerShell UnsupportedISE = Скрипт не поддерживает работу через Windows PowerShell ISE -Win10TweakerWarning = Ваша ОС, возможно, через бэкдор в Win 10 Tweaker была заражена трояном +Win10TweakerWarning = Ваша ОС, возможно, через бэкдор в Win 10 Tweaker была заражена трояном. Подробнее: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабильность Вашей ОС могла быть нарушена использованием скрипта Windows10Debloater от Sycnex. В целях профилактики переустановите ОС +RebootPending = Компьютер ожидает перезагрузки UnsupportedRelease = Обнаружена новая версия CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/tr-TR/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/tr-TR/Sophia.psd1 index 7dcc47b9..147e9995 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/tr-TR/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/tr-TR/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Bu betik sadece Windows 11 21H2 sürüm ve üstünü destekliyor -UpdateWarning = Windows 11 yapınız: {0}.{1}. Desteklenen yapı: 22000.438 ve üstünü destekliyor +UpdateWarning = Windows 11 yapınız: {0}.{1}. Desteklenen yapılar: 22000.556, 22509 ve üstünü destekliyor UnsupportedLanguageMode = Sınırlı bir dil modunda çalışan PowerShell oturumu LoggedInUserNotAdmin = Oturum açan kullanıcının yönetici hakları yok UnsupportedPowerShell = Komut dosyasını PowerShell {0}.{1} aracılığıyla çalıştırmaya çalışıyorsunuz. Komut dosyasını uygun PowerShell sürümünde çalıştırın UnsupportedISE = Komut dosyası, Windows PowerShell ISE üzerinden çalıştırmayı desteklemiyor Win10TweakerWarning = Muhtemelen işletim sisteminize Win 10 Tweaker arka kapısı yoluyla bulaştı Windows10DebloaterWarning = Windows işletim sistemi kararlılığı, Sycnex'in Windows10Debloater PowerShell betiği kullanılarak tehlikeye atılmış olabilir. Önleyici olarak, tüm işletim sistemini yeniden yükleyin +RebootPending = PC yeniden başlatılmayı bekliyor UnsupportedRelease = Yeni sürüm bulundu CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi? ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/uk-UA/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/uk-UA/Sophia.psd1 index aa547adf..6c41f2d3 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/uk-UA/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/uk-UA/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = Скрипт підтримує тільки Windows 11 версії 21H2 та вище -UpdateWarning = Ваш білд Windows 11: {0}.{1}. Підтримуваний білд: 22000.438 та вище +UpdateWarning = Ваш білд Windows 11: {0}.{1}. Підтримуваний збірки: 22000.556, 22509 та вище UnsupportedLanguageMode = Сесія PowerShell працює в обмеженому режимі LoggedInUserNotAdmin = Поточний увійшов користувач не володіє правами адміністратора UnsupportedPowerShell = Ви намагаєтеся запустити скрипт в PowerShell {0}.{1}. Запустіть скрипт у відповідній версії PowerShell UnsupportedISE = Скрипт не підтримує роботу через Windows PowerShell ISE Win10TweakerWarning = Ваша ОС, можливо, через бекдор в Win 10 Tweaker заражена трояном. Детальніше: https://itnan.ru/post.php?c=1&p=557388 Windows10DebloaterWarning = Стабільність вашої ОС могла бути порушена використанням скрипту Windows10Debloater від Sycnex. З метою профілактики перевстановіть ОС +RebootPending = Комп'ютер очікує на перезавантаження UnsupportedRelease = Виявлено нову версію CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script? ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений diff --git a/Sophia Script/Sophia Script for Windows 11/Localizations/zh-CN/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Localizations/zh-CN/Sophia.psd1 index c180754c..50f9ff2c 100644 --- a/Sophia Script/Sophia Script for Windows 11/Localizations/zh-CN/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Localizations/zh-CN/Sophia.psd1 @@ -1,12 +1,13 @@ ConvertFrom-StringData -StringData @' UnsupportedOSBuild = 该脚本支持Windows 11版本21H2和更高版本 -UpdateWarning = 您的Windows 11构建。{0}.{1}。支持的构建。22000.438和更高版本 +UpdateWarning = 您的Windows 11构建。{0}.{1}。支持的构建: 22000.556, 22509和更高版本 UnsupportedLanguageMode = PowerShell会话在有限的语言模式下运行 LoggedInUserNotAdmin = 登录的用户没有管理员的权利 UnsupportedPowerShell = 你想通过PowerShell {0}.{1}运行脚本。在适当的PowerShell版本中运行该脚本 UnsupportedISE = 该脚本不支持通过Windows PowerShell ISE运行 Win10TweakerWarning = 可能你的操作系统是通过“Win 10 Tweaker”后门感染的 Windows10DebloaterWarning = 使用Sycnex的Windows10Debloater PowerShell脚本,Windows操作系统的稳定性可能已经受到影响。预防性地,重新安装整个操作系统 +RebootPending = 计算机正在等待重新启动 UnsupportedRelease = 找到新版本 CustomizationWarning = \n在运行Sophia Script之前,您是否已自定义{0}预设文件中的每个函数? ControlledFolderAccessDisabled = “受控文件夹访问”已禁用 diff --git a/Sophia Script/Sophia Script for Windows 11/Manifest/Sophia.psd1 b/Sophia Script/Sophia Script for Windows 11/Manifest/Sophia.psd1 index c01c7f6b..499593e3 100644 --- a/Sophia Script/Sophia Script for Windows 11/Manifest/Sophia.psd1 +++ b/Sophia Script/Sophia Script for Windows 11/Manifest/Sophia.psd1 @@ -1,6 +1,6 @@ @{ RootModule = '..\Module\Sophia.psm1' - ModuleVersion = '6.0.13' + ModuleVersion = '6.0.14' GUID = '109cc881-c42b-45af-a74a-550781989d6a' Author = 'Dmitry "farag" Nefedov' Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved' diff --git a/Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1 b/Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1 index 9a588afd..3bb7c3e3 100644 --- a/Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1 +++ b/Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1 @@ -2,8 +2,8 @@ .SYNOPSIS Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks - Version: v6.0.13 - Date: 27.02.2022 + Version: v6.0.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -14,9 +14,9 @@ Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring .NOTES - Supported Windows 11 version + Minimum Supported Windows 11 version Version: 21H2 - Build: 22000.438 + Build: 22000.556, 22509 Editions: Home/Pro/Enterprise .NOTES @@ -62,23 +62,15 @@ function Checkings $false { Write-Warning -Message $Localization.UnsupportedOSBuild - exit - } - } - - # Check whether the OS minor build version is 438 minimum - switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 438) - { - $false - { - $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" - Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version.UBR) - # Receive updates for other Microsoft products when you update Windows + # Enable receiving updates for other Microsoft products when you update Windows (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") Start-Sleep -Seconds 1 + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + # Open the "Windows Update" page Start-Process -FilePath "ms-settings:windowsupdate-action" @@ -91,6 +83,37 @@ function Checkings } } + # Check whether the OS minor build version is 556 minimum + switch ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -ge 556) + { + $false + { + if ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber -lt 22509) + { + $Version = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" + Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version.UBR) + + # Enable receiving updates for other Microsoft products when you update Windows + (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + + Start-Sleep -Seconds 1 + + # Check for UWP apps updates + Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod + + # Open the "Windows Update" page + Start-Process -FilePath "ms-settings:windowsupdate-action" + + Start-Sleep -Seconds 1 + + # Trigger Windows Update for detecting new updates + (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() + + exit + } + } + } + # Check the language mode switch ($ExecutionContext.SessionState.LanguageMode -ne "FullLanguage") { @@ -132,7 +155,7 @@ function Checkings exit } - # Check whether the OS was infected by Win 10 Tweaker's trojan + # Check whether the OS was infected by the Win 10 Tweaker's trojan # https://win10tweaker.ru if (Test-Path -Path "HKCU:\Software\Win 10 Tweaker") { @@ -152,6 +175,22 @@ function Checkings exit } + # Check for a pending reboot + $PendingActions = @( + # CBS pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending", + # Windows Update pending + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting", + "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" + ) + if ($null -ne (Get-Item -Path $PendingActions -Force -ErrorAction Ignore)) + { + Write-Warning -Message $Localization.RebootPending + exit + } + # Check if the current module version is the latest one try { @@ -6795,13 +6834,13 @@ function CapsLock <# .SYNOPSIS - The keyboard schortcut for Stick keys + The shortcut to start Sticky Keys .PARAMETER Disable - Turn off pressing the Shift key 5 times to turn Sticky keys + Turn off Sticky keys by pressing the Shift key 5 times .PARAMETER Enable - Turn on pressing the Shift key 5 times to turn Sticky keys + Turn on Sticky keys by pressing the Shift key 5 times .EXAMPLE StickyShift -Disable @@ -7861,22 +7900,27 @@ function DefaultTerminalApp { if (Get-AppxPackage -Name Microsoft.WindowsTerminal) { - if (-not (Test-Path -Path "HKCU:\Console\%%Startup")) + # Checking if the Terminal version supports such feature + $TerminalVersion = (Get-AppxPackage -Name Microsoft.WindowsTerminal).Version + if ([System.Version]$TerminalVersion -ge [System.Version]"1.11") { - New-Item -Path "HKCU:\Console\%%Startup" -Force - } - - # Find the current GUID of Windows Terminal - $PackageFullName = (Get-AppxPackage -Name Microsoft.WindowsTerminal).PackageFullName - Get-ChildItem -Path "HKLM:\SOFTWARE\Classes\PackagedCom\Package\$PackageFullName\Class" | ForEach-Object -Process { - if ((Get-ItemPropertyValue -Path $_.PSPath -Name ServerId) -eq 0) + if (-not (Test-Path -Path "HKCU:\Console\%%Startup")) { - New-ItemProperty -Path "HKCU:\Console\%%Startup" -Name DelegationConsole -PropertyType String -Value $_.PSChildName -Force + New-Item -Path "HKCU:\Console\%%Startup" -Force } - if ((Get-ItemPropertyValue -Path $_.PSPath -Name ServerId) -eq 1) - { - New-ItemProperty -Path "HKCU:\Console\%%Startup" -Name DelegationTerminal -PropertyType String -Value $_.PSChildName -Force + # Find the current GUID of Windows Terminal + $PackageFullName = (Get-AppxPackage -Name Microsoft.WindowsTerminal).PackageFullName + Get-ChildItem -Path "HKLM:\SOFTWARE\Classes\PackagedCom\Package\$PackageFullName\Class" | ForEach-Object -Process { + if ((Get-ItemPropertyValue -Path $_.PSPath -Name ServerId) -eq 0) + { + New-ItemProperty -Path "HKCU:\Console\%%Startup" -Name DelegationConsole -PropertyType String -Value $_.PSChildName -Force + } + + if ((Get-ItemPropertyValue -Path $_.PSPath -Name ServerId) -eq 1) + { + New-ItemProperty -Path "HKCU:\Console\%%Startup" -Name DelegationTerminal -PropertyType String -Value $_.PSChildName -Force + } } } } @@ -7906,16 +7950,25 @@ function InstallVCRedistx64 { $DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" $Parameters = @{ - Uri = "https://aka.ms/vs/16/release/vc_redist.x64.exe" - OutFile = "$DownloadsFolder\vc_redist.x64.exe" + Uri = "https://aka.ms/vs/17/release/VC_redist.x64.exe" + OutFile = "$DownloadsFolder\VC_redist.x64.exe" UseBasicParsing = $true Verbose = $true } Invoke-WebRequest @Parameters - Start-Process -FilePath "$DownloadsFolder\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\VC_redist.x64.exe" -ArgumentList "/install /passive /norestart" -Wait - Remove-Item -Path "$DownloadsFolder\vc_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force -ErrorAction Ignore + <# + PowerShell 5.1 (7.2 too) interprets the 8.3 file name literally, if an environment variable contains a non-latin word, + so you won't be able to remove "$env:TEMP\dd_vcredist_amd64_*.log" file explicitly + + Another ways to get normal path to %TEMP% + [Environment]::GetEnvironmentVariable("TEMP", "User") + (Get-ItemProperty -Path HKCU:\Environment -Name TEMP).TEMP + [System.IO.Path]::GetTempPath() + #> + Get-ChildItem -Path "$DownloadsFolder\VC_redist.x64.exe", "$env:TEMP\dd_vcredist_amd64_*.log" -Force | Remove-Item -Recurse -Force -ErrorAction Ignore } #endregion System @@ -8182,6 +8235,85 @@ function RunPowerShellShortcut } } } + +<# + .SYNOPSIS + Configure Start layout + + .PARAMETER Default + Show default Start layout + + .PARAMETER ShowMorePins + Show more pins on Start + + .PARAMETER ShowMoreRecommendations + Show more recommendations on Start + + .EXAMPLE + RunPowerShellShortcut -Default + + .EXAMPLE + RunPowerShellShortcut -ShowMorePins + + .EXAMPLE + RunPowerShellShortcut -ShowMoreRecommendations + + .NOTES + For Windows 11 Insider Preview 22509+ build only + + .NOTES + Current user + + +#> +function StartLayout +{ + param + ( + [Parameter( + Mandatory = $true, + ParameterSetName = "Default" + )] + [switch] + $Default, + + [Parameter( + Mandatory = $true, + ParameterSetName = "ShowMorePins" + )] + [switch] + $ShowMorePins, + + [Parameter( + Mandatory = $true, + ParameterSetName = "ShowMoreRecommendations" + )] + [switch] + $ShowMoreRecommendations + ) + + if ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber -ge 22509) + { + switch ($PSCmdlet.ParameterSetName) + { + "Default" + { + # Default + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name Start_Layout -PropertyType DWord -Value 0 -Force + } + "ShowMorePins" + { + # Show More Pins + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name Start_Layout -PropertyType DWord -Value 1 -Force + } + "ShowMoreRecommendations" + { + # Show More Recommendations + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name Start_Layout -PropertyType DWord -Value 2 -Force + } + } + } +} #endregion Start menu #region UWP apps @@ -9584,41 +9716,43 @@ function CleanupTask { "Register" { - Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { - Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore - } + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Windows Cleanup" -ErrorAction Ignore)) + { + Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches | ForEach-Object -Process { + Remove-ItemProperty -Path $_.PsPath -Name StateFlags1337 -Force -ErrorAction Ignore + } - $VolumeCaches = @( - # Delivery Optimization Files - "Delivery Optimization Files", + $VolumeCaches = @( + # Delivery Optimization Files + "Delivery Optimization Files", - # Device driver packages - "Device Driver Packages", + # Device driver packages + "Device Driver Packages", - # Previous Windows Installation(s) - "Previous Installations", + # Previous Windows Installation(s) + "Previous Installations", - # Setup log files - "Setup Log Files", + # Setup log files + "Setup Log Files", - # Temporary Setup Files - "Temporary Setup Files", + # Temporary Setup Files + "Temporary Setup Files", - # Windows Update Cleanup - "Update Cleanup", + # Windows Update Cleanup + "Update Cleanup", - # Microsoft Defender - "Windows Defender", + # Microsoft Defender + "Windows Defender", - # Windows upgrade log files - "Windows Upgrade Log Files" - ) - foreach ($VolumeCache in $VolumeCaches) - { - New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force - } + # Windows upgrade log files + "Windows Upgrade Log Files" + ) + foreach ($VolumeCache in $VolumeCaches) + { + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force + } - $CleanupTask = @" + $CleanupTask = @" Get-Process -Name cleanmgr | Stop-Process -Force Get-Process -Name Dism | Stop-Process -Force Get-Process -Name DismHost | Stop-Process -Force @@ -9686,40 +9820,40 @@ while (`$true) `$Process.Start() | Out-Null "@ - # Create the "Windows Cleanup" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Parameters = @{ - TaskName = "Windows Cleanup" - TaskPath = "Sophia Script" - Principal = $Principal - Action = $Action - Description = $Localization.CleanupTaskDescription - Settings = $Settings - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $CleanupTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Parameters = @{ + TaskName = "Windows Cleanup" + TaskPath = "Sophia Script" + Principal = $Principal + Action = $Action + Description = $Localization.CleanupTaskDescription + Settings = $Settings + } + Register-ScheduledTask @Parameters -Force - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) - { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast - if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) - { - New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force - } - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force + # Register the "WindowsCleanup" protocol to be able to run the scheduled task by clicking the "Run" button in a toast + if (-not (Test-Path -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command)) + { + New-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Force + } + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "(default)" -PropertyType String -Value "URL:WindowsCleanup" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name "URL Protocol" -PropertyType String -Value "" -Force + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Name EditFlags -PropertyType DWord -Value 2162688 -Force - # Start the "Windows Cleanup" task if the "Run" button clicked - New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force + # Start the "Windows Cleanup" task if the "Run" button clicked + New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup\shell\open\command -Name "(default)" -PropertyType String -Value 'powershell.exe -Command "& {Start-ScheduledTask -TaskPath ''\Sophia Script\'' -TaskName ''Windows Cleanup''}"' -Force - $ToastNotification = @" + $ToastNotification = @" [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null @@ -9761,21 +9895,22 @@ while (`$true) [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Windows Cleanup Notification" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm - $Parameters = @{ - TaskName = "Windows Cleanup Notification" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription - } - Register-ScheduledTask @Parameters -Force + # Create the "Windows Cleanup Notification" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $ToastNotification" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm + $Parameters = @{ + TaskName = "Windows Cleanup Notification" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.CleanupNotificationTaskDescription + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { @@ -9785,8 +9920,7 @@ while (`$true) Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -Force -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup" -Confirm:$false -ErrorAction Ignore - Unregister-ScheduledTask -TaskName "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName "Windows Cleanup", "Windows Cleanup Notification" -Confirm:$false -ErrorAction Ignore Remove-Item -Path Registry::HKEY_CLASSES_ROOT\WindowsCleanup -Recurse -Force -ErrorAction Ignore } @@ -9838,14 +9972,16 @@ function SoftwareDistributionTask { "Register" { - # Persist the Settings notifications to prevent to immediately disappear from Action Center - if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "SoftwareDistribution" -ErrorAction Ignore)) { - New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force - } - New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force + # Persist the Settings notifications to prevent to immediately disappear from Action Center + if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel")) + { + New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Force + } + New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -Name ShowInActionCenter -PropertyType DWord -Value 1 -Force - $SoftwareDistributionTask = @" + $SoftwareDistributionTask = @" (Get-Service -Name wuauserv).WaitForStatus('Stopped', '01:00:00') Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -Force | Remove-Item -Recurse -Force @@ -9875,25 +10011,26 @@ Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -For [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "SoftwareDistribution" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm - $Parameters = @{ - TaskName = "SoftwareDistribution" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" - } - Register-ScheduledTask @Parameters -Force + # Create the "SoftwareDistribution" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $SoftwareDistributionTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 90 -At 9pm + $Parameters = @{ + TaskName = "SoftwareDistribution" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName SoftwareDistribution -Confirm:$false -ErrorAction Ignore } } } @@ -9943,7 +10080,9 @@ function TempTask { "Register" { - $TempTask = @" + if (-not (Get-ScheduledTask -TaskPath "\SophiApp\" -TaskName "Temp" -ErrorAction Ignore)) + { + $TempTask = @" Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Recurse -Force [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null @@ -9972,25 +10111,26 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("""windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel""").Show(`$ToastMessage) "@ - # Create the "Temp" task - $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" - $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable - $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest - $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm - $Parameters = @{ - TaskName = "Temp" - TaskPath = "Sophia Script" - Action = $Action - Settings = $Settings - Principal = $Principal - Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" - } - Register-ScheduledTask @Parameters -Force + # Create the "Temp" task + $Action = New-ScheduledTaskAction -Execute powershell.exe -Argument "-WindowStyle Hidden -Command $TempTask" + $Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable + $Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest + $Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 60 -At 9pm + $Parameters = @{ + TaskName = "Temp" + TaskPath = "Sophia Script" + Action = $Action + Settings = $Settings + Principal = $Principal + Trigger = $Trigger + Description = $Localization.FolderTaskDescription -f "%TEMP%" + } + Register-ScheduledTask @Parameters -Force + } } "Delete" { - Unregister-ScheduledTask -TaskName Temp -Confirm:$false -ErrorAction Ignore + Unregister-ScheduledTask -TaskPath "\Sophia Script\" -TaskName Temp -Confirm:$false -ErrorAction Ignore } } } @@ -10111,66 +10251,6 @@ function PUAppsDetection } } -<# - .SYNOPSIS - Sandboxing for Microsoft Defender - - .PARAMETER Enable - Enable sandboxing for Microsoft Defender - - .PARAMETER Disable - Disable sandboxing for Microsoft Defender - - .EXAMPLE - DefenderSandbox -Enable - - .EXAMPLE - DefenderSandbox -Disable - - .NOTES - There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows - - .NOTES - Machine-wide -#> -function DefenderSandbox -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Enable" - )] - [switch] - $Enable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Enable" - { - if ((Get-MpComputerStatus).AntivirusEnabled) - { - setx /M MP_FORCE_USE_SANDBOX 1 - } - } - "Disable" - { - if ((Get-MpComputerStatus).AntivirusEnabled) - { - setx /M MP_FORCE_USE_SANDBOX 0 - } - } - } -} - # Dismiss Microsoft Defender offer in the Windows Security about signing in Microsoft account function DismissMSAccount { @@ -11623,15 +11703,15 @@ function UseStoreOpenWith { "Hide" { - if (-not (Test-Path -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) + if (-not (Test-Path -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) { - New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force + New-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -PropertyType DWord -Value 1 -Force } "Show" { - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoUseStoreOpenWith -Force -ErrorAction Ignore } } } diff --git a/Sophia Script/Sophia Script for Windows 11/Sophia.ps1 b/Sophia Script/Sophia Script for Windows 11/Sophia.ps1 index fea74c6b..eb468d78 100644 --- a/Sophia Script/Sophia Script for Windows 11/Sophia.ps1 +++ b/Sophia Script/Sophia Script for Windows 11/Sophia.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS Default preset file for "Sophia Script for Windows 11" - Version: v6.0.13 - Date: 27.02.2022 + Version: v6.0.14 + Date: 09.04.2022 Copyright (c) 2014—2022 farag Copyright (c) 2019—2022 farag & Inestic @@ -25,9 +25,9 @@ irm script.sophi.app | iex .NOTES - Supported Windows 11 version + Minimum Supported Windows 11 version Version: 21H2 - Build: 22000.438 + Build: 22000.556, 22509 Editions: Home/Pro/Enterprise .NOTES @@ -70,7 +70,7 @@ param Clear-Host -$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.13 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" +$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.14 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force @@ -261,7 +261,7 @@ ThisPC -Show # Enable the Windows 10 File Explorer # Включить проводник из Windows 10 -Windows10FileExplorer -Enable +# Windows10FileExplorer -Enable # Disable the Windows 10 File Explorer (default value) # Выключить проводник из Windows 10 (значение по умолчанию) @@ -511,7 +511,7 @@ AeroShaking -Enable #region OneDrive # Uninstall OneDrive. The OneDrive user folder won't be removed # Удалить OneDrive. Папка пользователя OneDrive не будет удалена -OneDrive -Uninstall +# OneDrive -Uninstall # Install OneDrive 64-bit (default value) # Установить OneDrive 64-бит (значение по умолчанию) @@ -569,12 +569,12 @@ Win32LongPathLimit -Disable # Включить ограничение Windows на 260 символов в пути (значение по умолчанию) # Win32LongPathLimit -Enable -# Display Stop error code when BSoD occurs -# Отображать код Stop-ошибки при появлении BSoD +# Display the Stop error information on the BSoD +# Отображать Stop-ошибку при появлении BSoD BSoDStopError -Enable -# Do not Stop error code when BSoD occurs (default value) -# Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию) +# Do not display the Stop error information on the BSoD (default value) +# Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию) # BSoDStopError -Disable # Choose when to be notified about changes to your computer: never notify @@ -886,8 +886,8 @@ DefaultTerminalApp -WindowsTerminal # DefaultTerminalApp -ConsoleHost <# - Install the latest supported Microsoft Visual C++ Redistributable 2015—2022 x64 - Установить последнюю поддерживаемую версию Microsoft Visual C++ Redistributable 2015-2022 x64 + Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 x64 + Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 x64 https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist #> @@ -917,6 +917,18 @@ RunPowerShellShortcut -Elevated # Run the Windows PowerShell shortcut from the Start menu as user (default value) # Запускать ярлык Windows PowerShell в меню "Пуск" от имени пользователя (значение по умолчанию) # RunPowerShellShortcut -NonElevated + +# Show default Start layout (for 22509+ build only) (default value) +# Отображать стандартный макет начального экрана (только для сборки 22509+) (значение по умолчанию) +# StartLayout -Default + +# Show more pins on Start (for 22509+ build only) +# Отображать больше закреплений на начальном экране (только для сборки 22509+) +StartLayout -ShowMorePins + +# Show more recommendations on Start (for 22509+ build only) +# Отображать больше рекомендаций на начальном экране (только для сборки 22509+) +StartLayout -ShowMoreRecommendations #endregion Start menu #region UWP apps @@ -1067,19 +1079,6 @@ PUAppsDetection -Enable # Выключить обнаружение потенциально нежелательных приложений и блокировать их (значение по умолчанию) # PUAppsDetection -Disable -<# - Enable sandboxing for Microsoft Defender - There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows - - Включить песочницу для Microsoft Defender - В KVM с QEMU присутствует баг: включение этой функции приводит ВМ к зависанию во время загрузки Windows -#> -DefenderSandbox -Enable - -# Disable sandboxing for Microsoft Defender (default value) -# Выключить песочницу для Microsoft Defender (значение по умолчанию) -# DefenderSandbox -Disable - # Dismiss Microsoft Defender offer in the Windows Security about signing in Microsoft account # Отклонить предложение Microsoft Defender в "Безопасность Windows" о входе в аккаунт Microsoft DismissMSAccount diff --git a/Wrapper/Localizations/de-DE/tooltip_Windows_10.json b/Wrapper/Localizations/de-DE/tooltip_Windows_10.json index a5a49bc9..0780da95 100644 --- a/Wrapper/Localizations/de-DE/tooltip_Windows_10.json +++ b/Wrapper/Localizations/de-DE/tooltip_Windows_10.json @@ -1380,11 +1380,7 @@ "Arg": { "Zero": { "Tag": "Block", - "ToolTip": "Deinstallieren Sie das Update KB5005463 und blockieren Sie es für die weitere Installation. Das Update KB5005463 installiert die App PC Health Check, um zu prüfen, ob der PC die Systemanforderungen von Windows 11 erfüllt" - }, - "One": { - "Tag": "Unblock", - "ToolTip": "Freigabe des KB5005463-Updates für die weitere Installation (Standardwert)" + "ToolTip": "Deinstallieren Sie die App \"PC Health Check\" und verhindern Sie, dass sie in Zukunft installiert wird. Das Update KB5005463 installiert die App \"PC Health Check\", um zu prüfen, ob der PC die Systemanforderungen von Windows 11 erfüllt" } } }, diff --git a/Wrapper/Localizations/en-US/tooltip_Windows_10.json b/Wrapper/Localizations/en-US/tooltip_Windows_10.json index 84231745..9923a243 100644 --- a/Wrapper/Localizations/en-US/tooltip_Windows_10.json +++ b/Wrapper/Localizations/en-US/tooltip_Windows_10.json @@ -542,11 +542,11 @@ "Arg": { "Zero": { "Tag": "Hide", - "ToolTip": "Hide People button on the taskbar" + "ToolTip": "Hide People on the taskbar" }, "One": { "Tag": "Show", - "ToolTip": "Show People button on the taskbar (default value)" + "ToolTip": "Show People on the taskbar (default value)" } } }, @@ -1275,11 +1275,11 @@ "Arg": { "Zero": { "Tag": "Disable", - "ToolTip": "Turn off pressing the Shift key 5 times to turn Sticky keys" + "ToolTip": "Do not allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times to turn Sticky keys off" }, "One": { "Tag": "Enable", - "ToolTip": "Turn on pressing the Shift key 5 times to turn Sticky keys (default value)" + "ToolTip": "Allow the shortcut key to Start Sticky Keys by pressing the the Shift key 5 times to turn Sticky keys on (default value)" } } }, @@ -1376,15 +1376,11 @@ { "Id": 535, "Region": "System", - "Function": "PCHealthCheck", + "Function": "UninstallPCHealthCheck", "Arg": { "Zero": { - "Tag": "Block", - "ToolTip": "Uninstall the KB5005463 update and block it from the further intalling. The KB5005463 update installs the PC Health Check app to check if PC meets the system requirements of Windows 11" - }, - "One": { - "Tag": "Unblock", - "ToolTip": "Unblock the KB5005463 update for the further intalling (default value)" + "Tag": "", + "ToolTip": "Uninstall the \"PC Health Check\" app and prevent it from installing in the future. The KB5005463 update installs the PC Health Check app to check if PC meets the system requirements of Windows 11" } } }, diff --git a/Wrapper/Localizations/es-ES/tooltip_Windows_10.json b/Wrapper/Localizations/es-ES/tooltip_Windows_10.json index 27b87df0..c7289c73 100644 --- a/Wrapper/Localizations/es-ES/tooltip_Windows_10.json +++ b/Wrapper/Localizations/es-ES/tooltip_Windows_10.json @@ -1380,11 +1380,7 @@ "Arg": { "Zero": { "Tag": "Block", - "ToolTip": "Desinstalar la actualización KB5005463 y bloquearla para que no se siga instalando. La actualización KB5005463 instala la aplicación PC Health Check para comprobar si el PC cumple con los requisitos del sistema de Windows 11" - }, - "One": { - "Tag": "Unblock", - "ToolTip": "Desbloquear la actualización KB5005463 para su posterior instalación (valor por defecto)" + "ToolTip": "Desinstala la aplicación \"PC Health Check\" y evita que se instale en el futuro. La actualización KB5005463 instala la aplicación \"PC Health Check\" para comprobar si el PC cumple con los requisitos del sistema de Windows 11" } } }, diff --git a/Wrapper/Localizations/pt-BR/tooltip_Windows_10.json b/Wrapper/Localizations/pt-BR/tooltip_Windows_10.json index 347e0544..9a11c792 100644 --- a/Wrapper/Localizations/pt-BR/tooltip_Windows_10.json +++ b/Wrapper/Localizations/pt-BR/tooltip_Windows_10.json @@ -1381,11 +1381,7 @@ "Arg": { "Zero": { "Tag": "Block", - "ToolTip": "Desinstale a atualização KB5005463 e bloqueie-a de outras instalações. A atualização KB5005463 instala o aplicativo PC Health Check para verificar se o PC atende aos requisitos de sistema do Windows 11" - }, - "One": { - "Tag": "Unblock", - "ToolTip": "Desbloqueie a atualização KB5005463 para instalação posterior (valor padrão)" + "ToolTip": "Desinstale o aplicativo \"PC Health Check\" e impeça a sua instalação no futuro. A atualização do KB5005463 instala o aplicativo \"PC Health Check\" para verificar se o PC atende aos requisitos de sistema do Windows 11" } } }, diff --git a/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json b/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json index b5f49106..2b947006 100644 --- a/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json +++ b/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json @@ -1380,11 +1380,7 @@ "Arg": { "Zero": { "Tag": "Block", - "ToolTip": "Удалить обновление KB5005463 и заблокировать его от дальнейшей установки. Обновление KB5005463 устанавливает приложение PC Health Check для проверки соответствия компьютера системным требованиям Windows 11" - }, - "One": { - "Tag": "Unblock", - "ToolTip": "Разблокировать обновление KB5005463 для дальнейшей установки (значение по умолчанию)" + "ToolTip": "Удалить приложение \"Проверка работоспособности ПК Windows\" и заблокировать его установку в будущем. Обновление KB5005463 устанавливает приложение \"Проверка работоспособности ПК Windows\" для проверки соответствия компьютера системным требованиям Windows 11" } } },