diff --git a/README.md b/README.md index 8914bc4c0..daafbd8f6 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,7 @@ Or use an old-style format without the TAB functions autocomplete (the quotation ## Key features +* All archives are being built via GitHub Actions [automatically](https://github.com/farag2/Sophia-Script-for-Windows/actions); * Set up Privacy & Telemetry; * Enable DNS-over-HTTPS for IPv4; * Turn off diagnostics tracking scheduled tasks with pop-up form written in [WPF](#screenshots); diff --git a/Wrapper/Config/config_Windows_10.json b/Wrapper/Config/config_Windows_10.json index c54c21223..c8563ad0f 100644 --- a/Wrapper/Config/config_Windows_10.json +++ b/Wrapper/Config/config_Windows_10.json @@ -1568,10 +1568,10 @@ "Function": "InstallDotNetRuntimes -Runtimes", "Arg": { "Zero": { - "Tag": "NET6x64" + "Tag": "NET8x64" }, "One": { - "Tag": "NET8x64" + "Tag": "NET9x64" } }, "Preset": "", @@ -1609,22 +1609,6 @@ "Preset": "Zero", "WindowsDefault": "One" }, - { - "Region": "System", - "Control": "cmb", - "Required": "false", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable" - }, - "One": { - "Tag": "Default" - } - }, - "Preset": "Zero", - "WindowsDefault": "One" - }, { "Region": "System", "Control": "cmb", diff --git a/Wrapper/Config/config_Windows_10_LTSC.json b/Wrapper/Config/config_Windows_10_LTSC.json index f7ffd4936..44453ae87 100644 --- a/Wrapper/Config/config_Windows_10_LTSC.json +++ b/Wrapper/Config/config_Windows_10_LTSC.json @@ -625,7 +625,9 @@ } }, "Preset": "Zero", - "WindowsDefault": "Zero" + "WindowsDefault": "Zero", + "LTSC2019": "true", + "LTSC2021": "true" }, { "Region": "UI & Personalization", @@ -845,7 +847,9 @@ } }, "Preset": "One", - "WindowsDefault": "Zero" + "WindowsDefault": "Zero", + "LTSC2019": "false", + "LTSC2021": "true" }, { "Region": "UI & Personalization", @@ -861,7 +865,9 @@ } }, "Preset": "Zero", - "WindowsDefault": "One" + "WindowsDefault": "One", + "LTSC2019": "false", + "LTSC2021": "true" }, { "Region": "UI & Personalization", @@ -877,7 +883,9 @@ } }, "Preset": "Zero", - "WindowsDefault": "Zero" + "WindowsDefault": "Zero", + "LTSC2019": "false", + "LTSC2021": "true" }, { "Region": "System", @@ -1433,7 +1441,9 @@ } }, "Preset": "", - "WindowsDefault": "" + "WindowsDefault": "", + "LTSC2019": "true", + "LTSC2021": "true" }, { "Region": "System", @@ -1487,14 +1497,16 @@ "Function": "InstallDotNetRuntimes -Runtimes", "Arg": { "Zero": { - "Tag": "NET6x64" + "Tag": "NET8x64" }, "One": { - "Tag": "NET8x64" + "Tag": "NET9x64" } }, "Preset": "", - "WindowsDefault": "" + "WindowsDefault": "", + "LTSC2019": "true", + "LTSC2021": "true" }, { "Region": "System", @@ -1532,24 +1544,6 @@ "LTSC2019": "true", "LTSC2021": "true" }, - { - "Region": "System", - "Control": "cmb", - "Required": "false", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable" - }, - "One": { - "Tag": "Default" - } - }, - "Preset": "Zero", - "WindowsDefault": "", - "LTSC2019": "true", - "LTSC2021": "true" - }, { "Region": "System", "Control": "cmb", @@ -1564,7 +1558,9 @@ } }, "Preset": "Zero", - "WindowsDefault": "One" + "WindowsDefault": "One", + "LTSC2019": "true", + "LTSC2021": "true" }, { "Region": "WSL", diff --git a/Wrapper/Config/config_Windows_11.json b/Wrapper/Config/config_Windows_11.json index 93294dff7..997fcffd3 100644 --- a/Wrapper/Config/config_Windows_11.json +++ b/Wrapper/Config/config_Windows_11.json @@ -1475,10 +1475,10 @@ "Function": "InstallDotNetRuntimes -Runtimes", "Arg": { "Zero": { - "Tag": "NET6x64" + "Tag": "NET8x64" }, "One": { - "Tag": "NET8x64" + "Tag": "NET9x64" } }, "Preset": "", @@ -1516,22 +1516,6 @@ "Preset": "Zero", "WindowsDefault": "One" }, - { - "Region": "System", - "Control": "cmb", - "Required": "false", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable" - }, - "One": { - "Tag": "Default" - } - }, - "Preset": "Zero", - "WindowsDefault": "One" - }, { "Region": "System", "Control": "cmb", @@ -1622,22 +1606,6 @@ "Preset": "Zero", "WindowsDefault": "One" }, - { - "Region": "UWP apps", - "Control": "cmb", - "Required": "false", - "Function": "TeamsAutostart", - "Arg": { - "Zero": { - "Tag": "Disable" - }, - "One": { - "Tag": "Enable" - } - }, - "Preset": "Zero", - "WindowsDefault": "One" - }, { "Region": "Gaming", "Control": "cmb", diff --git a/Wrapper/Config/config_Windows_11_LTSC.json b/Wrapper/Config/config_Windows_11_LTSC.json index 8f8f232a6..b3790f699 100644 --- a/Wrapper/Config/config_Windows_11_LTSC.json +++ b/Wrapper/Config/config_Windows_11_LTSC.json @@ -1502,10 +1502,10 @@ "Function": "InstallDotNetRuntimes -Runtimes", "Arg": { "Zero": { - "Tag": "NET6x64" + "Tag": "NET8x64" }, "One": { - "Tag": "NET8x64" + "Tag": "NET9x64" } }, "Preset": "", @@ -1546,23 +1546,6 @@ "WindowsDefault": "One", "LTSC2024": "true" }, - { - "Region": "System", - "Control": "cmb", - "Required": "false", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable" - }, - "One": { - "Tag": "Default" - } - }, - "Preset": "Zero", - "WindowsDefault": "One", - "LTSC2024": "true" - }, { "Region": "System", "Control": "cmb", diff --git a/Wrapper/Localizations/de-DE/tooltip_Windows_10.json b/Wrapper/Localizations/de-DE/tooltip_Windows_10.json index 5f9991065..2ba85850a 100644 --- a/Wrapper/Localizations/de-DE/tooltip_Windows_10.json +++ b/Wrapper/Localizations/de-DE/tooltip_Windows_10.json @@ -1379,15 +1379,15 @@ { "Region": "System", "Function": "InstallDotNetRuntimes -Runtimes", - "ToolTip": "Installieren Sie die neueste .NET Desktop Runtime 6, 8 x64.", + "ToolTip": "Installieren Sie die neueste .NET Desktop Runtime 8, 9 x64.", "Arg": { "Zero": { - "Tag": "NET6x64", - "ToolTip": ".NET Desktop Runtime 6 x64." - }, - "One": { "Tag": "NET8x64", "ToolTip": ".NET Desktop Runtime 8 x64." + }, + "One": { + "Tag": "NET9x64", + "ToolTip": ".NET Desktop Runtime 9 x64." } } }, @@ -1419,20 +1419,6 @@ } } }, - { - "Region": "System", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Verhindern, dass alle internen SATA-Laufwerke im Infobereich der Taskleiste als Wechselmedien angezeigt werden." - }, - "One": { - "Tag": "Default", - "ToolTip": "Anzeige aller internen SATA-Laufwerke als entfernbare Medien im Infobereich der Taskleiste (Standardeinstellung)." - } - } - }, { "Region": "System", "Function": "RegistryBackup", diff --git a/Wrapper/Localizations/de-DE/tooltip_Windows_11.json b/Wrapper/Localizations/de-DE/tooltip_Windows_11.json index 22d457331..e6cb10626 100644 --- a/Wrapper/Localizations/de-DE/tooltip_Windows_11.json +++ b/Wrapper/Localizations/de-DE/tooltip_Windows_11.json @@ -1313,15 +1313,15 @@ { "Region": "System", "Function": "InstallDotNetRuntimes -Runtimes", - "ToolTip": "Installieren Sie die neueste .NET Desktop Runtime 6, 8 x64.", + "ToolTip": "Installieren Sie die neueste .NET Desktop Runtime 8, 9 x64.", "Arg": { "Zero": { - "Tag": "NET6x64", - "ToolTip": ".NET Desktop Runtime 6 x64." - }, - "One": { "Tag": "NET8x64", "ToolTip": ".NET Desktop Runtime 8 x64." + }, + "One": { + "Tag": "NET9x64", + "ToolTip": ".NET Desktop Runtime 9 x64." } } }, @@ -1353,20 +1353,6 @@ } } }, - { - "Region": "System", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Verhindern, dass alle internen SATA-Laufwerke im Infobereich der Taskleiste als Wechselmedien angezeigt werden." - }, - "One": { - "Tag": "Default", - "ToolTip": "Anzeige aller internen SATA-Laufwerke als entfernbare Medien im Infobereich der Taskleiste (Standardeinstellung)." - } - } - }, { "Region": "System", "Function": "RegistryBackup", @@ -1443,20 +1429,6 @@ } } }, - { - "Region": "UWP apps", - "Function": "TeamsAutostart", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Microsoft Teams-Autostart deaktivieren." - }, - "One": { - "Tag": "Enable", - "ToolTip": "Microsoft Teams-Autostart aktivieren (Standardeinstellung)." - } - } - }, { "Region": "Gaming", "Function": "XboxGameBar", diff --git a/Wrapper/Localizations/de-DE/ui.json b/Wrapper/Localizations/de-DE/ui.json index d14dbc1fd..69b5a7823 100644 --- a/Wrapper/Localizations/de-DE/ui.json +++ b/Wrapper/Localizations/de-DE/ui.json @@ -67,6 +67,7 @@ "Options": { "messageBoxNewWrapperFound": "Eine neue Version von 'Wrapper' wurde entdeckt.\nGitHub-Seite öffnen?", "messageBoxNewSophiaFound": "Eine neue Version von 'Sophia Script' wurde entdeckt.\nGitHub-Seite öffnen?", + "messageBoxPS1FileHasToBeInFolder": "Die Voreinstellungsdatei Sophia.ps1 muss sich im Ordner Sophia Script befinden.", "messageBoxDoesNotExist": "existiert nicht.", "messageBoxPresetNotComp": "Voreinstellung ist nicht kompatibel!", "messageBoxFilesMissingClose": "Die erforderlichen Sophia Script Wrapper-Dateien fehlen. Das Programm wird geschlossen.", diff --git a/Wrapper/Localizations/en-US/tooltip_Windows_10.json b/Wrapper/Localizations/en-US/tooltip_Windows_10.json index ac3e61b50..1c52b1754 100644 --- a/Wrapper/Localizations/en-US/tooltip_Windows_10.json +++ b/Wrapper/Localizations/en-US/tooltip_Windows_10.json @@ -1375,15 +1375,15 @@ { "Region": "System", "Function": "InstallDotNetRuntimes -Runtimes", - "ToolTip": "Install the latest .NET Desktop Runtime 6, 8 x64.", + "ToolTip": "Install the latest .NET Desktop Runtime 8, 9 x64.", "Arg": { "Zero": { - "Tag": "NET6x64", - "ToolTip": ".NET Desktop Runtime 6 x64." - }, - "One": { "Tag": "NET8x64", "ToolTip": ".NET Desktop Runtime 8 x64." + }, + "One": { + "Tag": "NET9x64", + "ToolTip": ".NET Desktop Runtime 9 x64." } } }, @@ -1415,20 +1415,6 @@ } } }, - { - "Region": "System", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Prevent all internal SATA drives from showing up as removable media in the taskbar notification area." - }, - "One": { - "Tag": "Default", - "ToolTip": "Show up all internal SATA drives as removeable media in the taskbar notification area (default value)." - } - } - }, { "Region": "System", "Function": "RegistryBackup", diff --git a/Wrapper/Localizations/en-US/tooltip_Windows_11.json b/Wrapper/Localizations/en-US/tooltip_Windows_11.json index 54b72ebb1..83a0d31ef 100644 --- a/Wrapper/Localizations/en-US/tooltip_Windows_11.json +++ b/Wrapper/Localizations/en-US/tooltip_Windows_11.json @@ -1313,15 +1313,15 @@ { "Region": "System", "Function": "InstallDotNetRuntimes -Runtimes", - "ToolTip": "Install the latest .NET Desktop Runtime 6, 8 x64.", + "ToolTip": "Install the latest .NET Desktop Runtime 8, 9 x64.", "Arg": { "Zero": { - "Tag": "NET6x64", - "ToolTip": ".NET Desktop Runtime 6 x64." - }, - "One": { "Tag": "NET8x64", "ToolTip": ".NET Desktop Runtime 8 x64." + }, + "One": { + "Tag": "NET9x64", + "ToolTip": ".NET Desktop Runtime 9 x64." } } }, @@ -1353,20 +1353,6 @@ } } }, - { - "Region": "System", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Prevent all internal SATA drives from showing up as removable media in the taskbar notification area." - }, - "One": { - "Tag": "Default", - "ToolTip": "Show up all internal SATA drives as removeable media in the taskbar notification area (default value)." - } - } - }, { "Region": "System", "Function": "RegistryBackup", @@ -1443,20 +1429,6 @@ } } }, - { - "Region": "UWP apps", - "Function": "TeamsAutostart", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Disable Microsoft Teams autostarting." - }, - "One": { - "Tag": "Enable", - "ToolTip": "Enable Microsoft Teams autostarting (default value)." - } - } - }, { "Region": "Gaming", "Function": "XboxGameBar", diff --git a/Wrapper/Localizations/en-US/ui.json b/Wrapper/Localizations/en-US/ui.json index 5a671ffc2..dd3d5bb0f 100644 --- a/Wrapper/Localizations/en-US/ui.json +++ b/Wrapper/Localizations/en-US/ui.json @@ -67,6 +67,7 @@ "Options": { "messageBoxNewWrapperFound": "A new version of 'Wrapper' found.\nOpen GitHub latest release page?", "messageBoxNewSophiaFound": "A new version Sophia Script found.\nOpen GitHub latest release page?", + "messageBoxPS1FileHasToBeInFolder": "Sophia.ps1 preset file must be in Sophia Script folder.", "messageBoxDoesNotExist": "does not exist.", "messageBoxPresetNotComp": "preset file is not compatible!", "messageBoxFilesMissingClose": "Files missing so Sophia Script Wrapper will close.", diff --git a/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json b/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json index a1079ab73..ff4b8a000 100644 --- a/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json +++ b/Wrapper/Localizations/ru-RU/tooltip_Windows_10.json @@ -1379,15 +1379,15 @@ { "Region": "System", "Function": "InstallDotNetRuntimes -Runtimes", - "ToolTip": "Установить последнюю версию .NET Desktop Runtime 6, 8 x64.", + "ToolTip": "Установить последнюю версию .NET Desktop Runtime 8, 9 x64.", "Arg": { "Zero": { - "Tag": "NET6x64", - "ToolTip": ".NET Desktop Runtime 6 x64." + "Tag": "NET9x64", + "ToolTip": ".NET Desktop Runtime 8 x64." }, "One": { - "Tag": "NET8x64", - "ToolTip": ".NET Desktop Runtime 8 x64." + "Tag": "NET9x64", + "ToolTip": ".NET Desktop Runtime 9 x64." } } }, @@ -1419,20 +1419,6 @@ } } }, - { - "Region": "System", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач." - }, - "One": { - "Tag": "Default", - "ToolTip": "Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию)." - } - } - }, { "Region": "System", "Function": "RegistryBackup", diff --git a/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json b/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json index 031f76569..c288c102c 100644 --- a/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json +++ b/Wrapper/Localizations/ru-RU/tooltip_Windows_11.json @@ -1313,15 +1313,15 @@ { "Region": "System", "Function": "InstallDotNetRuntimes -Runtimes", - "ToolTip": "Установить последнюю версию .NET Desktop Runtime 6, 8 x64.", + "ToolTip": "Установить последнюю версию .NET Desktop Runtime 8, 9 x64.", "Arg": { "Zero": { - "Tag": "NET6x64", - "ToolTip": ".NET Desktop Runtime 6 x64." + "Tag": "NET9x64", + "ToolTip": ".NET Desktop Runtime 8 x64." }, "One": { - "Tag": "NET8x64", - "ToolTip": ".NET Desktop Runtime 8 x64." + "Tag": "NET9x64", + "ToolTip": ".NET Desktop Runtime 9 x64." } } }, @@ -1353,20 +1353,6 @@ } } }, - { - "Region": "System", - "Function": "SATADrivesRemovableMedia", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач." - }, - "One": { - "Tag": "Default", - "ToolTip": "Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию)." - } - } - }, { "Region": "System", "Function": "RegistryBackup", @@ -1443,20 +1429,6 @@ } } }, - { - "Region": "UWP apps", - "Function": "TeamsAutostart", - "Arg": { - "Zero": { - "Tag": "Disable", - "ToolTip": "Выключить автозагрузку Microsoft Teams." - }, - "One": { - "Tag": "Enable", - "ToolTip": "Включить автозагрузку Microsoft Teams (значение по умолчанию)." - } - } - }, { "Region": "Gaming", "Function": "XboxGameBar", diff --git a/Wrapper/Localizations/ru-RU/ui.json b/Wrapper/Localizations/ru-RU/ui.json index e732a9042..806f0123b 100644 --- a/Wrapper/Localizations/ru-RU/ui.json +++ b/Wrapper/Localizations/ru-RU/ui.json @@ -67,6 +67,7 @@ "Options": { "messageBoxNewWrapperFound": "Обнаружена новая версия Wrapper.\nОткрыть страницу GitHub?", "messageBoxNewSophiaFound": "Обнаружена новая версия Sophia Script.\nОткрыть страницу GitHub?", + "messageBoxPS1FileHasToBeInFolder": "Пресет-файлл Sophia.ps1 должен находиться в папке Sophia Script.", "messageBoxDoesNotExist": "не существует.", "messageBoxPresetNotComp": "Пресет не совместим!", "messageBoxFilesMissingClose": "Отсутствуют необходимые файлы Sophia Script Wrapper. Программа будет закрыта.", diff --git a/Wrapper/SophiaScriptWrapper.exe b/Wrapper/SophiaScriptWrapper.exe index 0baf00682..09bd464ea 100644 Binary files a/Wrapper/SophiaScriptWrapper.exe and b/Wrapper/SophiaScriptWrapper.exe differ diff --git a/docs/README_de-de.md b/docs/README_de-de.md index e733762c6..c47557bd9 100644 --- a/docs/README_de-de.md +++ b/docs/README_de-de.md @@ -177,6 +177,7 @@ Oder verwenden Sie ein Format im alten Stil ohne die TAB-Funktionen zum automati ## Haupt-Features +* Alle Archive werden [automatisch](https://github.com/farag2/Sophia-Script-for-Windows/actions) über GitHub Actions erstellt. * Datenschutz und Telemetrie einrichten; * DNS-über-HTTPS für IPv4 aktivieren; * Deaktivieren Sie die Diagnoseverfolgung geplanter Aufgaben mit einem in [WPF] geschriebenen Popup-Formular (#screenshots); diff --git a/docs/README_ru-ru.md b/docs/README_ru-ru.md index c18bebea1..e1430883f 100644 --- a/docs/README_ru-ru.md +++ b/docs/README_ru-ru.md @@ -177,6 +177,7 @@ UninstallUWPApps, "PinToStart -UnpinAll" ## Ключевые возможности +* Все архивы собираются с использованием GitHub Actions [автоматически](https://github.com/farag2/Sophia-Script-for-Windows/actions); * Настроить приватность и передачу телеметрии; * Включить DNS-over-HTTPS для IPv4; * Выключить диагностические задания в Планировщике заданий с помощью всплывыющего окошка, написанного на [WPF](#скриншоты); diff --git a/docs/README_uk-ua.md b/docs/README_uk-ua.md index d7c021c3b..65cb193ce 100644 --- a/docs/README_uk-ua.md +++ b/docs/README_uk-ua.md @@ -177,6 +177,7 @@ UninstallUWPApps, "PinToStart -UnpinAll" ## Ключові особливості +* Усі архіви з використанням GitHub Actions [автоматично](https://github.com/farag2/Sophia-Script-for-Windows/actions); * Налаштування конфіденційності і телеметрії; * Активація DNS-over-HTTPS для IPv4; * Вимкнення запланованих завдань з відстеження зі спливаючою формою, написаною на [WPF](#скріншоти); diff --git a/src/Sophia_Script_for_Windows_10/Localizations/de-DE/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/de-DE/Sophia.psd1 index 58c5d3079..a62e781cb 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/de-DE/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/de-DE/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Geplante Aufgaben OneDriveUninstalling = OneDrive deinstallieren... OneDriveInstalling = OneDrive installieren... OneDriveDownloading = OneDrive herunterladen... -OneDriveWarning = Die "{0}"-Funktion wird nur angewendet, wenn die Voreinstellung so konfiguriert ist, dass OneDrive entfernt wird (oder die App bereits entfernt wurde), andernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. +OneDriveWarning = Die Funktion "WinPrtScrFolder -Desktop" wird nur angewendet, wenn der Benutzer das Skript zum Entfernen von OneDrive konfiguriert hat (oder OneDrive bereits entfernt wurde).\nAndernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. WindowsFeaturesTitle = Windows-Features OptionalFeaturesTitle = Optionale Features EnableHardwareVT = Virtualisierung in UEFI aktivieren. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Möchten Sie die Einstellung der Gra ScheduledTaskPresented = Die Funktion "{0}" wurde bereits als "{1}" angelegt. CleanupTaskNotificationTitle = Windows aufräumen CleanupTaskNotificationEvent = Aufgabe zum Bereinigen nicht verwendeter Windows-Dateien und -Updates ausführen? -CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. -CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. +CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. +CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. SoftwareDistributionTaskNotificationEvent = Der Windows Update-Cache wurde erfolgreich gelöscht. TempTaskNotificationEvent = Der Ordner mit den temporären Dateien wurde erfolgreich bereinigt. -FolderTaskDescription = Ordner "{0}" bereinigen. +FolderTaskDescription = Ordner "{0}" bereinigen. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{1}" im System angemeldet ist. EventViewerCustomViewName = Prozesserstellung EventViewerCustomViewDescription = Prozesserstellungen und Befehlszeilen-Auditing-Ereignisse. RestartWarning = Sicherstellen, dass Sie Ihren PC neu starten. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1 index 7813d62c9..10eb49ff1 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Scheduled tasks OneDriveUninstalling = Uninstalling OneDrive... OneDriveInstalling = Installing OneDrive... OneDriveDownloading = Downloading OneDrive... -OneDriveWarning = The "{0}" function will be applied only if the preset is configured to remove OneDrive (or the app was already removed), otherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. +OneDriveWarning = "WinPrtScrFolder -Desktop" function will be applied only if user configured script to remove OneDrive (or OneDrive was already removed).\nOtherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. WindowsFeaturesTitle = Windows features OptionalFeaturesTitle = Optional features EnableHardwareVT = Enable Virtualization in UEFI. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Would you like to set the graphics p ScheduledTaskPresented = The "{0}" function was already created as "{1}". CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? -CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. -CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. +CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. Scheduled task can be run only if user "{0}" logged into the system. +CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. Scheduled task can be run only if user "{0}" logged into the system. SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted. TempTaskNotificationEvent = Temporary files folder successfully cleaned up. -FolderTaskDescription = The {0} folder cleanup. +FolderTaskDescription = The {0} folder cleanup. Scheduled task can be run only if user "{0}" logged into the system. EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events. RestartWarning = Make sure to restart your PC. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/es-ES/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/es-ES/Sophia.psd1 index 9f15ee9c7..d52446ccc 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/es-ES/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/es-ES/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Tareas programadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalación de OneDrive... OneDriveDownloading = Descargando OneDrive... -OneDriveWarning = La función "{0}" se aplicará sólo si el preajuste está configurado para eliminar OneDrive (o la aplicación ya fue eliminada), de lo contrario la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. +OneDriveWarning = La función "WinPrtScrFolder -Desktop" se aplicará sólo si el usuario configuró el script para eliminar OneDrive (o OneDrive ya fue eliminado).\nDe lo contrario, la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. WindowsFeaturesTitle = Características de Windows OptionalFeaturesTitle = Características opcionales EnableHardwareVT = Habilitar la virtualización en UEFI. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = ¿Le gustaría establecer la configu ScheduledTaskPresented = La función "{0}" ya fue creada como "{1}". CleanupTaskNotificationTitle = Limpieza de Windows CleanupTaskNotificationEvent = ¿Ejecutar la tarea de limpiar los archivos no utilizados y actualizaciones de Windows? -CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. -CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. +CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. +CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. SoftwareDistributionTaskNotificationEvent = La caché de actualización de Windows eliminado correctamente. TempTaskNotificationEvent = Los archivos de la carpeta Temp limpiados con éxito. -FolderTaskDescription = La limpieza de la carpeta "{0}". +FolderTaskDescription = La limpieza de la carpeta "{0}". La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. EventViewerCustomViewName = Creación de proceso EventViewerCustomViewDescription = Eventos de auditoría de línea de comandos y creación de procesos. RestartWarning = Asegúrese de reiniciar su PC. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/fr-FR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/fr-FR/Sophia.psd1 index 3a9d5dc0f..7736d0856 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/fr-FR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/fr-FR/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Tâches planifiées OneDriveUninstalling = Désinstalltion de OneDrive... OneDriveInstalling = Installation de OneDrive... OneDriveDownloading = Téléchargement de OneDrive... -OneDriveWarning = La fonction "{0}" sera appliquée uniquement si le préréglage est configuré pour supprimer OneDrive (ou si l'application a déjà été supprimée), sinon la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive s'interrompt. +OneDriveWarning = La fonction "WinPrtScrFolder -Desktop" ne sera appliquée que si l'utilisateur a configuré le script pour supprimer OneDrive (ou si OneDrive a déjà été supprimé).\nDans le cas contraire, la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive est interrompue. WindowsFeaturesTitle = Fonctionnalités OptionalFeaturesTitle = Fonctionnalités optionnelles EnableHardwareVT = Activer la virtualisation dans UEFI. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Souhaitez-vous définir le paramètr ScheduledTaskPresented = La fonction "{0}" a déjà été créée en tant que "{1}". CleanupTaskNotificationTitle = Nettoyer Windows CleanupTaskNotificationEvent = Exécuter la tâche pour nettoyer les fichiers et les mises à jour inutilisés de Windows? -CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. -CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. +CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. +CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. SoftwareDistributionTaskNotificationEvent = Le cache de mise à jour Windows a bien été supprimé. TempTaskNotificationEvent = Le dossier des fichiers temporaires a été nettoyé avec succès. -FolderTaskDescription = Nettoyage du dossier "{0}". +FolderTaskDescription = Nettoyage du dossier "{0}". La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. EventViewerCustomViewName = Création du processus EventViewerCustomViewDescription = Audit des événements de création du processus et de ligne de commande. RestartWarning = Assurez-vous de redémarrer votre PC. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/hu-HU/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/hu-HU/Sophia.psd1 index 3109e2d76..c68e1d53a 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/hu-HU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/hu-HU/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Ütemezett feladatok OneDriveUninstalling = OneDrive eltávolítása... OneDriveInstalling = OneDrive telepítése... OneDriveDownloading = OneDrive letöltése... -OneDriveWarning = A "{0}" funkció csak akkor kerül alkalmazásra, ha az előbeállítás a OneDrive eltávolítására van beállítva (vagy az alkalmazás már eltávolításra került), különben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. +OneDriveWarning = A "WinPrtScrFolder -Desktop" funkció csak akkor kerül alkalmazásra, ha a felhasználó a OneDrive eltávolítására konfigurálta a szkriptet (vagy a OneDrive már eltávolításra került).\nEllenkező esetben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. WindowsFeaturesTitle = Windows szolgáltatások OptionalFeaturesTitle = Opcionális szolgáltatások EnableHardwareVT = Virtualizáció engedélyezése UEFI-ben. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Szeretné megváltoztatni a grafikus ScheduledTaskPresented = A "{0}" funkciót már létrehoztuk "{1}" néven. CleanupTaskNotificationTitle = Windows tisztítása CleanupTaskNotificationEvent = Szeretné a nem használt fájlokat es frissitéseket eltávolítani? -CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. -CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. +CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. +CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. SoftwareDistributionTaskNotificationEvent = A Windows frissités számára fenntartott ideiglenes tárhely sikeresen megtisztítva. TempTaskNotificationEvent = Az ideiglenes fájlok tárolására szolgáló könyvtár tisztítása sikeresen megtörtént. -FolderTaskDescription = A {0} könyvtár tisztítása. +FolderTaskDescription = A {0} könyvtár tisztítása. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. EventViewerCustomViewName = Folyamatok EventViewerCustomViewDescription = Folyamatok létrehozása és parancssor ellenőrző események. RestartWarning = Kérem ne felejtse el újraindítani a számítógépét. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/it-IT/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/it-IT/Sophia.psd1 index 082fc577b..2c0bae15b 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/it-IT/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/it-IT/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Attività pianificate OneDriveUninstalling = Disinstallazione di OneDrive... OneDriveInstalling = Installazione di OneDrive... OneDriveDownloading = Download di OneDrive... -OneDriveWarning = La funzione "{0}" sarà applicata solo se il preset è configurato per rimuovere OneDrive (o se l'app è già stata rimossa), altrimenti la funzionalità di backup per le cartelle "Desktop" e "Pictures" in OneDrive si interromperà. +OneDriveWarning = La funzione "WinPrtScrFolder -Desktop" verrà applicata solo se l'utente ha configurato lo script per rimuovere OneDrive (o se OneDrive è già stato rimosso).\nIn caso contrario, la funzionalità di backup per le cartelle "Desktop" e "Immagini" di OneDrive si interrompe. WindowsFeaturesTitle = Funzionalità di Windows OptionalFeaturesTitle = Caratteristiche opzionali EnableHardwareVT = Abilita virtualizzazione in UEFI. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Volete impostare l'impostazione dell ScheduledTaskPresented = La funzione "{0}" è già stata creata come "{1}". CleanupTaskNotificationTitle = Pulizia di Windows CleanupTaskNotificationEvent = Eseguire l'operazione di pulizia dei file inutilizzati e aggiornamenti di Windows? -CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". -CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. +CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. +CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. SoftwareDistributionTaskNotificationEvent = La cache degli aggiornamenti di Windows cancellata con successo. TempTaskNotificationEvent = I file cartella Temp puliti con successo. -FolderTaskDescription = Pulizia della cartella "{0}". +FolderTaskDescription = Pulizia della cartella "{0}". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. EventViewerCustomViewName = Creazione del processo EventViewerCustomViewDescription = Creazione del processi e degli eventi di controllo della riga di comando. RestartWarning = Assicurarsi di riavviare il PC. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/pl-PL/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/pl-PL/Sophia.psd1 index 58d3c33f6..4314a9256 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/pl-PL/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/pl-PL/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Zaplanowane zadania OneDriveUninstalling = Odinstalowywanie OneDrive... OneDriveInstalling = Instalowanie OneDrive... OneDriveDownloading = Pobieranie OneDrive... -OneDriveWarning = Funkcja "{0}" zostanie zastosowana tylko wtedy, gdy ustawienie wstępne są skonfigurowane do usunięcia OneDrive (lub aplikacja została już usunięta), w przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Obrazy" w usłudze OneDrive ulegnie awarii. +OneDriveWarning = Funkcja "WinPrtScrFolder -Desktop" zostanie zastosowana tylko wtedy, gdy użytkownik skonfigurował skrypt do usuwania OneDrive (lub OneDrive został już usunięty).\nW przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Zdjęcia" w OneDrive zostanie przerwana. WindowsFeaturesTitle = Funkcje Windows OptionalFeaturesTitle = Funkcje opcjonalne EnableHardwareVT = Włącz wirtualizację w UEFI. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Czy chcesz ustawić wydajność graf ScheduledTaskPresented = Funkcja "{0}" została już utworzona jako "{1}". CleanupTaskNotificationTitle = Oczyszczanie system Windows CleanupTaskNotificationEvent = Uruchomić zadanie w celu usunięcia nieużywanych plików i aktualizacji systemu Windows? -CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. -CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. +CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. +CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. SoftwareDistributionTaskNotificationEvent = Pomyślnie usunięto pamięć podręczną aktualizacji systemu Windows. TempTaskNotificationEvent = Folder plików tymczasowych został pomyślnie wyczyszczony. -FolderTaskDescription = Czyszczenie folderu {0}. +FolderTaskDescription = Czyszczenie folderu {0}. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. EventViewerCustomViewName = Tworzenie procesu EventViewerCustomViewDescription = Tworzenie procesu i zdarzeń audytu. RestartWarning = Pamiętaj o ponownym uruchomieniu komputera. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/pt-BR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/pt-BR/Sophia.psd1 index d1a93ae44..67935e756 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/pt-BR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/pt-BR/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Tarefas agendadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalar o OneDrive... OneDriveDownloading = Baixando OneDrive... -OneDriveWarning = A função "{0}" será aplicada somente se a predefinição for configurada para remover o OneDrive (ou a aplicação já foi removida), caso contrário a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive quebra. +OneDriveWarning = A função "WinPrtScrFolder -Desktop" será aplicada somente se o usuário tiver configurado o script para remover o OneDrive (ou se o OneDrive já tiver sido removido).\nCaso contrário, a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive será interrompida. WindowsFeaturesTitle = Recursos do Windows OptionalFeaturesTitle = Recursos opcionais EnableHardwareVT = Habilitar virtualização em UEFI. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Gostaria de definir a configuração ScheduledTaskPresented = A função "{0}" já foi criada como "{1}". CleanupTaskNotificationTitle = Limpeza do Windows CleanupTaskNotificationEvent = Executar tarefa para limpar arquivos e atualizações não utilizados do Windows? -CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. -CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. +CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. +CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. SoftwareDistributionTaskNotificationEvent = O cache de atualização do Windows excluído com sucesso. TempTaskNotificationEvent = Os arquivos da pasta Temp limpos com sucesso. -FolderTaskDescription = A limpeza da pasta "{0}". +FolderTaskDescription = A limpeza da pasta "{0}". A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. EventViewerCustomViewName = Criação de processo EventViewerCustomViewDescription = Criação de processos e eventos de auditoria de linha de comando. RestartWarning = Certifique-se de reiniciar o PC. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/ru-RU/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/ru-RU/Sophia.psd1 index bf1b97932..f599ddd73 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/ru-RU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/ru-RU/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Запланированные за OneDriveUninstalling = Удаление OneDrive... OneDriveInstalling = OneDrive устанавливается... OneDriveDownloading = Скачивается OneDrive... -OneDriveWarning = Функция "{0}" будет применена только в случае, если в пресете настроено удаление OneDrive (или приложение уже удалено), иначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. +OneDriveWarning = Функция "WinPrtScrFolder -Desktop" будет применена только в случае, если пользователь настроил удаление OneDrive (или приложение уже удалено).\nИначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. WindowsFeaturesTitle = Компоненты Windows OptionalFeaturesTitle = Дополнительные компоненты EnableHardwareVT = Включите виртуализацию в UEFI. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Установить для любо ScheduledTaskPresented = Функция "{0}" уже была создана от имени "{1}". CleanupTaskNotificationTitle = Очистка Windows CleanupTaskNotificationEvent = Запустить задание по очистке неиспользуемых файлов и обновлений Windows? -CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. -CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. +CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. Задание может быть запущено, только если пользователь {0} вошел в систему. +CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. Задание может быть запущено, только если пользователь {0} вошел в систему. SoftwareDistributionTaskNotificationEvent = Кэш обновлений Windows успешно удален. TempTaskNotificationEvent = Папка временных файлов успешно очищена. -FolderTaskDescription = Очистка папки {0}. +FolderTaskDescription = Очистка папки {0}. Задание может быть запущено, только если пользователь "{1}" вошел в систему. EventViewerCustomViewName = Создание процесса EventViewerCustomViewDescription = События создания нового процесса и аудит командной строки. RestartWarning = Обязательно перезагрузите ваш ПК. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/tr-TR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/tr-TR/Sophia.psd1 index 3c51a5e65..5f7588e62 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/tr-TR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/tr-TR/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Zamanlanan görevler OneDriveUninstalling = OneDrive kaldırılıyor... OneDriveInstalling = OneDrive kuruluyor... OneDriveDownloading = OneDrive indiriliyor... -OneDriveWarning = "{0}" işlevi yalnızca ön ayar OneDrive'ı kaldıracak şekilde yapılandırılırsa uygulanır (veya uygulama zaten kaldırılmışsa), aksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. +OneDriveWarning = "WinPrtScrFolder -Desktop" işlevi yalnızca kullanıcı OneDrive'ı kaldırmak için komut dosyası yapılandırmışsa (veya OneDrive zaten kaldırılmışsa) uygulanır.\nAksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. WindowsFeaturesTitle = Características do Windows OptionalFeaturesTitle = Opsiyonel özellikler EnableHardwareVT = UEFI'dan sanallaştırmayı aktifleştirin. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Seçtiğiniz bir uygulamanın grafik ScheduledTaskPresented = "{0}" işlevi zaten "{1}" olarak oluşturulmuştu. CleanupTaskNotificationTitle = Windows temizliği CleanupTaskNotificationEvent = Windows kullanılmayan dosyaları ve güncellemeleri temizlemek için görev çalıştırılsın mı? -CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. -CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. +CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. +CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. SoftwareDistributionTaskNotificationEvent = Windows güncelleme önbelleği başarıyla silindi. TempTaskNotificationEvent = Geçici dosyalar klasörü başarıyla temizlendi. -FolderTaskDescription = "{0}" klasörü temizleniyor. +FolderTaskDescription = "{0}" klasörü temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. EventViewerCustomViewName = Süreç Oluşturma EventViewerCustomViewDescription = Süreç oluşturma ve komut satırı denetleme olayları. RestartWarning = Bilgisayarınızı yeniden başlattığınızdan emin olun. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/uk-UA/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/uk-UA/Sophia.psd1 index a736983be..9113d1032 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/uk-UA/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/uk-UA/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Заплановані задачі OneDriveUninstalling = Видалення OneDrive... OneDriveInstalling = OneDrive встановлюється... OneDriveDownloading = Завантажується OneDrive... -OneDriveWarning = Функція "{0}" буде застосована тільки в разі, якщо в пресеті налаштовано видалення OneDrive (або застосунок вже видалено), інакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. +OneDriveWarning = Функція "WinPrtScrFolder -Desktop" буде застосована тільки в разі, якщо користувач налаштував видалення OneDrive (або застосунок уже видалено).\nІнакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. WindowsFeaturesTitle = Компоненти Windows OptionalFeaturesTitle = Додаткові компоненти EnableHardwareVT = Увімкніть віртуалізацію в UEFI. @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = Встановити для будь ScheduledTaskPresented = Функцію "{0}" уже було створено від імені "{1}". CleanupTaskNotificationTitle = Очищення Windows CleanupTaskNotificationEvent = Запустити завдання з очищення невикористовуваних файлів і оновлень Windows? -CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. -CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. +CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. +CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. SoftwareDistributionTaskNotificationEvent = Кеш оновлень Windows успішно видалено. TempTaskNotificationEvent = Папка тимчасових файлів успішно очищена. -FolderTaskDescription = Очищення папки "{0}". +FolderTaskDescription = Очищення папки "{0}". Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. EventViewerCustomViewName = Створення процесу EventViewerCustomViewDescription = Події створення нового процесу і аудит командного рядка. RestartWarning = Обов'язково перезавантажте ваш ПК. diff --git a/src/Sophia_Script_for_Windows_10/Localizations/zh-CN/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/zh-CN/Sophia.psd1 index 5b13fc0e4..bcbb263d7 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/zh-CN/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/zh-CN/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = 计划任务 OneDriveUninstalling = 卸载OneDrive..... OneDriveInstalling = OneDrive正在安装..... OneDriveDownloading = 正在下载OneDrive..... -OneDriveWarning = 只有当预设被配置为删除OneDrive(或应用程序已经被删除)时,才会应用"{0}"功能,否则OneDrive中 "桌面 "和 "图片 "文件夹的备份功能就会中断。 +OneDriveWarning = "WinPrtScrFolder -Desktop" 功能僅在使用者設定腳本移除 OneDrive (或 OneDrive 已移除) 後才會套用\n否則 OneDrive 中「桌面」和「圖片」資料夾的備份功能會中斷。 WindowsFeaturesTitle = Windows功能 OptionalFeaturesTitle = 可选功能 EnableHardwareVT = UEFI中开启虚拟化。 @@ -40,11 +40,11 @@ GraphicsPerformanceTitle = 是否将所选应用程序的图形 ScheduledTaskPresented = "{0}"函数已经被创建为"{1}"。 CleanupTaskNotificationTitle = Windows清理 CleanupTaskNotificationEvent = 运行任务以清理Windows未使用的文件和更新? -CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。 -CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。 +CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。只有登入使用者"{0}"才能啟動任務。 +CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。只有登入使用者"{0}"才能啟動任務。 SoftwareDistributionTaskNotificationEvent = Windows更新缓存已成功删除。 TempTaskNotificationEvent = 临时文件文件夹已成功清理。 -FolderTaskDescription = "{0}"文件夹清理。 +FolderTaskDescription = "{0}"文件夹清理。只有登入使用者"{0}"才能啟動任務。 EventViewerCustomViewName = 进程创建 EventViewerCustomViewDescription = 进程创建和命令行审核事件。 RestartWarning = 确保重启电脑。 diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index 7293857d2..baab760af 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -1702,7 +1702,7 @@ function ScheduledTasks Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -4884,7 +4884,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4975,7 +4974,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -5192,6 +5190,10 @@ function OneDrive $AllUsers ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\Policies\Microsoft\Windows\OneDrive -Name DisableFileSyncNGSC -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\OneDrive -Name DisableFileSyncNGSC -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Uninstall" @@ -5413,7 +5415,6 @@ public static bool MarkFileDelete (string sourcefile) { Write-Warning -Message ($Localization.NoResponse -f "https://oneclient.sfx.ms") Write-Error -Message ($Localization.NoResponse -f "https://oneclient.sfx.ms") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -5469,6 +5470,10 @@ function StorageSense $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Type CLEAR + if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy)) { New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -ItemType Directory -Force @@ -5482,7 +5487,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force # Turn on automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 1 -Force # Run Storage Sense every month New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 30 -Force @@ -5493,7 +5498,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force # Turn off automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 0 -Force # Run Storage Sense during low free disk space New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 0 -Force @@ -5746,6 +5751,10 @@ function DeliveryOptimization $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5798,6 +5807,8 @@ function WindowsManageDefaultPrinter $Enable ) + Set-Policy -Scope User -Path "Software\Microsoft\Windows NT\CurrentVersion\Windows" -Name LegacyDefaultPrinterMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -6091,7 +6102,7 @@ function WindowsFeatures Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -6350,7 +6361,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -6411,7 +6421,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -6454,7 +6463,7 @@ function WindowsCapabilities Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -6519,6 +6528,10 @@ function UpdateMicrosoftProducts $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -6576,6 +6589,10 @@ function PowerPlan $Balanced ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "High" @@ -7749,66 +7766,77 @@ function WinPrtScrFolder $Default ) - # Checking whether user is logged into OneDrive (Microsoft account) - $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore - if ($UserEmail) - { - Write-Information -MessageData "" -InformationAction Continue - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose - Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - return - } - switch ($PSCmdlet.ParameterSetName) { "Desktop" { - # Check how the script was invoked: via a preset or Function.ps1 - # $_.File has no EndsWith() method - $PresetName = ((Get-PSCallStack).Position | Where-Object -FilterScript {($_.Text -eq "WinPrtScrFolder -Desktop") -or ($_.Text -match "Invoke-Expression")}).File | Where-Object -FilterScript {$_.EndsWith(".ps1") -and ($_ -notmatch "Functions.ps1")} - if ($PresetName) + # Checking whether user is logged into OneDrive (Microsoft account) + $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore + if ($UserEmail) { - # Checking whether a preset contains the "OneDrive -Uninstall" string uncommented out - if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) - { - # The string exists and is commented - $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false - } - else - { - # The string doesn't exist - $IsOneDriveToUninstall = $false - } + Write-Information -MessageData "" -InformationAction Continue + Write-Warning -Message $Localization.OneDriveWarning + Write-Error -Message $Localization.OneDriveWarning -ErrorAction SilentlyContinue - $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore - if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + return + } + + # Checking how the script was invoked: via a preset or Functions.ps1 + # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-variable + # This function works only if OneDrive was already uninstalled, or user is intended to uninstall "OneDrive -Uninstall" within commandline + $PresetName = (Get-Variable -Name MyInvocation -Scope Script).Value.PSCommandPath + $PSCallStack = (Get-PSCallStack).Position.Text + $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore + + # Checking whether function was called from Functions.ps1 + if ($PresetName -match "Functions.ps1") + { + # Checking whether command contains "WinPrtScrFolder -Desktop" + if ($PSCallStack -match "WinPrtScrFolder -Desktop") { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether other commands contains "OneDrive -Uninstall" which means that user is intended to uninstall "OneDrive -Uninstall", or OneDrive was uinstalled + if (($PSCallStack -match "OneDrive -Uninstall") -or (-not $OneDriveInstalled)) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } else { - # A preset file isn't taking a part so we ignore it and check only whether OneDrive was already uninstalled - if (-not (Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + # Checking whether function was called from Sophia.ps1, and preset contains the "OneDrive -Uninstall" string is uncommented that means OneDrive will be unistalled + if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether string exists and is uncommented + $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false + # Checking whether string exists and is uncommented, or OneDrive was uninstalled, or user called "OneDrive -Uninstall" from Sophia.ps1 alongside with "WinPrtScrFolder -Desktop" + if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled) -or ($PSCallStack -match "OneDrive -Uninstall")) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } } @@ -7860,6 +7888,19 @@ function RecommendedTroubleshooting $Default ) + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -Force -ErrorAction Ignore + + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR + + # Turn on Windows Error Reporting + Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore + + Get-Service -Name WerSvc | Set-Service -StartupType Manual + Get-Service -Name WerSvc | Start-Service + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -7869,24 +7910,6 @@ function RecommendedTroubleshooting New-Item -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Force } New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Name UserPreference -PropertyType DWord -Value 3 -Force - - # Set Windows level of diagnostic data gathering to "Optional diagnostic data" - if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack)) - { - New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Force - } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force - - Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWORD -Value 3 - - # Turn on Windows Error Reporting - Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore - - Get-Service -Name WerSvc | Set-Service -StartupType Manual - Get-Service -Name WerSvc | Start-Service } "Default" { @@ -7998,6 +8021,7 @@ function ReservedStorage } catch [System.Runtime.InteropServices.COMException] { + Write-Warning -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) Write-Error -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -8152,6 +8176,8 @@ function CapsLock $Enable ) + Remove-ItemProperty -Path HKCU:\Keyboard Layout -Name Attributes -Force -ErrorAction Ignore + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -8254,6 +8280,11 @@ function Autoplay $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer, HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + Set-Policy -Scope User -Path Software\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -8470,6 +8501,10 @@ function RestartNotification $Hide ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Show" @@ -8521,6 +8556,12 @@ function RestartDeviceAfterUpdate $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -8572,6 +8613,16 @@ function ActiveHours $Manually ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers, AlwaysAutoRebootAtScheduledTime -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AlwaysAutoRebootAtScheduledTime -Type CLEAR + + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -8623,6 +8674,11 @@ function WindowsLatestUpdate $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent, SetAllowOptionalContent -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAllowOptionalContent -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -9559,7 +9615,7 @@ public static void Refresh() Associations will be exported as Application_Associations.json file in script root folder .NOTES - Import exported JSON file after a clean installation. You have to install all apps according to an exported JSON file to restore all associations + You need to install all apps according to an exported JSON file to restore all associations .NOTES Machine-wide @@ -9737,11 +9793,8 @@ function Export-Associations .SYNOPSIS Import all Windows associations - .PARAMETER Path - Import all Windows associations from a JSON file - .EXAMPLE - Export-Associations -Path D:\ + Import-Associations .NOTES You have to install all apps according to an exported JSON file to restore all associations @@ -9988,10 +10041,10 @@ function InstallVCRedist <# .SYNOPSIS - Install the latest .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 .EXAMPLE - InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 + InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 .LINK https://dotnet.microsoft.com/en-us/download/dotnet @@ -10008,7 +10061,7 @@ function InstallDotNetRuntimes Mandatory = $true, ParameterSetName = "Runtimes" )] - [ValidateSet("NET6x64", "NET8x64")] + [ValidateSet("NET8x64", "NET9x64")] [string[]] $Runtimes ) @@ -10019,18 +10072,18 @@ function InstallDotNetRuntimes { switch ($Runtime) { - NET6x64 + NET8x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET6Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -10041,27 +10094,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 6 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 8 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET6Version has only three, unless the [System.Version] accelerator fails - $dotnet6Version = (Get-Item -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet6Version = "{0}.{1}.{2}" -f $dotnet6Version.Split(".") + # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails + $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") } else { - $dotnet6Version = "0.0" + $dotnet8Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 6 is not installed at all - if (([System.Version]$NET6Version -gt [System.Version]$dotnet6Version) -or ($dotnet6Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all + if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) { try { - # Downloading .NET Desktop Runtime 6 x64 + # .NET Desktop Runtime 8 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET6Version/dotnet-runtime-$NET6Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -10077,15 +10130,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET6Version" -Verbose + Write-Verbose -Message ".NET $NET8Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -10097,18 +10150,18 @@ function InstallDotNetRuntimes Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } - NET8x64 + NET9x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/9.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET9Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -10119,27 +10172,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 8 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 9 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails - $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") + # FileVersion has four properties while $NET9Version has only three, unless the [System.Version] accelerator fails + $dotnet9Version = (Get-Item -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet9Version = "{0}.{1}.{2}" -f $dotnet9Version.Split(".") } else { - $dotnet8Version = "0.0" + $dotnet9Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all - if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 9 is not installed at all + if (([System.Version]$NET9Version -gt [System.Version]$dotnet9Version) -or ($dotnet9Version -eq "0.0")) { try { - # .NET Desktop Runtime 8 x64 + # Downloading .NET Desktop Runtime 9 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET9Version/dotnet-runtime-$NET9Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -10155,15 +10208,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET8Version" -Verbose + Write-Verbose -Message ".NET $NET9Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -10369,57 +10422,6 @@ function PreventEdgeShortcutCreation } } -<# - .SYNOPSIS - Internal SATA drives up as removeable media in the taskbar notification area - - .PARAMETER Disable - Prevent all internal SATA drives from showing up as removable media in the taskbar notification area - - .PARAMETER Default - Show up all internal SATA drives as removeable media in the taskbar notification area - - .EXAMPLE - SATADrivesRemovableMedia -Disable - - .EXAMPLE - SATADrivesRemovableMedia -Default - - .NOTES - Machine-wide -#> -function SATADrivesRemovableMedia -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Default" - )] - [switch] - $Default - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Type MultiString -Value @(0, 1, 2, 3, 4, 5) -Force - } - "Default" - { - Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Force -ErrorAction Ignore - } - } -} - <# .SYNOPSIS Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups @@ -10511,7 +10513,6 @@ function Install-WSL { Write-Warning -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") Write-Error -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -10620,7 +10621,7 @@ function Install-WSL Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -11491,7 +11492,7 @@ function UninstallUWPApps Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -11642,7 +11643,6 @@ function HEVC { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -11659,7 +11659,6 @@ function HEVC { Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net/api/GetFiles") Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net/api/GetFiles") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -12275,7 +12274,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro TaskPath = "Sophia" Principal = $Principal Action = $Action - Description = $Localization.CleanupTaskDescription + Description = $Localization.CleanupTaskDescription -f $env:USERNAME Settings = $Settings } Register-ScheduledTask @Parameters -Force @@ -12435,7 +12434,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription + Description = $Localization.CleanupNotificationTaskDescription -f $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -12453,7 +12452,8 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro $Paths = @( "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.vbs", "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.ps1", - "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1" + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1", + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.vbs" ) Remove-Item -Path $Paths -Force -ErrorAction Ignore @@ -12764,7 +12764,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -13029,6 +13029,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_ `$Paths = @( # Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent (-join ("`$env:SystemDrive\", '`$WinREAgent')), + (-join ("`$env:SystemDrive\", '`$SysReset')), + (-join ("`$env:SystemDrive\", '`$Windows.~WS')), + "`$env:SystemDrive\ESD", "`$env:SystemDrive\Intel", "`$env:SystemDrive\PerfLogs" ) @@ -13093,7 +13096,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" + Description = $Localization.FolderTaskDescription -f "%TEMP%", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -14626,7 +14629,6 @@ function BitmapImageNewContext { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -14705,7 +14707,6 @@ function RichTextDocumentNewContext { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } diff --git a/src/Sophia_Script_for_Windows_10/Sophia.ps1 b/src/Sophia_Script_for_Windows_10/Sophia.ps1 index bd4a9e40f..8ebf9a3cc 100644 --- a/src/Sophia_Script_for_Windows_10/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10/Sophia.ps1 @@ -993,12 +993,12 @@ UninstallPCHealthCheck InstallVCRedist <# - Install the latest .NET Desktop Runtime 6, 8 x64 - Установить последнюю версию .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 + Установить последнюю версию .NET Desktop Runtime 8, 9 x64 https://dotnet.microsoft.com/en-us/download/dotnet #> -InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 +InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 # Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only # Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России @@ -1018,14 +1018,6 @@ PreventEdgeShortcutCreation -Channels Stable, Beta, Dev, Canary # Не предотвращать создание ярлыков на рабочем столе при обновлении Microsoft Edge (значение по умолчанию) # PreventEdgeShortcutCreation -Disable -# Prevent all internal SATA drives from showing up as removable media in the taskbar notification area -# Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач -SATADrivesRemovableMedia -Disable - -# Show up all internal SATA drives as removeable media in the taskbar notification area (default value) -# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию) -# SATADrivesRemovableMedia -Default - # Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups # Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями # RegistryBackup -Enable diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/de-DE/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/de-DE/Sophia.psd1 index 5cea391a7..cbac9bffc 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/de-DE/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/de-DE/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Möchten Sie die Einstellung der Gra ScheduledTaskPresented = Die Funktion "{0}" wurde bereits als "{1}" angelegt. CleanupTaskNotificationTitle = Windows aufräumen CleanupTaskNotificationEvent = Aufgabe zum Bereinigen nicht verwendeter Windows-Dateien und -Updates ausführen? -CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. -CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. +CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. +CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. SoftwareDistributionTaskNotificationEvent = Der Windows Update-Cache wurde erfolgreich gelöscht. TempTaskNotificationEvent = Der Ordner mit den temporären Dateien wurde erfolgreich bereinigt. -FolderTaskDescription = Ordner "{0}" bereinigen. +FolderTaskDescription = Ordner "{0}" bereinigen. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{1}" im System angemeldet ist. EventViewerCustomViewName = Prozesserstellung EventViewerCustomViewDescription = Prozesserstellungen und Befehlszeilen-Auditing-Ereignisse. RestartWarning = Sicherstellen, dass Sie Ihren PC neu starten. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1 index a507fd9f5..b3b90c446 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Would you like to set the graphics p ScheduledTaskPresented = The "{0}" function was already created as "{1}". CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? -CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. -CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. +CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. Scheduled task can be run only if user "{0}" logged into the system. +CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. Scheduled task can be run only if user "{0}" logged into the system. SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted. TempTaskNotificationEvent = Temporary files folder successfully cleaned up. -FolderTaskDescription = The {0} folder cleanup. +FolderTaskDescription = The {0} folder cleanup. Scheduled task can be run only if user "{0}" logged into the system. EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events. RestartWarning = Make sure to restart your PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/es-ES/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/es-ES/Sophia.psd1 index 6a51cf2e9..0d19adeed 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/es-ES/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/es-ES/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = ¿Le gustaría establecer la configu ScheduledTaskPresented = La función "{0}" ya fue creada como "{1}". CleanupTaskNotificationTitle = Limpieza de Windows CleanupTaskNotificationEvent = ¿Ejecutar la tarea de limpiar los archivos no utilizados y actualizaciones de Windows? -CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. -CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. +CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. +CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. SoftwareDistributionTaskNotificationEvent = La caché de actualización de Windows eliminado correctamente. TempTaskNotificationEvent = Los archivos de la carpeta Temp limpiados con éxito. -FolderTaskDescription = La limpieza de la carpeta "{0}". +FolderTaskDescription = La limpieza de la carpeta "{0}". La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. EventViewerCustomViewName = Creación de proceso EventViewerCustomViewDescription = Eventos de auditoría de línea de comandos y creación de procesos. RestartWarning = Asegúrese de reiniciar su PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/fr-FR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/fr-FR/Sophia.psd1 index c70ba47e9..e9068bdb8 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/fr-FR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/fr-FR/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Souhaitez-vous définir le paramètr ScheduledTaskPresented = La fonction "{0}" a déjà été créée en tant que "{1}". CleanupTaskNotificationTitle = Nettoyer Windows CleanupTaskNotificationEvent = Exécuter la tâche pour nettoyer les fichiers et les mises à jour inutilisés de Windows? -CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. -CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. +CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. +CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. SoftwareDistributionTaskNotificationEvent = Le cache de mise à jour Windows a bien été supprimé. TempTaskNotificationEvent = Le dossier des fichiers temporaires a été nettoyé avec succès. -FolderTaskDescription = Nettoyage du dossier "{0}". +FolderTaskDescription = Nettoyage du dossier "{0}". La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. EventViewerCustomViewName = Création du processus EventViewerCustomViewDescription = Audit des événements de création du processus et de ligne de commande. RestartWarning = Assurez-vous de redémarrer votre PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/hu-HU/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/hu-HU/Sophia.psd1 index fbbc2b958..eeff19ee4 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/hu-HU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/hu-HU/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Szeretné megváltoztatni a grafikus ScheduledTaskPresented = A "{0}" funkciót már létrehoztuk "{1}" néven. CleanupTaskNotificationTitle = Windows tisztítása CleanupTaskNotificationEvent = Szeretné a nem használt fájlokat es frissitéseket eltávolítani? -CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. -CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. +CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. +CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. SoftwareDistributionTaskNotificationEvent = A Windows frissités számára fenntartott ideiglenes tárhely sikeresen megtisztítva. TempTaskNotificationEvent = Az ideiglenes fájlok tárolására szolgáló könyvtár tisztítása sikeresen megtörtént. -FolderTaskDescription = A {0} könyvtár tisztítása. +FolderTaskDescription = A {0} könyvtár tisztítása. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. EventViewerCustomViewName = Folyamatok EventViewerCustomViewDescription = Folyamatok létrehozása és parancssor ellenőrző események. RestartWarning = Kérem ne felejtse el újraindítani a számítógépét. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/it-IT/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/it-IT/Sophia.psd1 index 562df037a..e7c56eb90 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/it-IT/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/it-IT/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Volete impostare l'impostazione dell ScheduledTaskPresented = La funzione "{0}" è già stata creata come "{1}". CleanupTaskNotificationTitle = Pulizia di Windows CleanupTaskNotificationEvent = Eseguire l'operazione di pulizia dei file inutilizzati e aggiornamenti di Windows? -CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". -CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. +CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. +CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. SoftwareDistributionTaskNotificationEvent = La cache degli aggiornamenti di Windows cancellata con successo. TempTaskNotificationEvent = I file cartella Temp puliti con successo. -FolderTaskDescription = Pulizia della cartella "{0}". +FolderTaskDescription = Pulizia della cartella "{0}". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. EventViewerCustomViewName = Creazione del processo EventViewerCustomViewDescription = Creazione del processi e degli eventi di controllo della riga di comando. RestartWarning = Assicurarsi di riavviare il PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pl-PL/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pl-PL/Sophia.psd1 index 2ba99980c..20267fd5b 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pl-PL/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pl-PL/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Czy chcesz ustawić wydajność graf ScheduledTaskPresented = Funkcja "{0}" została już utworzona jako "{1}". CleanupTaskNotificationTitle = Oczyszczanie system Windows CleanupTaskNotificationEvent = Uruchomić zadanie w celu usunięcia nieużywanych plików i aktualizacji systemu Windows? -CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. -CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. +CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. +CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. SoftwareDistributionTaskNotificationEvent = Pomyślnie usunięto pamięć podręczną aktualizacji systemu Windows. TempTaskNotificationEvent = Folder plików tymczasowych został pomyślnie wyczyszczony. -FolderTaskDescription = Czyszczenie folderu {0}. +FolderTaskDescription = Czyszczenie folderu {0}. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. EventViewerCustomViewName = Tworzenie procesu EventViewerCustomViewDescription = Tworzenie procesu i zdarzeń audytu. RestartWarning = Pamiętaj o ponownym uruchomieniu komputera. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pt-BR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pt-BR/Sophia.psd1 index 0a302bc9a..f0daaa572 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pt-BR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pt-BR/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Gostaria de definir a configuração ScheduledTaskPresented = A função "{0}" já foi criada como "{1}". CleanupTaskNotificationTitle = Limpeza do Windows CleanupTaskNotificationEvent = Executar tarefa para limpar arquivos e atualizações não utilizados do Windows? -CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. -CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. +CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. +CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. SoftwareDistributionTaskNotificationEvent = O cache de atualização do Windows excluído com sucesso. TempTaskNotificationEvent = Os arquivos da pasta Temp limpos com sucesso. -FolderTaskDescription = A limpeza da pasta "{0}". +FolderTaskDescription = A limpeza da pasta "{0}". A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. EventViewerCustomViewName = Criação de processo EventViewerCustomViewDescription = Criação de processos e eventos de auditoria de linha de comando. RestartWarning = Certifique-se de reiniciar o PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/ru-RU/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/ru-RU/Sophia.psd1 index 981cd0aa0..755def042 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/ru-RU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/ru-RU/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Установить для любо ScheduledTaskPresented = Функция "{0}" уже была создана от имени "{1}". CleanupTaskNotificationTitle = Очистка Windows CleanupTaskNotificationEvent = Запустить задание по очистке неиспользуемых файлов и обновлений Windows? -CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. -CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. +CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. Задание может быть запущено, только если пользователь {0} вошел в систему. +CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. Задание может быть запущено, только если пользователь {0} вошел в систему. SoftwareDistributionTaskNotificationEvent = Кэш обновлений Windows успешно удален. TempTaskNotificationEvent = Папка временных файлов успешно очищена. -FolderTaskDescription = Очистка папки {0}. +FolderTaskDescription = Очистка папки {0}. Задание может быть запущено, только если пользователь "{1}" вошел в систему. EventViewerCustomViewName = Создание процесса EventViewerCustomViewDescription = События создания нового процесса и аудит командной строки. RestartWarning = Обязательно перезагрузите ваш ПК. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/tr-TR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/tr-TR/Sophia.psd1 index aecf0496d..9d93dc7c3 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/tr-TR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/tr-TR/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Seçtiğiniz bir uygulamanın grafik ScheduledTaskPresented = "{0}" işlevi zaten "{1}" olarak oluşturulmuştu. CleanupTaskNotificationTitle = Windows temizliği CleanupTaskNotificationEvent = Windows kullanılmayan dosyaları ve güncellemeleri temizlemek için görev çalıştırılsın mı? -CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. -CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. +CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. +CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. SoftwareDistributionTaskNotificationEvent = Windows güncelleme önbelleği başarıyla silindi. TempTaskNotificationEvent = Geçici dosyalar klasörü başarıyla temizlendi. -FolderTaskDescription = "{0}" klasörü temizleniyor. +FolderTaskDescription = "{0}" klasörü temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. EventViewerCustomViewName = Süreç Oluşturma EventViewerCustomViewDescription = Süreç oluşturma ve komut satırı denetleme olayları. RestartWarning = Bilgisayarınızı yeniden başlattığınızdan emin olun. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/uk-UA/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/uk-UA/Sophia.psd1 index 44fe0b3d7..6bbffd79d 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/uk-UA/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/uk-UA/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = Встановити для будь ScheduledTaskPresented = Функцію "{0}" уже було створено від імені "{1}". CleanupTaskNotificationTitle = Очищення Windows CleanupTaskNotificationEvent = Запустити завдання з очищення невикористовуваних файлів і оновлень Windows? -CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. -CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. +CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. +CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. SoftwareDistributionTaskNotificationEvent = Кеш оновлень Windows успішно видалено. TempTaskNotificationEvent = Папка тимчасових файлів успішно очищена. -FolderTaskDescription = Очищення папки "{0}". +FolderTaskDescription = Очищення папки "{0}". Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. EventViewerCustomViewName = Створення процесу EventViewerCustomViewDescription = Події створення нового процесу і аудит командного рядка. RestartWarning = Обов'язково перезавантажте ваш ПК. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/zh-CN/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/zh-CN/Sophia.psd1 index 002cc4b37..edeea8a5c 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/zh-CN/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/zh-CN/Sophia.psd1 @@ -31,11 +31,11 @@ GraphicsPerformanceTitle = 是否将所选应用程序的图形 ScheduledTaskPresented = "{0}"函数已经被创建为"{1}"。 CleanupTaskNotificationTitle = Windows清理 CleanupTaskNotificationEvent = 运行任务以清理Windows未使用的文件和更新? -CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。 -CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。 +CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。只有登入使用者"{0}"才能啟動任務。 +CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。只有登入使用者"{0}"才能啟動任務。 SoftwareDistributionTaskNotificationEvent = Windows更新缓存已成功删除。 TempTaskNotificationEvent = 临时文件文件夹已成功清理。 -FolderTaskDescription = "{0}"文件夹清理。 +FolderTaskDescription = "{0}"文件夹清理。只有登入使用者"{0}"才能啟動任務。 EventViewerCustomViewName = 进程创建 EventViewerCustomViewDescription = 进程创建和命令行审核事件。 RestartWarning = 确保重启电脑。 diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 index ec1dbe115..8cef53695 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 @@ -1645,7 +1645,7 @@ function ScheduledTasks Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {($_.ProcessName -eq "powershell") -and ($_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2019")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2019"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -3783,7 +3783,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -3874,7 +3873,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4079,6 +4077,10 @@ function StorageSense $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Type CLEAR + if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy)) { New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -ItemType Directory -Force @@ -4092,7 +4094,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force # Turn on automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 1 -Force # Run Storage Sense every month New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 30 -Force @@ -4103,7 +4105,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force # Turn off automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 0 -Force # Run Storage Sense during low free disk space New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 0 -Force @@ -4356,6 +4358,10 @@ function DeliveryOptimization $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -4407,6 +4413,8 @@ function WindowsManageDefaultPrinter $Enable ) + Set-Policy -Scope User -Path "Software\Microsoft\Windows NT\CurrentVersion\Windows" -Name LegacyDefaultPrinterMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -4700,7 +4708,7 @@ function WindowsFeatures Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {($_.ProcessName -eq "powershell") -and ($_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2019")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2019"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -4947,7 +4955,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -5008,7 +5015,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -5051,7 +5057,7 @@ function WindowsCapabilities Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {($_.ProcessName -eq "powershell") -and ($_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2019")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2019"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5116,6 +5122,10 @@ function UpdateMicrosoftProducts $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -5173,6 +5183,10 @@ function PowerPlan $Balanced ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "High" @@ -6551,6 +6565,8 @@ function CapsLock $Enable ) + Remove-ItemProperty -Path HKCU:\Keyboard Layout -Name Attributes -Force -ErrorAction Ignore + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -6653,6 +6669,11 @@ function Autoplay $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer, HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + Set-Policy -Scope User -Path Software\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -6819,6 +6840,10 @@ function RestartNotification $Hide ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Show" @@ -6870,6 +6895,16 @@ function ActiveHours $Manually ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers, AlwaysAutoRebootAtScheduledTime -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AlwaysAutoRebootAtScheduledTime -Type CLEAR + + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -7806,7 +7841,7 @@ public static void Refresh() Associations will be exported as Application_Associations.json file in script root folder .NOTES - Import exported JSON file after a clean installation. You have to install all apps according to an exported JSON file to restore all associations + You need to install all apps according to an exported JSON file to restore all associations .NOTES Machine-wide @@ -7984,11 +8019,8 @@ function Export-Associations .SYNOPSIS Import all Windows associations - .PARAMETER Path - Import all Windows associations from a JSON file - .EXAMPLE - Export-Associations -Path D:\ + Import-Associations .NOTES You have to install all apps according to an exported JSON file to restore all associations @@ -8183,10 +8215,10 @@ function InstallVCRedist <# .SYNOPSIS - Install the latest .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 .EXAMPLE - InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 + InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 .LINK https://dotnet.microsoft.com/en-us/download/dotnet @@ -8203,7 +8235,7 @@ function InstallDotNetRuntimes Mandatory = $true, ParameterSetName = "Runtimes" )] - [ValidateSet("NET6x64", "NET8x64")] + [ValidateSet("NET8x64", "NET9x64")] [string[]] $Runtimes ) @@ -8214,18 +8246,18 @@ function InstallDotNetRuntimes { switch ($Runtime) { - NET6x64 + NET8x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET6Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -8236,27 +8268,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 6 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 8 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET6Version has only three, unless the [System.Version] accelerator fails - $dotnet6Version = (Get-Item -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet6Version = "{0}.{1}.{2}" -f $dotnet6Version.Split(".") + # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails + $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") } else { - $dotnet6Version = "0.0" + $dotnet8Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 6 is not installed at all - if (([System.Version]$NET6Version -gt [System.Version]$dotnet6Version) -or ($dotnet6Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all + if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) { try { - # Downloading .NET Desktop Runtime 6 x64 + # .NET Desktop Runtime 8 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET6Version/dotnet-runtime-$NET6Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -8272,15 +8304,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET6Version" -Verbose + Write-Verbose -Message ".NET $NET8Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -8292,18 +8324,18 @@ function InstallDotNetRuntimes Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } - NET8x64 + NET9x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/9.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET9Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -8314,27 +8346,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 8 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 9 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails - $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") + # FileVersion has four properties while $NET9Version has only three, unless the [System.Version] accelerator fails + $dotnet9Version = (Get-Item -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet9Version = "{0}.{1}.{2}" -f $dotnet9Version.Split(".") } else { - $dotnet8Version = "0.0" + $dotnet9Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all - if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 9 is not installed at all + if (([System.Version]$NET9Version -gt [System.Version]$dotnet9Version) -or ($dotnet9Version -eq "0.0")) { try { - # .NET Desktop Runtime 8 x64 + # Downloading .NET Desktop Runtime 9 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET9Version/dotnet-runtime-$NET9Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -8350,15 +8382,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET8Version" -Verbose + Write-Verbose -Message ".NET $NET9Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -8564,57 +8596,6 @@ function PreventEdgeShortcutCreation } } -<# - .SYNOPSIS - Internal SATA drives up as removeable media in the taskbar notification area - - .PARAMETER Disable - Prevent all internal SATA drives from showing up as removable media in the taskbar notification area - - .PARAMETER Default - Show up all internal SATA drives as removeable media in the taskbar notification area - - .EXAMPLE - SATADrivesRemovableMedia -Disable - - .EXAMPLE - SATADrivesRemovableMedia -Default - - .NOTES - Machine-wide -#> -function SATADrivesRemovableMedia -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Default" - )] - [switch] - $Default - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Type MultiString -Value @(0, 1, 2, 3, 4, 5) -Force - } - "Default" - { - Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Force -ErrorAction Ignore - } - } -} - <# .SYNOPSIS Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups @@ -9067,7 +9048,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro TaskPath = "Sophia" Principal = $Principal Action = $Action - Description = $Localization.CleanupTaskDescription + Description = $Localization.CleanupTaskDescription -f $env:USERNAME Settings = $Settings } Register-ScheduledTask @Parameters -Force @@ -9227,7 +9208,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription + Description = $Localization.CleanupNotificationTaskDescription -f $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -9245,7 +9226,8 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro $Paths = @( "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.vbs", "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.ps1", - "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1" + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1", + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.vbs" ) Remove-Item -Path $Paths -Force -ErrorAction Ignore @@ -9556,7 +9538,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -9821,6 +9803,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_ `$Paths = @( # Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent (-join ("`$env:SystemDrive\", '`$WinREAgent')), + (-join ("`$env:SystemDrive\", '`$SysReset')), + (-join ("`$env:SystemDrive\", '`$Windows.~WS')), + "`$env:SystemDrive\ESD", "`$env:SystemDrive\Intel", "`$env:SystemDrive\PerfLogs" ) @@ -9885,7 +9870,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" + Description = $Localization.FolderTaskDescription -f "%TEMP%", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -11165,7 +11150,6 @@ function BitmapImageNewContext { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -11244,7 +11228,6 @@ function RichTextDocumentNewContext { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 index ba3b9c730..86f2497ea 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 @@ -771,12 +771,12 @@ NetworkDiscovery -Enable InstallVCRedist <# - Install the latest .NET Desktop Runtime 6, 8 x64 - Установить последнюю версию .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 + Установить последнюю версию .NET Desktop Runtime 8, 9 x64 https://dotnet.microsoft.com/en-us/download/dotnet #> -InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 +InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 # Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only # Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России @@ -796,14 +796,6 @@ PreventEdgeShortcutCreation -Channels Stable, Beta, Dev, Canary # Не предотвращать создание ярлыков на рабочем столе при обновлении Microsoft Edge (значение по умолчанию) # PreventEdgeShortcutCreation -Disable -# Prevent all internal SATA drives from showing up as removable media in the taskbar notification area -# Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач -SATADrivesRemovableMedia -Disable - -# Show up all internal SATA drives as removeable media in the taskbar notification area (default value) -# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию) -# SATADrivesRemovableMedia -Default - # Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups # Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями # RegistryBackup -Enable diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/de-DE/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/de-DE/Sophia.psd1 index aa19263cd..e0319d375 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/de-DE/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/de-DE/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Möchten Sie die Einstellung der Gra ScheduledTaskPresented = Die Funktion "{0}" wurde bereits als "{1}" angelegt. CleanupTaskNotificationTitle = Windows aufräumen CleanupTaskNotificationEvent = Aufgabe zum Bereinigen nicht verwendeter Windows-Dateien und -Updates ausführen? -CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. -CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. +CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. +CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. SoftwareDistributionTaskNotificationEvent = Der Windows Update-Cache wurde erfolgreich gelöscht. TempTaskNotificationEvent = Der Ordner mit den temporären Dateien wurde erfolgreich bereinigt. -FolderTaskDescription = Ordner "{0}" bereinigen. +FolderTaskDescription = Ordner "{0}" bereinigen. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{1}" im System angemeldet ist. EventViewerCustomViewName = Prozesserstellung EventViewerCustomViewDescription = Prozesserstellungen und Befehlszeilen-Auditing-Ereignisse. RestartWarning = Sicherstellen, dass Sie Ihren PC neu starten. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1 index f6a32f75e..41724474d 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Would you like to set the graphics p ScheduledTaskPresented = The "{0}" function was already created as "{1}". CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? -CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. -CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. +CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. Scheduled task can be run only if user "{0}" logged into the system. +CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. Scheduled task can be run only if user "{0}" logged into the system. SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted. TempTaskNotificationEvent = Temporary files folder successfully cleaned up. -FolderTaskDescription = The {0} folder cleanup. +FolderTaskDescription = The {0} folder cleanup. Scheduled task can be run only if user "{0}" logged into the system. EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events. RestartWarning = Make sure to restart your PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/es-ES/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/es-ES/Sophia.psd1 index 67198f9e7..5f68a53ac 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/es-ES/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/es-ES/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = ¿Le gustaría establecer la configu ScheduledTaskPresented = La función "{0}" ya fue creada como "{1}". CleanupTaskNotificationTitle = Limpieza de Windows CleanupTaskNotificationEvent = ¿Ejecutar la tarea de limpiar los archivos no utilizados y actualizaciones de Windows? -CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. -CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. +CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. +CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. SoftwareDistributionTaskNotificationEvent = La caché de actualización de Windows eliminado correctamente. TempTaskNotificationEvent = Los archivos de la carpeta Temp limpiados con éxito. -FolderTaskDescription = La limpieza de la carpeta "{0}". +FolderTaskDescription = La limpieza de la carpeta "{0}". La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. EventViewerCustomViewName = Creación de proceso EventViewerCustomViewDescription = Eventos de auditoría de línea de comandos y creación de procesos. RestartWarning = Asegúrese de reiniciar su PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/fr-FR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/fr-FR/Sophia.psd1 index 57be36da1..3e10d570b 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/fr-FR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/fr-FR/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Souhaitez-vous définir le paramètr ScheduledTaskPresented = La fonction "{0}" a déjà été créée en tant que "{1}". CleanupTaskNotificationTitle = Nettoyer Windows CleanupTaskNotificationEvent = Exécuter la tâche pour nettoyer les fichiers et les mises à jour inutilisés de Windows? -CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. -CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. +CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. +CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. SoftwareDistributionTaskNotificationEvent = Le cache de mise à jour Windows a bien été supprimé. TempTaskNotificationEvent = Le dossier des fichiers temporaires a été nettoyé avec succès. -FolderTaskDescription = Nettoyage du dossier "{0}". +FolderTaskDescription = Nettoyage du dossier "{0}". La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. EventViewerCustomViewName = Création du processus EventViewerCustomViewDescription = Audit des événements de création du processus et de ligne de commande. RestartWarning = Assurez-vous de redémarrer votre PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/hu-HU/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/hu-HU/Sophia.psd1 index 3421096d7..ef721c1db 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/hu-HU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/hu-HU/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Szeretné megváltoztatni a grafikus ScheduledTaskPresented = A "{0}" funkciót már létrehoztuk "{1}" néven. CleanupTaskNotificationTitle = Windows tisztítása CleanupTaskNotificationEvent = Szeretné a nem használt fájlokat es frissitéseket eltávolítani? -CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. -CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. +CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. +CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. SoftwareDistributionTaskNotificationEvent = A Windows frissités számára fenntartott ideiglenes tárhely sikeresen megtisztítva. TempTaskNotificationEvent = Az ideiglenes fájlok tárolására szolgáló könyvtár tisztítása sikeresen megtörtént. -FolderTaskDescription = A {0} könyvtár tisztítása. +FolderTaskDescription = A {0} könyvtár tisztítása. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. EventViewerCustomViewName = Folyamatok EventViewerCustomViewDescription = Folyamatok létrehozása és parancssor ellenőrző események. RestartWarning = Kérem ne felejtse el újraindítani a számítógépét. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/it-IT/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/it-IT/Sophia.psd1 index 5fee0eddd..37b8c2dbf 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/it-IT/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/it-IT/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Volete impostare l'impostazione dell ScheduledTaskPresented = La funzione "{0}" è già stata creata come "{1}". CleanupTaskNotificationTitle = Pulizia di Windows CleanupTaskNotificationEvent = Eseguire l'operazione di pulizia dei file inutilizzati e aggiornamenti di Windows? -CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". -CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. +CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. +CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. SoftwareDistributionTaskNotificationEvent = La cache degli aggiornamenti di Windows cancellata con successo. TempTaskNotificationEvent = I file cartella Temp puliti con successo. -FolderTaskDescription = Pulizia della cartella "{0}". +FolderTaskDescription = Pulizia della cartella "{0}". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. EventViewerCustomViewName = Creazione del processo EventViewerCustomViewDescription = Creazione del processi e degli eventi di controllo della riga di comando. RestartWarning = Assicurarsi di riavviare il PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pl-PL/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pl-PL/Sophia.psd1 index c0cc4ec8b..a46bef8a4 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pl-PL/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pl-PL/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Czy chcesz ustawić wydajność graf ScheduledTaskPresented = Funkcja "{0}" została już utworzona jako "{1}". CleanupTaskNotificationTitle = Oczyszczanie system Windows CleanupTaskNotificationEvent = Uruchomić zadanie w celu usunięcia nieużywanych plików i aktualizacji systemu Windows? -CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. -CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. +CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. +CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. SoftwareDistributionTaskNotificationEvent = Pomyślnie usunięto pamięć podręczną aktualizacji systemu Windows. TempTaskNotificationEvent = Folder plików tymczasowych został pomyślnie wyczyszczony. -FolderTaskDescription = Czyszczenie folderu {0}. +FolderTaskDescription = Czyszczenie folderu {0}. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. EventViewerCustomViewName = Tworzenie procesu EventViewerCustomViewDescription = Tworzenie procesu i zdarzeń audytu. RestartWarning = Pamiętaj o ponownym uruchomieniu komputera. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pt-BR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pt-BR/Sophia.psd1 index 023613a06..29c4e9faa 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pt-BR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pt-BR/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Gostaria de definir a configuração ScheduledTaskPresented = A função "{0}" já foi criada como "{1}". CleanupTaskNotificationTitle = Limpeza do Windows CleanupTaskNotificationEvent = Executar tarefa para limpar arquivos e atualizações não utilizados do Windows? -CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. -CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. +CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. +CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. SoftwareDistributionTaskNotificationEvent = O cache de atualização do Windows excluído com sucesso. TempTaskNotificationEvent = Os arquivos da pasta Temp limpos com sucesso. -FolderTaskDescription = A limpeza da pasta "{0}". +FolderTaskDescription = A limpeza da pasta "{0}". A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. EventViewerCustomViewName = Criação de processo EventViewerCustomViewDescription = Criação de processos e eventos de auditoria de linha de comando. RestartWarning = Certifique-se de reiniciar o PC. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/ru-RU/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/ru-RU/Sophia.psd1 index 86bf4f477..15aa9f02f 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/ru-RU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/ru-RU/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Установить для любо ScheduledTaskPresented = Функция "{0}" уже была создана от имени "{1}". CleanupTaskNotificationTitle = Очистка Windows CleanupTaskNotificationEvent = Запустить задание по очистке неиспользуемых файлов и обновлений Windows? -CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. -CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. +CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. Задание может быть запущено, только если пользователь {0} вошел в систему. +CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. Задание может быть запущено, только если пользователь {0} вошел в систему. SoftwareDistributionTaskNotificationEvent = Кэш обновлений Windows успешно удален. TempTaskNotificationEvent = Папка временных файлов успешно очищена. -FolderTaskDescription = Очистка папки {0}. +FolderTaskDescription = Очистка папки {0}. Задание может быть запущено, только если пользователь "{1}" вошел в систему. EventViewerCustomViewName = Создание процесса EventViewerCustomViewDescription = События создания нового процесса и аудит командной строки. RestartWarning = Обязательно перезагрузите ваш ПК. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/tr-TR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/tr-TR/Sophia.psd1 index 2fe39e43e..4ec0e8ee2 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/tr-TR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/tr-TR/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Seçtiğiniz bir uygulamanın grafik ScheduledTaskPresented = "{0}" işlevi zaten "{1}" olarak oluşturulmuştu. CleanupTaskNotificationTitle = Windows temizliği CleanupTaskNotificationEvent = Windows kullanılmayan dosyaları ve güncellemeleri temizlemek için görev çalıştırılsın mı? -CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. -CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. +CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. +CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. SoftwareDistributionTaskNotificationEvent = Windows güncelleme önbelleği başarıyla silindi. TempTaskNotificationEvent = Geçici dosyalar klasörü başarıyla temizlendi. -FolderTaskDescription = "{0}" klasörü temizleniyor. +FolderTaskDescription = "{0}" klasörü temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. EventViewerCustomViewName = Süreç Oluşturma EventViewerCustomViewDescription = Süreç oluşturma ve komut satırı denetleme olayları. RestartWarning = Bilgisayarınızı yeniden başlattığınızdan emin olun. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/uk-UA/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/uk-UA/Sophia.psd1 index e0a49395c..ba3df67db 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/uk-UA/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/uk-UA/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = Встановити для будь ScheduledTaskPresented = Функцію "{0}" уже було створено від імені "{1}". CleanupTaskNotificationTitle = Очищення Windows CleanupTaskNotificationEvent = Запустити завдання з очищення невикористовуваних файлів і оновлень Windows? -CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. -CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. +CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. +CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. SoftwareDistributionTaskNotificationEvent = Кеш оновлень Windows успішно видалено. TempTaskNotificationEvent = Папка тимчасових файлів успішно очищена. -FolderTaskDescription = Очищення папки "{0}". +FolderTaskDescription = Очищення папки "{0}". Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. EventViewerCustomViewName = Створення процесу EventViewerCustomViewDescription = Події створення нового процесу і аудит командного рядка. RestartWarning = Обов'язково перезавантажте ваш ПК. diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/zh-CN/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/zh-CN/Sophia.psd1 index 211ce8ebe..3adac8f1a 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/zh-CN/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/zh-CN/Sophia.psd1 @@ -33,11 +33,11 @@ GraphicsPerformanceTitle = 是否将所选应用程序的图形 ScheduledTaskPresented = "{0}"函数已经被创建为"{1}"。 CleanupTaskNotificationTitle = Windows清理 CleanupTaskNotificationEvent = 运行任务以清理Windows未使用的文件和更新? -CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。 -CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。 +CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。只有登入使用者"{0}"才能啟動任務。 +CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。只有登入使用者"{0}"才能啟動任務。 SoftwareDistributionTaskNotificationEvent = Windows更新缓存已成功删除。 TempTaskNotificationEvent = 临时文件文件夹已成功清理。 -FolderTaskDescription = "{0}"文件夹清理。 +FolderTaskDescription = "{0}"文件夹清理。只有登入使用者"{0}"才能啟動任務。 EventViewerCustomViewName = 进程创建 EventViewerCustomViewDescription = 进程创建和命令行审核事件。 RestartWarning = 确保重启电脑。 diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 index 7e2109c8f..4e5b2bdb2 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 @@ -1645,7 +1645,7 @@ function ScheduledTasks Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2021")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2021"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -4165,7 +4165,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4256,7 +4255,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4461,6 +4459,10 @@ function StorageSense $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Type CLEAR + if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy)) { New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -ItemType Directory -Force @@ -4474,7 +4476,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force # Turn on automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 1 -Force # Run Storage Sense every month New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 30 -Force @@ -4485,7 +4487,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force # Turn off automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 0 -Force # Run Storage Sense during low free disk space New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 0 -Force @@ -4738,6 +4740,10 @@ function DeliveryOptimization $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -4790,6 +4796,8 @@ function WindowsManageDefaultPrinter $Enable ) + Set-Policy -Scope User -Path "Software\Microsoft\Windows NT\CurrentVersion\Windows" -Name LegacyDefaultPrinterMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5083,7 +5091,7 @@ function WindowsFeatures Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2021")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2021"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5345,7 +5353,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -5406,7 +5413,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -5449,7 +5455,7 @@ function WindowsCapabilities Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2021")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2021"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5514,6 +5520,10 @@ function UpdateMicrosoftProducts $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -5571,6 +5581,10 @@ function PowerPlan $Balanced ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "High" @@ -6795,6 +6809,19 @@ function RecommendedTroubleshooting $Default ) + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -Force -ErrorAction Ignore + + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR + + # Turn on Windows Error Reporting + Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore + + Get-Service -Name WerSvc | Set-Service -StartupType Manual + Get-Service -Name WerSvc | Start-Service + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -6804,24 +6831,6 @@ function RecommendedTroubleshooting New-Item -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Force } New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Name UserPreference -PropertyType DWord -Value 3 -Force - - # Set Windows level of diagnostic data gathering to "Optional diagnostic data" - if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack)) - { - New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Force - } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force - - Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWORD -Value 3 - - # Turn on Windows Error Reporting - Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore - - Get-Service -Name WerSvc | Set-Service -StartupType Manual - Get-Service -Name WerSvc | Start-Service } "Default" { @@ -6933,6 +6942,7 @@ function ReservedStorage } catch [System.Runtime.InteropServices.COMException] { + Write-Warning -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) Write-Error -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -7087,6 +7097,8 @@ function CapsLock $Enable ) + Remove-ItemProperty -Path HKCU:\Keyboard Layout -Name Attributes -Force -ErrorAction Ignore + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -7189,6 +7201,11 @@ function Autoplay $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer, HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + Set-Policy -Scope User -Path Software\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -7405,6 +7422,10 @@ function RestartNotification $Hide ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Show" @@ -7456,6 +7477,12 @@ function RestartDeviceAfterUpdate $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -7507,6 +7534,16 @@ function ActiveHours $Manually ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers, AlwaysAutoRebootAtScheduledTime -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AlwaysAutoRebootAtScheduledTime -Type CLEAR + + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -8443,7 +8480,7 @@ public static void Refresh() Associations will be exported as Application_Associations.json file in script root folder .NOTES - Import exported JSON file after a clean installation. You have to install all apps according to an exported JSON file to restore all associations + You need to install all apps according to an exported JSON file to restore all associations .NOTES Machine-wide @@ -8621,11 +8658,8 @@ function Export-Associations .SYNOPSIS Import all Windows associations - .PARAMETER Path - Import all Windows associations from a JSON file - .EXAMPLE - Export-Associations -Path D:\ + Import-Associations .NOTES You have to install all apps according to an exported JSON file to restore all associations @@ -8820,10 +8854,10 @@ function InstallVCRedist <# .SYNOPSIS - Install the latest .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 .EXAMPLE - InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 + InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 .LINK https://dotnet.microsoft.com/en-us/download/dotnet @@ -8840,7 +8874,7 @@ function InstallDotNetRuntimes Mandatory = $true, ParameterSetName = "Runtimes" )] - [ValidateSet("NET6x64", "NET8x64")] + [ValidateSet("NET8x64", "NET9x64")] [string[]] $Runtimes ) @@ -8851,18 +8885,18 @@ function InstallDotNetRuntimes { switch ($Runtime) { - NET6x64 + NET8x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET6Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -8873,27 +8907,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 6 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 8 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET6Version has only three, unless the [System.Version] accelerator fails - $dotnet6Version = (Get-Item -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet6Version = "{0}.{1}.{2}" -f $dotnet6Version.Split(".") + # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails + $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") } else { - $dotnet6Version = "0.0" + $dotnet8Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 6 is not installed at all - if (([System.Version]$NET6Version -gt [System.Version]$dotnet6Version) -or ($dotnet6Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all + if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) { try { - # Downloading .NET Desktop Runtime 6 x64 + # .NET Desktop Runtime 8 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET6Version/dotnet-runtime-$NET6Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -8909,15 +8943,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET6Version" -Verbose + Write-Verbose -Message ".NET $NET8Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -8929,18 +8963,18 @@ function InstallDotNetRuntimes Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } - NET8x64 + NET9x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/9.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET9Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -8951,27 +8985,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 8 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 9 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails - $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") + # FileVersion has four properties while $NET9Version has only three, unless the [System.Version] accelerator fails + $dotnet9Version = (Get-Item -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet9Version = "{0}.{1}.{2}" -f $dotnet9Version.Split(".") } else { - $dotnet8Version = "0.0" + $dotnet9Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all - if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 9 is not installed at all + if (([System.Version]$NET9Version -gt [System.Version]$dotnet9Version) -or ($dotnet9Version -eq "0.0")) { try { - # .NET Desktop Runtime 8 x64 + # Downloading .NET Desktop Runtime 9 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET9Version/dotnet-runtime-$NET9Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -8987,18 +9021,18 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET8Version" -Verbose + Write-Verbose -Message ".NET $NET9Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) - Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore + Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore } else { @@ -9201,57 +9235,6 @@ function PreventEdgeShortcutCreation } } -<# - .SYNOPSIS - Internal SATA drives up as removeable media in the taskbar notification area - - .PARAMETER Disable - Prevent all internal SATA drives from showing up as removable media in the taskbar notification area - - .PARAMETER Default - Show up all internal SATA drives as removeable media in the taskbar notification area - - .EXAMPLE - SATADrivesRemovableMedia -Disable - - .EXAMPLE - SATADrivesRemovableMedia -Default - - .NOTES - Machine-wide -#> -function SATADrivesRemovableMedia -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Default" - )] - [switch] - $Default - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Type MultiString -Value @(0, 1, 2, 3, 4, 5) -Force - } - "Default" - { - Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Force -ErrorAction Ignore - } - } -} - <# .SYNOPSIS Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups @@ -9343,7 +9326,6 @@ function Install-WSL { Write-Warning -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") Write-Error -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -9452,7 +9434,7 @@ function Install-WSL Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2021")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10 LTSC 2021"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -10188,7 +10170,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro TaskPath = "Sophia" Principal = $Principal Action = $Action - Description = $Localization.CleanupTaskDescription + Description = $Localization.CleanupTaskDescription -f $env:USERNAME Settings = $Settings } Register-ScheduledTask @Parameters -Force @@ -10348,7 +10330,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription + Description = $Localization.CleanupNotificationTaskDescription -f $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -10366,7 +10348,8 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro $Paths = @( "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.vbs", "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.ps1", - "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1" + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1", + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.vbs" ) Remove-Item -Path $Paths -Force -ErrorAction Ignore @@ -10677,7 +10660,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -10942,6 +10925,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_ `$Paths = @( # Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent (-join ("`$env:SystemDrive\", '`$WinREAgent')), + (-join ("`$env:SystemDrive\", '`$SysReset')), + (-join ("`$env:SystemDrive\", '`$Windows.~WS')), + "`$env:SystemDrive\ESD", "`$env:SystemDrive\Intel", "`$env:SystemDrive\PerfLogs" ) @@ -11006,7 +10992,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" + Description = $Localization.FolderTaskDescription -f "%TEMP%", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -12529,7 +12515,6 @@ function BitmapImageNewContext { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -12608,7 +12593,6 @@ function RichTextDocumentNewContext { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 index 646a01131..cdcc96f22 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 @@ -870,12 +870,12 @@ NetworkDiscovery -Enable InstallVCRedist <# - Install the latest .NET Desktop Runtime 6, 8 x64 - Установить последнюю версию .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 + Установить последнюю версию .NET Desktop Runtime 8, 9 x64 https://dotnet.microsoft.com/en-us/download/dotnet #> -InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 +InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 # Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only # Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России @@ -895,14 +895,6 @@ PreventEdgeShortcutCreation -Channels Stable, Beta, Dev, Canary # Не предотвращать создание ярлыков на рабочем столе при обновлении Microsoft Edge (значение по умолчанию) # PreventEdgeShortcutCreation -Disable -# Prevent all internal SATA drives from showing up as removable media in the taskbar notification area -# Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач -SATADrivesRemovableMedia -Disable - -# Show up all internal SATA drives as removeable media in the taskbar notification area (default value) -# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию) -# SATADrivesRemovableMedia -Default - # Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups # Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями # RegistryBackup -Enable diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/de-DE/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/de-DE/Sophia.psd1 index b71ea209b..01e26662c 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/de-DE/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/de-DE/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Geplante Aufgaben OneDriveUninstalling = OneDrive deinstallieren... OneDriveInstalling = OneDrive installieren... OneDriveDownloading = OneDrive herunterladen... -OneDriveWarning = Die "{0}"-Funktion wird nur angewendet, wenn die Voreinstellung so konfiguriert ist, dass OneDrive entfernt wird (oder die App bereits entfernt wurde), andernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. +OneDriveWarning = Die Funktion "WinPrtScrFolder -Desktop" wird nur angewendet, wenn der Benutzer das Skript zum Entfernen von OneDrive konfiguriert hat (oder OneDrive bereits entfernt wurde).\nAndernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. WindowsFeaturesTitle = Windows-Features OptionalFeaturesTitle = Optionale Features EnableHardwareVT = Virtualisierung in UEFI aktivieren. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Möchten Sie die Einstellung der Gra ScheduledTaskPresented = Die Funktion "{0}" wurde bereits als "{1}" angelegt. CleanupTaskNotificationTitle = Windows aufräumen CleanupTaskNotificationEvent = Aufgabe zum Bereinigen nicht verwendeter Windows-Dateien und -Updates ausführen? -CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. -CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. +CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. +CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. SoftwareDistributionTaskNotificationEvent = Der Windows Update-Cache wurde erfolgreich gelöscht. TempTaskNotificationEvent = Der Ordner mit den temporären Dateien wurde erfolgreich bereinigt. -FolderTaskDescription = Ordner "{0}" bereinigen. +FolderTaskDescription = Ordner "{0}" bereinigen. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{1}" im System angemeldet ist. EventViewerCustomViewName = Prozesserstellung EventViewerCustomViewDescription = Prozesserstellungen und Befehlszeilen-Auditing-Ereignisse. RestartWarning = Sicherstellen, dass Sie Ihren PC neu starten. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1 index 67170568e..be97f9f56 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Scheduled tasks OneDriveUninstalling = Uninstalling OneDrive... OneDriveInstalling = Installing OneDrive... OneDriveDownloading = Downloading OneDrive... -OneDriveWarning = The "{0}" function will be applied only if the preset is configured to remove OneDrive (or the app was already removed), otherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. +OneDriveWarning = "WinPrtScrFolder -Desktop" function will be applied only if user configured script to remove OneDrive (or OneDrive was already removed).\nOtherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. WindowsFeaturesTitle = Windows features OptionalFeaturesTitle = Optional features EnableHardwareVT = Enable Virtualization in UEFI. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Would you like to set the graphics p ScheduledTaskPresented = The "{0}" function was already created as "{1}". CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? -CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. -CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. +CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. Scheduled task can be run only if user "{0}" logged into the system. +CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. Scheduled task can be run only if user "{0}" logged into the system. SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted. TempTaskNotificationEvent = Temporary files folder successfully cleaned up. -FolderTaskDescription = The {0} folder cleanup. +FolderTaskDescription = The {0} folder cleanup. Scheduled task can be run only if user "{0}" logged into the system. EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events. RestartWarning = Make sure to restart your PC. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/es-ES/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/es-ES/Sophia.psd1 index 0331121ca..550166706 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/es-ES/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/es-ES/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Tareas programadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalación de OneDrive... OneDriveDownloading = Descargando OneDrive... -OneDriveWarning = La función "{0}" se aplicará sólo si el preajuste está configurado para eliminar OneDrive (o la aplicación ya fue eliminada), de lo contrario la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. +OneDriveWarning = La función "WinPrtScrFolder -Desktop" se aplicará sólo si el usuario configuró el script para eliminar OneDrive (o OneDrive ya fue eliminado).\nDe lo contrario, la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. WindowsFeaturesTitle = Características de Windows OptionalFeaturesTitle = Características opcionales EnableHardwareVT = Habilitar la virtualización en UEFI. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = ¿Le gustaría establecer la configu ScheduledTaskPresented = La función "{0}" ya fue creada como "{1}". CleanupTaskNotificationTitle = Limpieza de Windows CleanupTaskNotificationEvent = ¿Ejecutar la tarea de limpiar los archivos no utilizados y actualizaciones de Windows? -CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. -CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. +CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. +CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. SoftwareDistributionTaskNotificationEvent = La caché de actualización de Windows eliminado correctamente. TempTaskNotificationEvent = Los archivos de la carpeta Temp limpiados con éxito. -FolderTaskDescription = La limpieza de la carpeta "{0}". +FolderTaskDescription = La limpieza de la carpeta "{0}". La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. EventViewerCustomViewName = Creación de proceso EventViewerCustomViewDescription = Eventos de auditoría de línea de comandos y creación de procesos. RestartWarning = Asegúrese de reiniciar su PC. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/fr-FR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/fr-FR/Sophia.psd1 index dafe76da3..8468052ff 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/fr-FR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/fr-FR/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Tâches planifiées OneDriveUninstalling = Désinstalltion de OneDrive... OneDriveInstalling = Installation de OneDrive... OneDriveDownloading = Téléchargement de OneDrive... -OneDriveWarning = La fonction "{0}" sera appliquée uniquement si le préréglage est configuré pour supprimer OneDrive (ou si l'application a déjà été supprimée), sinon la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive s'interrompt. +OneDriveWarning = La fonction "WinPrtScrFolder -Desktop" ne sera appliquée que si l'utilisateur a configuré le script pour supprimer OneDrive (ou si OneDrive a déjà été supprimé).\nDans le cas contraire, la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive est interrompue. WindowsFeaturesTitle = Fonctionnalités OptionalFeaturesTitle = Fonctionnalités optionnelles EnableHardwareVT = Activer la virtualisation dans UEFI. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Souhaitez-vous définir le paramètr ScheduledTaskPresented = La fonction "{0}" a déjà été créée en tant que "{1}". CleanupTaskNotificationTitle = Nettoyer Windows CleanupTaskNotificationEvent = Exécuter la tâche pour nettoyer les fichiers et les mises à jour inutilisés de Windows? -CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. -CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. +CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. +CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. SoftwareDistributionTaskNotificationEvent = Le cache de mise à jour Windows a bien été supprimé. TempTaskNotificationEvent = Le dossier des fichiers temporaires a été nettoyé avec succès. -FolderTaskDescription = Nettoyage du dossier "{0}". +FolderTaskDescription = Nettoyage du dossier "{0}". La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. EventViewerCustomViewName = Création du processus EventViewerCustomViewDescription = Audit des événements de création du processus et de ligne de commande. RestartWarning = Assurez-vous de redémarrer votre PC. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/hu-HU/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/hu-HU/Sophia.psd1 index 96f131924..bc9f7bc8c 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/hu-HU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/hu-HU/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Ütemezett feladatok OneDriveUninstalling = OneDrive eltávolítása... OneDriveInstalling = OneDrive telepítése... OneDriveDownloading = OneDrive letöltése... -OneDriveWarning = A "{0}" funkció csak akkor kerül alkalmazásra, ha az előbeállítás a OneDrive eltávolítására van beállítva (vagy az alkalmazás már eltávolításra került), különben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. +OneDriveWarning = A "WinPrtScrFolder -Desktop" funkció csak akkor kerül alkalmazásra, ha a felhasználó a OneDrive eltávolítására konfigurálta a szkriptet (vagy a OneDrive már eltávolításra került).\nEllenkező esetben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. WindowsFeaturesTitle = Windows szolgáltatások OptionalFeaturesTitle = Opcionális szolgáltatások EnableHardwareVT = Virtualizáció engedélyezése UEFI-ben. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Szeretné megváltoztatni a grafikus ScheduledTaskPresented = A "{0}" funkciót már létrehoztuk "{1}" néven. CleanupTaskNotificationTitle = Windows tisztítása CleanupTaskNotificationEvent = Szeretné a nem használt fájlokat es frissitéseket eltávolítani? -CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. -CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. +CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. +CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. SoftwareDistributionTaskNotificationEvent = A Windows frissités számára fenntartott ideiglenes tárhely sikeresen megtisztítva. TempTaskNotificationEvent = Az ideiglenes fájlok tárolására szolgáló könyvtár tisztítása sikeresen megtörtént. -FolderTaskDescription = A {0} könyvtár tisztítása. +FolderTaskDescription = A {0} könyvtár tisztítása. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. EventViewerCustomViewName = Folyamatok EventViewerCustomViewDescription = Folyamatok létrehozása és parancssor ellenőrző események. RestartWarning = Kérem ne felejtse el újraindítani a számítógépét. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/it-IT/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/it-IT/Sophia.psd1 index 61cdfd4fa..57d2a248f 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/it-IT/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/it-IT/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Attività pianificate OneDriveUninstalling = Disinstallazione di OneDrive... OneDriveInstalling = Installazione di OneDrive... OneDriveDownloading = Download di OneDrive... -OneDriveWarning = La funzione "{0}" sarà applicata solo se il preset è configurato per rimuovere OneDrive (o se l'app è già stata rimossa), altrimenti la funzionalità di backup per le cartelle "Desktop" e "Pictures" in OneDrive si interromperà. +OneDriveWarning = La funzione "WinPrtScrFolder -Desktop" verrà applicata solo se l'utente ha configurato lo script per rimuovere OneDrive (o se OneDrive è già stato rimosso).\nIn caso contrario, la funzionalità di backup per le cartelle "Desktop" e "Immagini" di OneDrive si interrompe. WindowsFeaturesTitle = Funzionalità di Windows OptionalFeaturesTitle = Caratteristiche opzionali EnableHardwareVT = Abilita virtualizzazione in UEFI. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Volete impostare l'impostazione dell ScheduledTaskPresented = La funzione "{0}" è già stata creata come "{1}". CleanupTaskNotificationTitle = Pulizia di Windows CleanupTaskNotificationEvent = Eseguire l'operazione di pulizia dei file inutilizzati e aggiornamenti di Windows? -CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". -CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. +CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. +CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. SoftwareDistributionTaskNotificationEvent = La cache degli aggiornamenti di Windows cancellata con successo. TempTaskNotificationEvent = I file cartella Temp puliti con successo. -FolderTaskDescription = Pulizia della cartella "{0}". +FolderTaskDescription = Pulizia della cartella "{0}". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. EventViewerCustomViewName = Creazione del processo EventViewerCustomViewDescription = Creazione del processi e degli eventi di controllo della riga di comando. RestartWarning = Assicurarsi di riavviare il PC. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pl-PL/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pl-PL/Sophia.psd1 index 62eaa3a20..53a2a0db6 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pl-PL/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pl-PL/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Zaplanowane zadania OneDriveUninstalling = Odinstalowywanie OneDrive... OneDriveInstalling = Instalowanie OneDrive... OneDriveDownloading = Pobieranie OneDrive... -OneDriveWarning = Funkcja "{0}" zostanie zastosowana tylko wtedy, gdy ustawienie wstępne są skonfigurowane do usunięcia OneDrive (lub aplikacja została już usunięta), w przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Obrazy" w usłudze OneDrive ulegnie awarii. +OneDriveWarning = Funkcja "WinPrtScrFolder -Desktop" zostanie zastosowana tylko wtedy, gdy użytkownik skonfigurował skrypt do usuwania OneDrive (lub OneDrive został już usunięty).\nW przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Zdjęcia" w OneDrive zostanie przerwana. WindowsFeaturesTitle = Funkcje Windows OptionalFeaturesTitle = Funkcje opcjonalne EnableHardwareVT = Włącz wirtualizację w UEFI. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Czy chcesz ustawić wydajność graf ScheduledTaskPresented = Funkcja "{0}" została już utworzona jako "{1}". CleanupTaskNotificationTitle = Oczyszczanie system Windows CleanupTaskNotificationEvent = Uruchomić zadanie w celu usunięcia nieużywanych plików i aktualizacji systemu Windows? -CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. -CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. +CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. +CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. SoftwareDistributionTaskNotificationEvent = Pomyślnie usunięto pamięć podręczną aktualizacji systemu Windows. TempTaskNotificationEvent = Folder plików tymczasowych został pomyślnie wyczyszczony. -FolderTaskDescription = Czyszczenie folderu {0}. +FolderTaskDescription = Czyszczenie folderu {0}. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. EventViewerCustomViewName = Tworzenie procesu EventViewerCustomViewDescription = Tworzenie procesu i zdarzeń audytu. RestartWarning = Pamiętaj o ponownym uruchomieniu komputera. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pt-BR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pt-BR/Sophia.psd1 index 787021308..d3b622b2d 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pt-BR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pt-BR/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Tarefas agendadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalar o OneDrive... OneDriveDownloading = Baixando OneDrive... -OneDriveWarning = A função "{0}" será aplicada somente se a predefinição for configurada para remover o OneDrive (ou a aplicação já foi removida), caso contrário a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive quebra. +OneDriveWarning = A função "WinPrtScrFolder -Desktop" será aplicada somente se o usuário tiver configurado o script para remover o OneDrive (ou se o OneDrive já tiver sido removido).\nCaso contrário, a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive será interrompida. WindowsFeaturesTitle = Recursos do Windows OptionalFeaturesTitle = Recursos opcionais EnableHardwareVT = Habilitar virtualização em UEFI. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Gostaria de definir a configuração ScheduledTaskPresented = A função "{0}" já foi criada como "{1}". CleanupTaskNotificationTitle = Limpeza do Windows CleanupTaskNotificationEvent = Executar tarefa para limpar arquivos e atualizações não utilizados do Windows? -CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. -CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. +CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. +CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. SoftwareDistributionTaskNotificationEvent = O cache de atualização do Windows excluído com sucesso. TempTaskNotificationEvent = Os arquivos da pasta Temp limpos com sucesso. -FolderTaskDescription = A limpeza da pasta "{0}". +FolderTaskDescription = A limpeza da pasta "{0}". A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. EventViewerCustomViewName = Criação de processo EventViewerCustomViewDescription = Criação de processos e eventos de auditoria de linha de comando. RestartWarning = Certifique-se de reiniciar o PC. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/ru-RU/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/ru-RU/Sophia.psd1 index 8b22dbb16..c0e1c12b2 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/ru-RU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/ru-RU/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Запланированные за OneDriveUninstalling = Удаление OneDrive... OneDriveInstalling = OneDrive устанавливается... OneDriveDownloading = Скачивается OneDrive... -OneDriveWarning = Функция "{0}" будет применена только в случае, если в пресете настроено удаление OneDrive (или приложение уже удалено), иначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. +OneDriveWarning = Функция "WinPrtScrFolder -Desktop" будет применена только в случае, если пользователь настроил удаление OneDrive (или приложение уже удалено).\nИначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. WindowsFeaturesTitle = Компоненты Windows OptionalFeaturesTitle = Дополнительные компоненты EnableHardwareVT = Включите виртуализацию в UEFI. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Установить для любо ScheduledTaskPresented = Функция "{0}" уже была создана от имени "{1}". CleanupTaskNotificationTitle = Очистка Windows CleanupTaskNotificationEvent = Запустить задание по очистке неиспользуемых файлов и обновлений Windows? -CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. -CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. +CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. Задание может быть запущено, только если пользователь {0} вошел в систему. +CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. Задание может быть запущено, только если пользователь {0} вошел в систему. SoftwareDistributionTaskNotificationEvent = Кэш обновлений Windows успешно удален. TempTaskNotificationEvent = Папка временных файлов успешно очищена. -FolderTaskDescription = Очистка папки {0}. +FolderTaskDescription = Очистка папки {0}. Задание может быть запущено, только если пользователь "{1}" вошел в систему. EventViewerCustomViewName = Создание процесса EventViewerCustomViewDescription = События создания нового процесса и аудит командной строки. RestartWarning = Обязательно перезагрузите ваш ПК. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/tr-TR/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/tr-TR/Sophia.psd1 index 943133934..deeb1eef2 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/tr-TR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/tr-TR/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Zamanlanan görevler OneDriveUninstalling = OneDrive kaldırılıyor... OneDriveInstalling = OneDrive kuruluyor... OneDriveDownloading = OneDrive indiriliyor... -OneDriveWarning = "{0}" işlevi yalnızca ön ayar OneDrive'ı kaldıracak şekilde yapılandırılırsa uygulanır (veya uygulama zaten kaldırılmışsa), aksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. +OneDriveWarning = "WinPrtScrFolder -Desktop" işlevi yalnızca kullanıcı OneDrive'ı kaldırmak için komut dosyası yapılandırmışsa (veya OneDrive zaten kaldırılmışsa) uygulanır.\nAksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. WindowsFeaturesTitle = Características do Windows OptionalFeaturesTitle = Opsiyonel özellikler EnableHardwareVT = UEFI'dan sanallaştırmayı aktifleştirin. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Seçtiğiniz bir uygulamanın grafik ScheduledTaskPresented = "{0}" işlevi zaten "{1}" olarak oluşturulmuştu. CleanupTaskNotificationTitle = Windows temizliği CleanupTaskNotificationEvent = Windows kullanılmayan dosyaları ve güncellemeleri temizlemek için görev çalıştırılsın mı? -CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. -CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. +CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. +CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. SoftwareDistributionTaskNotificationEvent = Windows güncelleme önbelleği başarıyla silindi. TempTaskNotificationEvent = Geçici dosyalar klasörü başarıyla temizlendi. -FolderTaskDescription = "{0}" klasörü temizleniyor. +FolderTaskDescription = "{0}" klasörü temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. EventViewerCustomViewName = Süreç Oluşturma EventViewerCustomViewDescription = Süreç oluşturma ve komut satırı denetleme olayları. RestartWarning = Bilgisayarınızı yeniden başlattığınızdan emin olun. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/uk-UA/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/uk-UA/Sophia.psd1 index 18846d5b8..c8630d09b 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/uk-UA/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/uk-UA/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = Заплановані задачі OneDriveUninstalling = Видалення OneDrive... OneDriveInstalling = OneDrive встановлюється... OneDriveDownloading = Завантажується OneDrive... -OneDriveWarning = Функція "{0}" буде застосована тільки в разі, якщо в пресеті налаштовано видалення OneDrive (або застосунок вже видалено), інакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. +OneDriveWarning = Функція "WinPrtScrFolder -Desktop" буде застосована тільки в разі, якщо користувач налаштував видалення OneDrive (або застосунок уже видалено).\nІнакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. WindowsFeaturesTitle = Компоненти Windows OptionalFeaturesTitle = Додаткові компоненти EnableHardwareVT = Увімкніть віртуалізацію в UEFI. @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = Встановити для будь ScheduledTaskPresented = Функцію "{0}" уже було створено від імені "{1}". CleanupTaskNotificationTitle = Очищення Windows CleanupTaskNotificationEvent = Запустити завдання з очищення невикористовуваних файлів і оновлень Windows? -CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. -CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. +CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. +CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. SoftwareDistributionTaskNotificationEvent = Кеш оновлень Windows успішно видалено. TempTaskNotificationEvent = Папка тимчасових файлів успішно очищена. -FolderTaskDescription = Очищення папки "{0}". +FolderTaskDescription = Очищення папки "{0}". Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. EventViewerCustomViewName = Створення процесу EventViewerCustomViewDescription = Події створення нового процесу і аудит командного рядка. RestartWarning = Обов'язково перезавантажте ваш ПК. diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/zh-CN/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/zh-CN/Sophia.psd1 index 78c768bc0..d3ae42488 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/zh-CN/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/zh-CN/Sophia.psd1 @@ -22,7 +22,7 @@ ScheduledTasks = 计划任务 OneDriveUninstalling = 卸载OneDrive..... OneDriveInstalling = OneDrive正在安装..... OneDriveDownloading = 正在下载OneDrive..... -OneDriveWarning = 只有当预设被配置为删除OneDrive(或应用程序已经被删除)时,才会应用"{0}"功能,否则OneDrive中 "桌面 "和 "图片 "文件夹的备份功能就会中断。 +OneDriveWarning = "WinPrtScrFolder -Desktop" 功能僅在使用者設定腳本移除 OneDrive (或 OneDrive 已移除) 後才會套用\n否則 OneDrive 中「桌面」和「圖片」資料夾的備份功能會中斷。 WindowsFeaturesTitle = Windows功能 OptionalFeaturesTitle = 可选功能 EnableHardwareVT = UEFI中开启虚拟化。 @@ -41,11 +41,11 @@ GraphicsPerformanceTitle = 是否将所选应用程序的图形 ScheduledTaskPresented = "{0}"函数已经被创建为"{1}"。 CleanupTaskNotificationTitle = Windows清理 CleanupTaskNotificationEvent = 运行任务以清理Windows未使用的文件和更新? -CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。 -CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。 +CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。只有登入使用者"{0}"才能啟動任務。 +CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。只有登入使用者"{0}"才能啟動任務。 SoftwareDistributionTaskNotificationEvent = Windows更新缓存已成功删除。 TempTaskNotificationEvent = 临时文件文件夹已成功清理。 -FolderTaskDescription = "{0}"文件夹清理。 +FolderTaskDescription = "{0}"文件夹清理。只有登入使用者"{0}"才能啟動任務。 EventViewerCustomViewName = 进程创建 EventViewerCustomViewDescription = 进程创建和命令行审核事件。 RestartWarning = 确保重启电脑。 diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 index 5ad547d17..dfea29e6b 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 @@ -1720,7 +1720,7 @@ function ScheduledTasks Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -4902,7 +4902,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4993,7 +4992,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -5210,6 +5208,10 @@ function OneDrive $AllUsers ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\Policies\Microsoft\Windows\OneDrive -Name DisableFileSyncNGSC -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\OneDrive -Name DisableFileSyncNGSC -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Uninstall" @@ -5433,7 +5435,6 @@ public static bool MarkFileDelete (string sourcefile) { Write-Warning -Message ($Localization.NoResponse -f "https://oneclient.sfx.ms") Write-Error -Message ($Localization.NoResponse -f "https://oneclient.sfx.ms") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -5489,6 +5490,10 @@ function StorageSense $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Type CLEAR + if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy)) { New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -ItemType Directory -Force @@ -5502,7 +5507,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force # Turn on automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 1 -Force # Run Storage Sense every month New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 30 -Force @@ -5513,7 +5518,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force # Turn off automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 0 -Force # Run Storage Sense during low free disk space New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 0 -Force @@ -5766,6 +5771,10 @@ function DeliveryOptimization $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5818,6 +5827,8 @@ function WindowsManageDefaultPrinter $Enable ) + Set-Policy -Scope User -Path "Software\Microsoft\Windows NT\CurrentVersion\Windows" -Name LegacyDefaultPrinterMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -6111,7 +6122,7 @@ function WindowsFeatures Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -6370,7 +6381,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -6431,7 +6441,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -6474,7 +6483,7 @@ function WindowsCapabilities Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -6539,6 +6548,10 @@ function UpdateMicrosoftProducts $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -6596,6 +6609,10 @@ function PowerPlan $Balanced ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "High" @@ -7769,66 +7786,77 @@ function WinPrtScrFolder $Default ) - # Checking whether user is logged into OneDrive (Microsoft account) - $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore - if ($UserEmail) - { - Write-Information -MessageData "" -InformationAction Continue - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose - Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - return - } - switch ($PSCmdlet.ParameterSetName) { "Desktop" { - # Check how the script was invoked: via a preset or Function.ps1 - # $_.File has no EndsWith() method - $PresetName = ((Get-PSCallStack).Position | Where-Object -FilterScript {($_.Text -eq "WinPrtScrFolder -Desktop") -or ($_.Text -match "Invoke-Expression")}).File | Where-Object -FilterScript {$_.EndsWith(".ps1") -and ($_ -notmatch "Functions.ps1")} - if ($PresetName) + # Checking whether user is logged into OneDrive (Microsoft account) + $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore + if ($UserEmail) { - # Checking whether a preset contains the "OneDrive -Uninstall" string uncommented out - if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) - { - # The string exists and is commented - $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false - } - else - { - # The string doesn't exist - $IsOneDriveToUninstall = $false - } + Write-Information -MessageData "" -InformationAction Continue + Write-Warning -Message $Localization.OneDriveWarning + Write-Error -Message $Localization.OneDriveWarning -ErrorAction SilentlyContinue - $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore - if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + return + } + + # Checking how the script was invoked: via a preset or Functions.ps1 + # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-variable + # This function works only if OneDrive was already uninstalled, or user is intended to uninstall "OneDrive -Uninstall" within commandline + $PresetName = (Get-Variable -Name MyInvocation -Scope Script).Value.PSCommandPath + $PSCallStack = (Get-PSCallStack).Position.Text + $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore + + # Checking whether function was called from Functions.ps1 + if ($PresetName -match "Functions.ps1") + { + # Checking whether command contains "WinPrtScrFolder -Desktop" + if ($PSCallStack -match "WinPrtScrFolder -Desktop") { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether other commands contains "OneDrive -Uninstall" which means that user is intended to uninstall "OneDrive -Uninstall", or OneDrive was uinstalled + if (($PSCallStack -match "OneDrive -Uninstall") -or (-not $OneDriveInstalled)) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } else { - # A preset file isn't taking a part so we ignore it and check only whether OneDrive was already uninstalled - if (-not (Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + # Checking whether function was called from Sophia.ps1, and preset contains the "OneDrive -Uninstall" string is uncommented that means OneDrive will be unistalled + if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether string exists and is uncommented + $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false + # Checking whether string exists and is uncommented, or OneDrive was uninstalled, or user called "OneDrive -Uninstall" from Sophia.ps1 alongside with "WinPrtScrFolder -Desktop" + if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled) -or ($PSCallStack -match "OneDrive -Uninstall")) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } } @@ -7880,6 +7908,19 @@ function RecommendedTroubleshooting $Default ) + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -Force -ErrorAction Ignore + + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR + + # Turn on Windows Error Reporting + Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore + + Get-Service -Name WerSvc | Set-Service -StartupType Manual + Get-Service -Name WerSvc | Start-Service + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -7889,24 +7930,6 @@ function RecommendedTroubleshooting New-Item -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Force } New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Name UserPreference -PropertyType DWord -Value 3 -Force - - # Set Windows level of diagnostic data gathering to "Optional diagnostic data" - if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack)) - { - New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Force - } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force - - Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWORD -Value 3 - - # Turn on Windows Error Reporting - Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore - - Get-Service -Name WerSvc | Set-Service -StartupType Manual - Get-Service -Name WerSvc | Start-Service } "Default" { @@ -8018,6 +8041,7 @@ function ReservedStorage } catch [System.Runtime.InteropServices.COMException] { + Write-Warning -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) Write-Error -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -8172,6 +8196,8 @@ function CapsLock $Enable ) + Remove-ItemProperty -Path HKCU:\Keyboard Layout -Name Attributes -Force -ErrorAction Ignore + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -8274,6 +8300,11 @@ function Autoplay $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer, HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + Set-Policy -Scope User -Path Software\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -8490,6 +8521,10 @@ function RestartNotification $Hide ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Show" @@ -8541,6 +8576,12 @@ function RestartDeviceAfterUpdate $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -8592,6 +8633,16 @@ function ActiveHours $Manually ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers, AlwaysAutoRebootAtScheduledTime -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AlwaysAutoRebootAtScheduledTime -Type CLEAR + + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -8643,6 +8694,11 @@ function WindowsLatestUpdate $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent, SetAllowOptionalContent -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAllowOptionalContent -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -9579,7 +9635,7 @@ public static void Refresh() Associations will be exported as Application_Associations.json file in script root folder .NOTES - Import exported JSON file after a clean installation. You have to install all apps according to an exported JSON file to restore all associations + You need to install all apps according to an exported JSON file to restore all associations .NOTES Machine-wide @@ -9757,11 +9813,8 @@ function Export-Associations .SYNOPSIS Import all Windows associations - .PARAMETER Path - Import all Windows associations from a JSON file - .EXAMPLE - Export-Associations -Path D:\ + Import-Associations .NOTES You have to install all apps according to an exported JSON file to restore all associations @@ -10008,10 +10061,10 @@ function InstallVCRedist <# .SYNOPSIS - Install the latest .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 .EXAMPLE - InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 + InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 .LINK https://dotnet.microsoft.com/en-us/download/dotnet @@ -10028,7 +10081,7 @@ function InstallDotNetRuntimes Mandatory = $true, ParameterSetName = "Runtimes" )] - [ValidateSet("NET6x64", "NET8x64")] + [ValidateSet("NET8x64", "NET9x64")] [string[]] $Runtimes ) @@ -10039,18 +10092,18 @@ function InstallDotNetRuntimes { switch ($Runtime) { - NET6x64 + NET8x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET6Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -10061,27 +10114,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 6 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 8 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET6Version has only three, unless the [System.Version] accelerator fails - $dotnet6Version = (Get-Item -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet6Version = "{0}.{1}.{2}" -f $dotnet6Version.Split(".") + # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails + $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") } else { - $dotnet6Version = "0.0" + $dotnet8Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 6 is not installed at all - if (([System.Version]$NET6Version -gt [System.Version]$dotnet6Version) -or ($dotnet6Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all + if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) { try { - # Downloading .NET Desktop Runtime 6 x64 + # .NET Desktop Runtime 8 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET6Version/dotnet-runtime-$NET6Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -10097,15 +10150,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET6Version" -Verbose + Write-Verbose -Message ".NET $NET8Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -10117,18 +10170,18 @@ function InstallDotNetRuntimes Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } - NET8x64 + NET9x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/9.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET9Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -10139,27 +10192,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 8 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 9 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails - $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") + # FileVersion has four properties while $NET9Version has only three, unless the [System.Version] accelerator fails + $dotnet9Version = (Get-Item -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet9Version = "{0}.{1}.{2}" -f $dotnet9Version.Split(".") } else { - $dotnet8Version = "0.0" + $dotnet9Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all - if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 9 is not installed at all + if (([System.Version]$NET9Version -gt [System.Version]$dotnet9Version) -or ($dotnet9Version -eq "0.0")) { try { - # .NET Desktop Runtime 8 x64 + # Downloading .NET Desktop Runtime 9 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET9Version/dotnet-runtime-$NET9Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -10175,18 +10228,18 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET8Version" -Verbose + Write-Verbose -Message ".NET $NET9Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) - Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore + Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore } else { @@ -10389,57 +10442,6 @@ function PreventEdgeShortcutCreation } } -<# - .SYNOPSIS - Internal SATA drives up as removeable media in the taskbar notification area - - .PARAMETER Disable - Prevent all internal SATA drives from showing up as removable media in the taskbar notification area - - .PARAMETER Default - Show up all internal SATA drives as removeable media in the taskbar notification area - - .EXAMPLE - SATADrivesRemovableMedia -Disable - - .EXAMPLE - SATADrivesRemovableMedia -Default - - .NOTES - Machine-wide -#> -function SATADrivesRemovableMedia -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Default" - )] - [switch] - $Default - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Type MultiString -Value @(0, 1, 2, 3, 4, 5) -Force - } - "Default" - { - Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Force -ErrorAction Ignore - } - } -} - <# .SYNOPSIS Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups @@ -10531,7 +10533,6 @@ function Install-WSL { Write-Warning -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") Write-Error -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -10640,7 +10641,7 @@ function Install-WSL Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -11521,7 +11522,7 @@ function UninstallUWPApps Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 10")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 10"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -11672,7 +11673,6 @@ function HEVC { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -11689,7 +11689,6 @@ function HEVC { Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net/api/GetFiles") Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net/api/GetFiles") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -12305,7 +12304,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro TaskPath = "Sophia" Principal = $Principal Action = $Action - Description = $Localization.CleanupTaskDescription + Description = $Localization.CleanupTaskDescription -f $env:USERNAME Settings = $Settings } Register-ScheduledTask @Parameters -Force @@ -12465,7 +12464,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription + Description = $Localization.CleanupNotificationTaskDescription -f $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -12483,7 +12482,8 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro $Paths = @( "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.vbs", "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.ps1", - "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1" + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1", + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.vbs" ) Remove-Item -Path $Paths -Force -ErrorAction Ignore @@ -12794,7 +12794,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -13059,6 +13059,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_ `$Paths = @( # Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent (-join ("`$env:SystemDrive\", '`$WinREAgent')), + (-join ("`$env:SystemDrive\", '`$SysReset')), + (-join ("`$env:SystemDrive\", '`$Windows.~WS')), + "`$env:SystemDrive\ESD", "`$env:SystemDrive\Intel", "`$env:SystemDrive\PerfLogs" ) @@ -13123,7 +13126,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" + Description = $Localization.FolderTaskDescription -f "%TEMP%", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -14656,7 +14659,6 @@ function BitmapImageNewContext { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -14735,7 +14737,6 @@ function RichTextDocumentNewContext { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 index cf4c7e6a2..dbea71337 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 @@ -997,12 +997,12 @@ UninstallPCHealthCheck InstallVCRedist <# - Install the latest .NET Desktop Runtime 6, 8 x64 - Установить последнюю версию .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 + Установить последнюю версию .NET Desktop Runtime 8, 9 x64 https://dotnet.microsoft.com/en-us/download/dotnet #> -InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 +InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 # Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only # Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России @@ -1022,14 +1022,6 @@ PreventEdgeShortcutCreation -Channels Stable, Beta, Dev, Canary # Не предотвращать создание ярлыков на рабочем столе при обновлении Microsoft Edge (значение по умолчанию) # PreventEdgeShortcutCreation -Disable -# Prevent all internal SATA drives from showing up as removable media in the taskbar notification area -# Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач -SATADrivesRemovableMedia -Disable - -# Show up all internal SATA drives as removeable media in the taskbar notification area (default value) -# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию) -# SATADrivesRemovableMedia -Default - # Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups # Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями # RegistryBackup -Enable diff --git a/src/Sophia_Script_for_Windows_11/Localizations/de-DE/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/de-DE/Sophia.psd1 index 89c98c94c..555f8f6d2 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/de-DE/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/de-DE/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Geplante Aufgaben OneDriveUninstalling = OneDrive deinstallieren... OneDriveInstalling = OneDrive installieren... OneDriveDownloading = OneDrive herunterladen... -OneDriveWarning = Die "{0}"-Funktion wird nur angewendet, wenn die Voreinstellung so konfiguriert ist, dass OneDrive entfernt wird (oder die App bereits entfernt wurde), andernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. +OneDriveWarning = Die Funktion "WinPrtScrFolder -Desktop" wird nur angewendet, wenn der Benutzer das Skript zum Entfernen von OneDrive konfiguriert hat (oder OneDrive bereits entfernt wurde).\nAndernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. WindowsFeaturesTitle = Windows-Features OptionalFeaturesTitle = Optionale Features EnableHardwareVT = Virtualisierung in UEFI aktivieren. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Möchten Sie die Einstellung der Gra ScheduledTaskPresented = Die Funktion "{0}" wurde bereits als "{1}" angelegt. CleanupTaskNotificationTitle = Windows aufräumen CleanupTaskNotificationEvent = Aufgabe zum Bereinigen nicht verwendeter Windows-Dateien und -Updates ausführen? -CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. -CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. +CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. +CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. SoftwareDistributionTaskNotificationEvent = Der Windows Update-Cache wurde erfolgreich gelöscht. TempTaskNotificationEvent = Der Ordner mit den temporären Dateien wurde erfolgreich bereinigt. -FolderTaskDescription = Ordner "{0}" bereinigen. +FolderTaskDescription = Ordner "{0}" bereinigen. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{1}" im System angemeldet ist. EventViewerCustomViewName = Prozesserstellung EventViewerCustomViewDescription = Prozesserstellungen und Befehlszeilen-Auditing-Ereignisse. RestartWarning = Sicherstellen, dass Sie Ihren PC neu starten. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 index 6962f4c98..63f2117bd 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Scheduled tasks OneDriveUninstalling = Uninstalling OneDrive... OneDriveInstalling = Installing OneDrive... OneDriveDownloading = Downloading OneDrive... -OneDriveWarning = The "{0}" function will be applied only if the preset is configured to remove OneDrive (or the app was already removed), otherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. +OneDriveWarning = "WinPrtScrFolder -Desktop" function will be applied only if user configured script to remove OneDrive (or OneDrive was already removed).\nOtherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. WindowsFeaturesTitle = Windows features OptionalFeaturesTitle = Optional features EnableHardwareVT = Enable Virtualization in UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Would you like to set the graphics p ScheduledTaskPresented = The "{0}" function was already created as "{1}". CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? -CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. -CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. +CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. Scheduled task can be run only if user "{0}" logged into the system. +CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. Scheduled task can be run only if user "{0}" logged into the system. SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted. TempTaskNotificationEvent = Temporary files folder successfully cleaned up. -FolderTaskDescription = The {0} folder cleanup. +FolderTaskDescription = The {0} folder cleanup. Scheduled task can be run only if user "{0}" logged into the system. EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events. RestartWarning = Make sure to restart your PC. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/es-ES/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/es-ES/Sophia.psd1 index b7436a253..6e2c59253 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/es-ES/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/es-ES/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Tareas programadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalación de OneDrive... OneDriveDownloading = Descargando OneDrive... -OneDriveWarning = La función "{0}" se aplicará sólo si el preajuste está configurado para eliminar OneDrive (o la aplicación ya fue eliminada), de lo contrario la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. +OneDriveWarning = La función "WinPrtScrFolder -Desktop" se aplicará sólo si el usuario configuró el script para eliminar OneDrive (o OneDrive ya fue eliminado).\nDe lo contrario, la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. WindowsFeaturesTitle = Características de Windows OptionalFeaturesTitle = Características opcionales EnableHardwareVT = Habilitar la virtualización en UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = ¿Le gustaría establecer la configu ScheduledTaskPresented = La función "{0}" ya fue creada como "{1}". CleanupTaskNotificationTitle = Limpieza de Windows CleanupTaskNotificationEvent = ¿Ejecutar la tarea de limpiar los archivos no utilizados y actualizaciones de Windows? -CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. -CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. +CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. +CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. SoftwareDistributionTaskNotificationEvent = La caché de actualización de Windows eliminado correctamente. TempTaskNotificationEvent = Los archivos de la carpeta Temp limpiados con éxito. -FolderTaskDescription = La limpieza de la carpeta "{0}". +FolderTaskDescription = La limpieza de la carpeta "{0}". La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. EventViewerCustomViewName = Creación de proceso EventViewerCustomViewDescription = Eventos de auditoría de línea de comandos y creación de procesos. RestartWarning = Asegúrese de reiniciar su PC. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/fr-FR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/fr-FR/Sophia.psd1 index ad603d34f..5e2cf7a42 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/fr-FR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/fr-FR/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Tâches planifiées OneDriveUninstalling = Désinstalltion de OneDrive... OneDriveInstalling = Installation de OneDrive... OneDriveDownloading = Téléchargement de OneDrive... -OneDriveWarning = La fonction "{0}" sera appliquée uniquement si le préréglage est configuré pour supprimer OneDrive (ou si l'application a déjà été supprimée), sinon la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive s'interrompt. +OneDriveWarning = La fonction "WinPrtScrFolder -Desktop" ne sera appliquée que si l'utilisateur a configuré le script pour supprimer OneDrive (ou si OneDrive a déjà été supprimé).\nDans le cas contraire, la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive est interrompue. WindowsFeaturesTitle = Fonctionnalités OptionalFeaturesTitle = Fonctionnalités optionnelles EnableHardwareVT = Activer la virtualisation dans UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Souhaitez-vous définir le paramètr ScheduledTaskPresented = La fonction "{0}" a déjà été créée en tant que "{1}". CleanupTaskNotificationTitle = Nettoyer Windows CleanupTaskNotificationEvent = Exécuter la tâche pour nettoyer les fichiers et les mises à jour inutilisés de Windows? -CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. -CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. +CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. +CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. SoftwareDistributionTaskNotificationEvent = Le cache de mise à jour Windows a bien été supprimé. TempTaskNotificationEvent = Le dossier des fichiers temporaires a été nettoyé avec succès. -FolderTaskDescription = Nettoyage du dossier "{0}". +FolderTaskDescription = Nettoyage du dossier "{0}". La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. EventViewerCustomViewName = Création du processus EventViewerCustomViewDescription = Audit des événements de création du processus et de ligne de commande. RestartWarning = Assurez-vous de redémarrer votre PC. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/hu-HU/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/hu-HU/Sophia.psd1 index bfd0bdadc..6a8af6417 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/hu-HU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/hu-HU/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Ütemezett feladatok OneDriveUninstalling = OneDrive eltávolítása... OneDriveInstalling = OneDrive telepítése... OneDriveDownloading = OneDrive letöltése... -OneDriveWarning = A "{0}" funkció csak akkor kerül alkalmazásra, ha az előbeállítás a OneDrive eltávolítására van beállítva (vagy az alkalmazás már eltávolításra került), különben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. +OneDriveWarning = A "WinPrtScrFolder -Desktop" funkció csak akkor kerül alkalmazásra, ha a felhasználó a OneDrive eltávolítására konfigurálta a szkriptet (vagy a OneDrive már eltávolításra került).\nEllenkező esetben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. WindowsFeaturesTitle = Windows szolgáltatások OptionalFeaturesTitle = Opcionális szolgáltatások EnableHardwareVT = Virtualizáció engedélyezése UEFI-ben. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Szeretné megváltoztatni a grafikus ScheduledTaskPresented = A "{0}" funkciót már létrehoztuk "{1}" néven. CleanupTaskNotificationTitle = Windows tisztítása CleanupTaskNotificationEvent = Szeretné a nem használt fájlokat es frissitéseket eltávolítani? -CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. -CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. +CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. +CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. SoftwareDistributionTaskNotificationEvent = A Windows frissités számára fenntartott ideiglenes tárhely sikeresen megtisztítva. TempTaskNotificationEvent = Az ideiglenes fájlok tárolására szolgáló könyvtár tisztítása sikeresen megtörtént. -FolderTaskDescription = A {0} könyvtár tisztítása. +FolderTaskDescription = A {0} könyvtár tisztítása. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. EventViewerCustomViewName = Folyamatok EventViewerCustomViewDescription = Folyamatok létrehozása és parancssor ellenőrző események. RestartWarning = Kérem ne felejtse el újraindítani a számítógépét. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/it-IT/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/it-IT/Sophia.psd1 index 7227e7951..6cbb1cce0 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/it-IT/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/it-IT/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Attività pianificate OneDriveUninstalling = Disinstallazione di OneDrive... OneDriveInstalling = Installazione di OneDrive... OneDriveDownloading = Download di OneDrive... -OneDriveWarning = La funzione "{0}" sarà applicata solo se il preset è configurato per rimuovere OneDrive (o se l'app è già stata rimossa), altrimenti la funzionalità di backup per le cartelle "Desktop" e "Pictures" in OneDrive si interromperà. +OneDriveWarning = La funzione "WinPrtScrFolder -Desktop" verrà applicata solo se l'utente ha configurato lo script per rimuovere OneDrive (o se OneDrive è già stato rimosso).\nIn caso contrario, la funzionalità di backup per le cartelle "Desktop" e "Immagini" di OneDrive si interrompe. WindowsFeaturesTitle = Funzionalità di Windows OptionalFeaturesTitle = Caratteristiche opzionali EnableHardwareVT = Abilita virtualizzazione in UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Volete impostare l'impostazione dell ScheduledTaskPresented = La funzione "{0}" è già stata creata come "{1}". CleanupTaskNotificationTitle = Pulizia di Windows CleanupTaskNotificationEvent = Eseguire l'operazione di pulizia dei file inutilizzati e aggiornamenti di Windows? -CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". -CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. +CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. +CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. SoftwareDistributionTaskNotificationEvent = La cache degli aggiornamenti di Windows cancellata con successo. TempTaskNotificationEvent = I file cartella Temp puliti con successo. -FolderTaskDescription = Pulizia della cartella "{0}". +FolderTaskDescription = Pulizia della cartella "{0}". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. EventViewerCustomViewName = Creazione del processo EventViewerCustomViewDescription = Creazione del processi e degli eventi di controllo della riga di comando. RestartWarning = Assicurarsi di riavviare il PC. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/pl-PL/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/pl-PL/Sophia.psd1 index a79b3cca7..0c7bf5ed1 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/pl-PL/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/pl-PL/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Zaplanowane zadania OneDriveUninstalling = Odinstalowywanie OneDrive... OneDriveInstalling = Instalowanie OneDrive... OneDriveDownloading = Pobieranie OneDrive... -OneDriveWarning = Funkcja "{0}" zostanie zastosowana tylko wtedy, gdy ustawienie wstępne są skonfigurowane do usunięcia OneDrive (lub aplikacja została już usunięta), w przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Obrazy" w usłudze OneDrive ulegnie awarii. +OneDriveWarning = Funkcja "WinPrtScrFolder -Desktop" zostanie zastosowana tylko wtedy, gdy użytkownik skonfigurował skrypt do usuwania OneDrive (lub OneDrive został już usunięty).\nW przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Zdjęcia" w OneDrive zostanie przerwana. WindowsFeaturesTitle = Funkcje Windows OptionalFeaturesTitle = Funkcje opcjonalne EnableHardwareVT = Włącz wirtualizację w UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Czy chcesz ustawić wydajność graf ScheduledTaskPresented = Funkcja "{0}" została już utworzona jako "{1}". CleanupTaskNotificationTitle = Oczyszczanie system Windows CleanupTaskNotificationEvent = Uruchomić zadanie w celu usunięcia nieużywanych plików i aktualizacji systemu Windows? -CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. -CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. +CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. +CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. SoftwareDistributionTaskNotificationEvent = Pomyślnie usunięto pamięć podręczną aktualizacji systemu Windows. TempTaskNotificationEvent = Folder plików tymczasowych został pomyślnie wyczyszczony. -FolderTaskDescription = Czyszczenie folderu {0}. +FolderTaskDescription = Czyszczenie folderu {0}. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. EventViewerCustomViewName = Tworzenie procesu EventViewerCustomViewDescription = Tworzenie procesu i zdarzeń audytu. RestartWarning = Pamiętaj o ponownym uruchomieniu komputera. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/pt-BR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/pt-BR/Sophia.psd1 index 4fd0bc62a..f41689aa5 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/pt-BR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/pt-BR/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Tarefas agendadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalar o OneDrive... OneDriveDownloading = Baixando OneDrive... -OneDriveWarning = A função "{0}" será aplicada somente se a predefinição for configurada para remover o OneDrive (ou a aplicação já foi removida), caso contrário a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive quebra. +OneDriveWarning = A função "WinPrtScrFolder -Desktop" será aplicada somente se o usuário tiver configurado o script para remover o OneDrive (ou se o OneDrive já tiver sido removido).\nCaso contrário, a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive será interrompida. WindowsFeaturesTitle = Recursos do Windows OptionalFeaturesTitle = Recursos opcionais EnableHardwareVT = Habilitar virtualização em UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Gostaria de definir a configuração ScheduledTaskPresented = A função "{0}" já foi criada como "{1}". CleanupTaskNotificationTitle = Limpeza do Windows CleanupTaskNotificationEvent = Executar tarefa para limpar arquivos e atualizações não utilizados do Windows? -CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. -CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. +CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. +CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. SoftwareDistributionTaskNotificationEvent = O cache de atualização do Windows excluído com sucesso. TempTaskNotificationEvent = Os arquivos da pasta Temp limpos com sucesso. -FolderTaskDescription = A limpeza da pasta "{0}". +FolderTaskDescription = A limpeza da pasta "{0}". A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. EventViewerCustomViewName = Criação de processo EventViewerCustomViewDescription = Criação de processos e eventos de auditoria de linha de comando. RestartWarning = Certifique-se de reiniciar o PC. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/ru-RU/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/ru-RU/Sophia.psd1 index 9261fbd3d..df8f8857f 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/ru-RU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/ru-RU/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Запланированные за OneDriveUninstalling = Удаление OneDrive... OneDriveInstalling = OneDrive устанавливается... OneDriveDownloading = Скачивается OneDrive... -OneDriveWarning = Функция "{0}" будет применена только в случае, если в пресете настроено удаление OneDrive (или приложение уже удалено), иначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. +OneDriveWarning = Функция "WinPrtScrFolder -Desktop" будет применена только в случае, если пользователь настроил удаление OneDrive (или приложение уже удалено).\nИначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. WindowsFeaturesTitle = Компоненты Windows OptionalFeaturesTitle = Дополнительные компоненты EnableHardwareVT = Включите виртуализацию в UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Установить для любо ScheduledTaskPresented = Функция "{0}" уже была создана от имени "{1}". CleanupTaskNotificationTitle = Очистка Windows CleanupTaskNotificationEvent = Запустить задание по очистке неиспользуемых файлов и обновлений Windows? -CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. -CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. +CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. Задание может быть запущено, только если пользователь {0} вошел в систему. +CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. Задание может быть запущено, только если пользователь {0} вошел в систему. SoftwareDistributionTaskNotificationEvent = Кэш обновлений Windows успешно удален. TempTaskNotificationEvent = Папка временных файлов успешно очищена. -FolderTaskDescription = Очистка папки {0}. +FolderTaskDescription = Очистка папки {0}. Задание может быть запущено, только если пользователь "{1}" вошел в систему. EventViewerCustomViewName = Создание процесса EventViewerCustomViewDescription = События создания нового процесса и аудит командной строки. RestartWarning = Обязательно перезагрузите ваш ПК. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/tr-TR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/tr-TR/Sophia.psd1 index e4f452eab..70dd3f203 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/tr-TR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/tr-TR/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Zamanlanan görevler OneDriveUninstalling = OneDrive kaldırılıyor... OneDriveInstalling = OneDrive kuruluyor... OneDriveDownloading = OneDrive indiriliyor... -OneDriveWarning = "{0}" işlevi yalnızca ön ayar OneDrive'ı kaldıracak şekilde yapılandırılırsa uygulanır (veya uygulama zaten kaldırılmışsa), aksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. +OneDriveWarning = "WinPrtScrFolder -Desktop" işlevi yalnızca kullanıcı OneDrive'ı kaldırmak için komut dosyası yapılandırmışsa (veya OneDrive zaten kaldırılmışsa) uygulanır.\nAksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. WindowsFeaturesTitle = Características do Windows OptionalFeaturesTitle = Opsiyonel özellikler EnableHardwareVT = UEFI'dan sanallaştırmayı aktifleştirin. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Seçtiğiniz bir uygulamanın grafik ScheduledTaskPresented = "{0}" işlevi zaten "{1}" olarak oluşturulmuştu. CleanupTaskNotificationTitle = Windows temizliği CleanupTaskNotificationEvent = Windows kullanılmayan dosyaları ve güncellemeleri temizlemek için görev çalıştırılsın mı? -CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. -CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. +CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. +CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. SoftwareDistributionTaskNotificationEvent = Windows güncelleme önbelleği başarıyla silindi. TempTaskNotificationEvent = Geçici dosyalar klasörü başarıyla temizlendi. -FolderTaskDescription = "{0}" klasörü temizleniyor. +FolderTaskDescription = "{0}" klasörü temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. EventViewerCustomViewName = Süreç Oluşturma EventViewerCustomViewDescription = Süreç oluşturma ve komut satırı denetleme olayları. RestartWarning = Bilgisayarınızı yeniden başlattığınızdan emin olun. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/uk-UA/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/uk-UA/Sophia.psd1 index f402306e2..bc8813aeb 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/uk-UA/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/uk-UA/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Заплановані задачі OneDriveUninstalling = Видалення OneDrive... OneDriveInstalling = OneDrive встановлюється... OneDriveDownloading = Завантажується OneDrive... -OneDriveWarning = Функція "{0}" буде застосована тільки в разі, якщо в пресеті налаштовано видалення OneDrive (або застосунок вже видалено), інакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. +OneDriveWarning = Функція "WinPrtScrFolder -Desktop" буде застосована тільки в разі, якщо користувач налаштував видалення OneDrive (або застосунок уже видалено).\nІнакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. WindowsFeaturesTitle = Компоненти Windows OptionalFeaturesTitle = Додаткові компоненти EnableHardwareVT = Увімкніть віртуалізацію в UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Встановити для будь ScheduledTaskPresented = Функцію "{0}" уже було створено від імені "{1}". CleanupTaskNotificationTitle = Очищення Windows CleanupTaskNotificationEvent = Запустити завдання з очищення невикористовуваних файлів і оновлень Windows? -CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. -CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. +CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. +CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. SoftwareDistributionTaskNotificationEvent = Кеш оновлень Windows успішно видалено. TempTaskNotificationEvent = Папка тимчасових файлів успішно очищена. -FolderTaskDescription = Очищення папки "{0}". +FolderTaskDescription = Очищення папки "{0}". Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. EventViewerCustomViewName = Створення процесу EventViewerCustomViewDescription = Події створення нового процесу і аудит командного рядка. RestartWarning = Обов'язково перезавантажте ваш ПК. diff --git a/src/Sophia_Script_for_Windows_11/Localizations/zh-CN/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/zh-CN/Sophia.psd1 index 234256758..4b21fcfcc 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/zh-CN/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/zh-CN/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = 计划任务 OneDriveUninstalling = 卸载OneDrive..... OneDriveInstalling = OneDrive正在安装..... OneDriveDownloading = 正在下载OneDrive..... -OneDriveWarning = 只有当预设被配置为删除OneDrive(或应用程序已经被删除)时,才会应用"{0}"功能,否则OneDrive中 "桌面 "和 "图片 "文件夹的备份功能就会中断。 +OneDriveWarning = "WinPrtScrFolder -Desktop" 功能僅在使用者設定腳本移除 OneDrive (或 OneDrive 已移除) 後才會套用\n否則 OneDrive 中「桌面」和「圖片」資料夾的備份功能會中斷。 WindowsFeaturesTitle = Windows功能 OptionalFeaturesTitle = 可选功能 EnableHardwareVT = UEFI中开启虚拟化。 @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = 是否将所选应用程序的图形 ScheduledTaskPresented = "{0}"函数已经被创建为"{1}"。 CleanupTaskNotificationTitle = Windows清理 CleanupTaskNotificationEvent = 运行任务以清理Windows未使用的文件和更新? -CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。 -CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。 +CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。只有登入使用者"{0}"才能啟動任務。 +CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。只有登入使用者"{0}"才能啟動任務。 SoftwareDistributionTaskNotificationEvent = Windows更新缓存已成功删除。 TempTaskNotificationEvent = 临时文件文件夹已成功清理。 -FolderTaskDescription = "{0}"文件夹清理。 +FolderTaskDescription = "{0}"文件夹清理。只有登入使用者"{0}"才能啟動任務。 EventViewerCustomViewName = 进程创建 EventViewerCustomViewDescription = 进程创建和命令行审核事件。 RestartWarning = 确保重启电脑。 diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index 2623b6c82..ea047f62f 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -712,7 +712,7 @@ public extern static string BrandingFormatString(string sFormat); Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements" -Verbose # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for UWP apps updates Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod @@ -762,7 +762,7 @@ public extern static string BrandingFormatString(string sFormat); Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements" -Verbose # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for UWP apps updates Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod @@ -1682,7 +1682,7 @@ function ScheduledTasks Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -4591,6 +4591,10 @@ function OneDrive $AllUsers ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\Policies\Microsoft\Windows\OneDrive -Name DisableFileSyncNGSC -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\OneDrive -Name DisableFileSyncNGSC -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Uninstall" @@ -4867,6 +4871,10 @@ function StorageSense $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Type CLEAR + if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy)) { New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -ItemType Directory -Force @@ -4880,7 +4888,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force # Turn on automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 1 -Force # Run Storage Sense every month New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 30 -Force @@ -4891,7 +4899,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force # Turn off automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 0 -Force # Run Storage Sense during low free disk space New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 0 -Force @@ -5144,6 +5152,10 @@ function DeliveryOptimization $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5196,6 +5208,8 @@ function WindowsManageDefaultPrinter $Enable ) + Set-Policy -Scope User -Path "Software\Microsoft\Windows NT\CurrentVersion\Windows" -Name LegacyDefaultPrinterMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5492,7 +5506,7 @@ function WindowsFeatures Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5847,7 +5861,7 @@ function WindowsCapabilities Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5912,18 +5926,19 @@ function UpdateMicrosoftProducts $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" { - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force } "Disable" { - 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") - } + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -Force -ErrorAction Ignore } } } @@ -5966,6 +5981,10 @@ function RestartNotification $Hide ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Show" @@ -6017,6 +6036,12 @@ function RestartDeviceAfterUpdate $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -6068,6 +6093,16 @@ function ActiveHours $Manually ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers, AlwaysAutoRebootAtScheduledTime -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AlwaysAutoRebootAtScheduledTime -Type CLEAR + + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -6119,6 +6154,11 @@ function WindowsLatestUpdate $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent, SetAllowOptionalContent -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAllowOptionalContent -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -6173,6 +6213,10 @@ function PowerPlan $Balanced ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "High" @@ -7346,66 +7390,77 @@ function WinPrtScrFolder $Default ) - # Checking whether user is logged into OneDrive (Microsoft account) - $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore - if ($UserEmail) - { - Write-Information -MessageData "" -InformationAction Continue - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose - Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - return - } - switch ($PSCmdlet.ParameterSetName) { "Desktop" { - # Check how the script was invoked: via a preset or Function.ps1 - # $_.File has no EndsWith() method - $PresetName = ((Get-PSCallStack).Position | Where-Object -FilterScript {($_.Text -eq "WinPrtScrFolder -Desktop") -or ($_.Text -match "Invoke-Expression")}).File | Where-Object -FilterScript {$_.EndsWith(".ps1") -and ($_ -notmatch "Functions.ps1")} - if ($PresetName) + # Checking whether user is logged into OneDrive (Microsoft account) + $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore + if ($UserEmail) { - # Checking whether a preset contains the "OneDrive -Uninstall" string uncommented out - if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) - { - # The string exists and is commented - $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false - } - else - { - # The string doesn't exist - $IsOneDriveToUninstall = $false - } + Write-Information -MessageData "" -InformationAction Continue + Write-Warning -Message $Localization.OneDriveWarning + Write-Error -Message $Localization.OneDriveWarning -ErrorAction SilentlyContinue - $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore - if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + return + } + + # Checking how the script was invoked: via a preset or Functions.ps1 + # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-variable + # This function works only if OneDrive was already uninstalled, or user is intended to uninstall "OneDrive -Uninstall" within commandline + $PresetName = (Get-Variable -Name MyInvocation -Scope Script).Value.PSCommandPath + $PSCallStack = (Get-PSCallStack).Position.Text + $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore + + # Checking whether function was called from Functions.ps1 + if ($PresetName -match "Functions.ps1") + { + # Checking whether command contains "WinPrtScrFolder -Desktop" + if ($PSCallStack -match "WinPrtScrFolder -Desktop") { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether other commands contains "OneDrive -Uninstall" which means that user is intended to uninstall "OneDrive -Uninstall", or OneDrive was uinstalled + if (($PSCallStack -match "OneDrive -Uninstall") -or (-not $OneDriveInstalled)) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } else { - # A preset file isn't taking a part so we ignore it and check only whether OneDrive was already uninstalled - if (-not (Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + # Checking whether function was called from Sophia.ps1, and preset contains the "OneDrive -Uninstall" string is uncommented that means OneDrive will be unistalled + if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether string exists and is uncommented + $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false + # Checking whether string exists and is uncommented, or OneDrive was uninstalled, or user called "OneDrive -Uninstall" from Sophia.ps1 alongside with "WinPrtScrFolder -Desktop" + if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled) -or ($PSCallStack -match "OneDrive -Uninstall")) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } } @@ -7457,6 +7512,19 @@ function RecommendedTroubleshooting $Default ) + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -Force -ErrorAction Ignore + + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR + + # Turn on Windows Error Reporting + Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore + + Get-Service -Name WerSvc | Set-Service -StartupType Manual + Get-Service -Name WerSvc | Start-Service + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -7466,24 +7534,6 @@ function RecommendedTroubleshooting New-Item -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Force } New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Name UserPreference -PropertyType DWord -Value 3 -Force - - # Set Windows level of diagnostic data gathering to "Optional diagnostic data" - if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack)) - { - New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Force - } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force - - Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWORD -Value 3 - - # Turn on Windows Error Reporting - Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore - - Get-Service -Name WerSvc | Set-Service -StartupType Manual - Get-Service -Name WerSvc | Start-Service } "Default" { @@ -7595,6 +7645,7 @@ function ReservedStorage } catch [System.Runtime.InteropServices.COMException] { + Write-Warning -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) Write-Error -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -7749,6 +7800,8 @@ function CapsLock $Enable ) + Remove-ItemProperty -Path HKCU:\Keyboard Layout -Name Attributes -Force -ErrorAction Ignore + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -7851,6 +7904,11 @@ function Autoplay $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer, HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + Set-Policy -Scope User -Path Software\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -8952,7 +9010,7 @@ public static void Refresh() Associations will be exported as Application_Associations.json file in script root folder .NOTES - Import exported JSON file after a clean installation. You have to install all apps according to an exported JSON file to restore all associations + You need to install all apps according to an exported JSON file to restore all associations .NOTES Machine-wide @@ -9130,11 +9188,8 @@ function Export-Associations .SYNOPSIS Import all Windows associations - .PARAMETER Path - Import all Windows associations from a JSON file - .EXAMPLE - Export-Associations -Path D:\ + Import-Associations .NOTES You have to install all apps according to an exported JSON file to restore all associations @@ -9406,10 +9461,10 @@ function InstallVCRedist <# .SYNOPSIS - Install the latest .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 .EXAMPLE - InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 + InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 .LINK https://dotnet.microsoft.com/en-us/download/dotnet @@ -9426,7 +9481,7 @@ function InstallDotNetRuntimes Mandatory = $true, ParameterSetName = "Runtimes" )] - [ValidateSet("NET6x64", "NET8x64")] + [ValidateSet("NET8x64", "NET9x64")] [string[]] $Runtimes ) @@ -9437,18 +9492,18 @@ function InstallDotNetRuntimes { switch ($Runtime) { - NET6x64 + NET8x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET6Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -9459,27 +9514,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 6 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 8 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET6Version has only three, unless the [System.Version] accelerator fails - $dotnet6Version = (Get-Item -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet6Version = "{0}.{1}.{2}" -f $dotnet6Version.Split(".") + # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails + $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") } else { - $dotnet6Version = "0.0" + $dotnet8Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 6 is not installed at all - if (([System.Version]$NET6Version -gt [System.Version]$dotnet6Version) -or ($dotnet6Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all + if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) { try { - # Downloading .NET Desktop Runtime 6 x64 + # .NET Desktop Runtime 8 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET6Version/dotnet-runtime-$NET6Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -9495,15 +9550,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET6Version" -Verbose + Write-Verbose -Message ".NET $NET8Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -9515,18 +9570,18 @@ function InstallDotNetRuntimes Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } - NET8x64 + NET9x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/9.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET9Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -9537,27 +9592,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 8 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 9 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails - $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") + # FileVersion has four properties while $NET9Version has only three, unless the [System.Version] accelerator fails + $dotnet9Version = (Get-Item -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet9Version = "{0}.{1}.{2}" -f $dotnet9Version.Split(".") } else { - $dotnet8Version = "0.0" + $dotnet9Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all - if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 9 is not installed at all + if (([System.Version]$NET9Version -gt [System.Version]$dotnet9Version) -or ($dotnet9Version -eq "0.0")) { try { - # .NET Desktop Runtime 8 x64 + # Downloading .NET Desktop Runtime 9 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET9Version/dotnet-runtime-$NET9Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -9573,15 +9628,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET8Version" -Verbose + Write-Verbose -Message ".NET $NET9Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -9787,57 +9842,6 @@ function PreventEdgeShortcutCreation } } -<# - .SYNOPSIS - Internal SATA drives up as removeable media in the taskbar notification area - - .PARAMETER Disable - Prevent all internal SATA drives from showing up as removable media in the taskbar notification area - - .PARAMETER Default - Show up all internal SATA drives as removeable media in the taskbar notification area - - .EXAMPLE - SATADrivesRemovableMedia -Disable - - .EXAMPLE - SATADrivesRemovableMedia -Default - - .NOTES - Machine-wide -#> -function SATADrivesRemovableMedia -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Default" - )] - [switch] - $Default - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Type MultiString -Value @(0, 1, 2, 3, 4, 5) -Force - } - "Default" - { - Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Force -ErrorAction Ignore - } - } -} - <# .SYNOPSIS Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups @@ -10006,7 +10010,7 @@ function Install-WSL $Form.Close() # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for updates Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan @@ -10037,7 +10041,7 @@ function Install-WSL Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -10610,7 +10614,7 @@ function UninstallUWPApps Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -10701,66 +10705,6 @@ function CortanaAutostart } } } - -<# - .SYNOPSIS - Microsoft Teams autostarting - - .PARAMETER Disable - Enable Teams autostarting - - .PARAMETER Enable - Disable Teams autostarting - - .EXAMPLE - TeamsAutostart -Disable - - .EXAMPLE - TeamsAutostart -Enable - - .NOTES - Current user -#> -function TeamsAutostart -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Enable" - )] - [switch] - $Enable - ) - - if (-not (Get-AppxPackage -Name MSTeams)) - { - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose - Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - return - } - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask" -Name State -PropertyType DWord -Value 1 -Force - } - "Enable" - { - New-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask" -Name State -PropertyType DWord -Value 2 -Force - } - } -} #endregion UWP apps #region Gaming @@ -11245,7 +11189,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro TaskPath = "Sophia" Principal = $Principal Action = $Action - Description = $Localization.CleanupTaskDescription + Description = $Localization.CleanupTaskDescription -f $env:USERNAME Settings = $Settings } Register-ScheduledTask @Parameters -Force @@ -11405,7 +11349,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription + Description = $Localization.CleanupNotificationTaskDescription -f $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -11423,7 +11367,8 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro $Paths = @( "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.vbs", "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.ps1", - "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1" + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1", + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.vbs" ) Remove-Item -Path $Paths -Force -ErrorAction Ignore @@ -11754,7 +11699,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -12039,6 +11984,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_ `$Paths = @( # Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent (-join ("`$env:SystemDrive\", '`$WinREAgent')), + (-join ("`$env:SystemDrive\", '`$SysReset')), + (-join ("`$env:SystemDrive\", '`$Windows.~WS')), + "`$env:SystemDrive\ESD", "`$env:SystemDrive\Intel", "`$env:SystemDrive\PerfLogs" ) @@ -12103,7 +12051,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" + Description = $Localization.FolderTaskDescription -f "%TEMP%", $env:USERNAME } Register-ScheduledTask @Parameters -Force diff --git a/src/Sophia_Script_for_Windows_11/Sophia.ps1 b/src/Sophia_Script_for_Windows_11/Sophia.ps1 index d679880a6..de43da7d8 100644 --- a/src/Sophia_Script_for_Windows_11/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11/Sophia.ps1 @@ -953,12 +953,12 @@ DefaultTerminalApp -WindowsTerminal InstallVCRedist <# - Install the latest .NET Desktop Runtime 6, 8 x64 - Установить последнюю версию .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 + Установить последнюю версию .NET Desktop Runtime 8, 9 x64 https://dotnet.microsoft.com/en-us/download/dotnet #> -InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 +InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 # Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only # Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России @@ -978,14 +978,6 @@ PreventEdgeShortcutCreation -Channels Stable, Beta, Dev, Canary # Не предотвращать создание ярлыков на рабочем столе при обновлении Microsoft Edge (значение по умолчанию) # PreventEdgeShortcutCreation -Disable -# Prevent all internal SATA drives from showing up as removable media in the taskbar notification area -# Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач -SATADrivesRemovableMedia -Disable - -# Show up all internal SATA drives as removeable media in the taskbar notification area (default value) -# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию) -# SATADrivesRemovableMedia -Default - # Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups # Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями # RegistryBackup -Enable @@ -1041,14 +1033,6 @@ CortanaAutostart -Disable # Enable Cortana autostarting (default value) # Включить автозагрузку Кортана (значение по умолчанию) # CortanaAutostart -Enable - -# Disable Microsoft Teams autostarting -# Выключить автозагрузку Microsoft Teams -TeamsAutostart -Disable - -# Enable Microsoft Teams autostarting (default value) -# Включить автозагрузку Microsoft Teams (значение по умолчанию) -# TeamsAutostart -Enable #endregion UWP apps #region Gaming diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/de-DE/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/de-DE/Sophia.psd1 index 1978efe46..8ee057c4f 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/de-DE/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/de-DE/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Geplante Aufgaben OneDriveUninstalling = OneDrive deinstallieren... OneDriveInstalling = OneDrive installieren... OneDriveDownloading = OneDrive herunterladen... -OneDriveWarning = Die "{0}"-Funktion wird nur angewendet, wenn die Voreinstellung so konfiguriert ist, dass OneDrive entfernt wird (oder die App bereits entfernt wurde), andernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. +OneDriveWarning = Die Funktion "WinPrtScrFolder -Desktop" wird nur angewendet, wenn der Benutzer das Skript zum Entfernen von OneDrive konfiguriert hat (oder OneDrive bereits entfernt wurde).\nAndernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. WindowsFeaturesTitle = Windows-Features OptionalFeaturesTitle = Optionale Features EnableHardwareVT = Virtualisierung in UEFI aktivieren. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Möchten Sie die Einstellung der Gra ScheduledTaskPresented = Die Funktion "{0}" wurde bereits als "{1}" angelegt. CleanupTaskNotificationTitle = Windows aufräumen CleanupTaskNotificationEvent = Aufgabe zum Bereinigen nicht verwendeter Windows-Dateien und -Updates ausführen? -CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. -CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. +CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. +CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. SoftwareDistributionTaskNotificationEvent = Der Windows Update-Cache wurde erfolgreich gelöscht. TempTaskNotificationEvent = Der Ordner mit den temporären Dateien wurde erfolgreich bereinigt. -FolderTaskDescription = Ordner "{0}" bereinigen. +FolderTaskDescription = Ordner "{0}" bereinigen. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{1}" im System angemeldet ist. EventViewerCustomViewName = Prozesserstellung EventViewerCustomViewDescription = Prozesserstellungen und Befehlszeilen-Auditing-Ereignisse. RestartWarning = Sicherstellen, dass Sie Ihren PC neu starten. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/en-US/Sophia.psd1 index c5d55e5cd..b738ba9c8 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/en-US/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Scheduled tasks OneDriveUninstalling = Uninstalling OneDrive... OneDriveInstalling = Installing OneDrive... OneDriveDownloading = Downloading OneDrive... -OneDriveWarning = The "{0}" function will be applied only if the preset is configured to remove OneDrive (or the app was already removed), otherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. +OneDriveWarning = "WinPrtScrFolder -Desktop" function will be applied only if user configured script to remove OneDrive (or OneDrive was already removed).\nOtherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. WindowsFeaturesTitle = Windows features OptionalFeaturesTitle = Optional features EnableHardwareVT = Enable Virtualization in UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Would you like to set the graphics p ScheduledTaskPresented = The "{0}" function was already created as "{1}". CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? -CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. -CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. +CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. Scheduled task can be run only if user "{0}" logged into the system. +CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. Scheduled task can be run only if user "{0}" logged into the system. SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted. TempTaskNotificationEvent = Temporary files folder successfully cleaned up. -FolderTaskDescription = The {0} folder cleanup. +FolderTaskDescription = The {0} folder cleanup. Scheduled task can be run only if user "{0}" logged into the system. EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events. RestartWarning = Make sure to restart your PC. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/es-ES/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/es-ES/Sophia.psd1 index e166fbc0b..f828778e9 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/es-ES/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/es-ES/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Tareas programadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalación de OneDrive... OneDriveDownloading = Descargando OneDrive... -OneDriveWarning = La función "{0}" se aplicará sólo si el preajuste está configurado para eliminar OneDrive (o la aplicación ya fue eliminada), de lo contrario la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. +OneDriveWarning = La función "WinPrtScrFolder -Desktop" se aplicará sólo si el usuario configuró el script para eliminar OneDrive (o OneDrive ya fue eliminado).\nDe lo contrario, la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. WindowsFeaturesTitle = Características de Windows OptionalFeaturesTitle = Características opcionales EnableHardwareVT = Habilitar la virtualización en UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = ¿Le gustaría establecer la configu ScheduledTaskPresented = La función "{0}" ya fue creada como "{1}". CleanupTaskNotificationTitle = Limpieza de Windows CleanupTaskNotificationEvent = ¿Ejecutar la tarea de limpiar los archivos no utilizados y actualizaciones de Windows? -CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. -CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. +CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. +CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. SoftwareDistributionTaskNotificationEvent = La caché de actualización de Windows eliminado correctamente. TempTaskNotificationEvent = Los archivos de la carpeta Temp limpiados con éxito. -FolderTaskDescription = La limpieza de la carpeta "{0}". +FolderTaskDescription = La limpieza de la carpeta "{0}". La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. EventViewerCustomViewName = Creación de proceso EventViewerCustomViewDescription = Eventos de auditoría de línea de comandos y creación de procesos. RestartWarning = Asegúrese de reiniciar su PC. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/fr-FR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/fr-FR/Sophia.psd1 index 6d47d4843..6acd0cbdf 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/fr-FR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/fr-FR/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Tâches planifiées OneDriveUninstalling = Désinstalltion de OneDrive... OneDriveInstalling = Installation de OneDrive... OneDriveDownloading = Téléchargement de OneDrive... -OneDriveWarning = La fonction "{0}" sera appliquée uniquement si le préréglage est configuré pour supprimer OneDrive (ou si l'application a déjà été supprimée), sinon la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive s'interrompt. +OneDriveWarning = La fonction "WinPrtScrFolder -Desktop" ne sera appliquée que si l'utilisateur a configuré le script pour supprimer OneDrive (ou si OneDrive a déjà été supprimé).\nDans le cas contraire, la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive est interrompue. WindowsFeaturesTitle = Fonctionnalités OptionalFeaturesTitle = Fonctionnalités optionnelles EnableHardwareVT = Activer la virtualisation dans UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Souhaitez-vous définir le paramètr ScheduledTaskPresented = La fonction "{0}" a déjà été créée en tant que "{1}". CleanupTaskNotificationTitle = Nettoyer Windows CleanupTaskNotificationEvent = Exécuter la tâche pour nettoyer les fichiers et les mises à jour inutilisés de Windows? -CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. -CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. +CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. +CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. SoftwareDistributionTaskNotificationEvent = Le cache de mise à jour Windows a bien été supprimé. TempTaskNotificationEvent = Le dossier des fichiers temporaires a été nettoyé avec succès. -FolderTaskDescription = Nettoyage du dossier "{0}". +FolderTaskDescription = Nettoyage du dossier "{0}". La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. EventViewerCustomViewName = Création du processus EventViewerCustomViewDescription = Audit des événements de création du processus et de ligne de commande. RestartWarning = Assurez-vous de redémarrer votre PC. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/hu-HU/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/hu-HU/Sophia.psd1 index b0c9ad7e5..a6836c04d 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/hu-HU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/hu-HU/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Ütemezett feladatok OneDriveUninstalling = OneDrive eltávolítása... OneDriveInstalling = OneDrive telepítése... OneDriveDownloading = OneDrive letöltése... -OneDriveWarning = A "{0}" funkció csak akkor kerül alkalmazásra, ha az előbeállítás a OneDrive eltávolítására van beállítva (vagy az alkalmazás már eltávolításra került), különben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. +OneDriveWarning = A "WinPrtScrFolder -Desktop" funkció csak akkor kerül alkalmazásra, ha a felhasználó a OneDrive eltávolítására konfigurálta a szkriptet (vagy a OneDrive már eltávolításra került).\nEllenkező esetben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. WindowsFeaturesTitle = Windows szolgáltatások OptionalFeaturesTitle = Opcionális szolgáltatások EnableHardwareVT = Virtualizáció engedélyezése UEFI-ben. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Szeretné megváltoztatni a grafikus ScheduledTaskPresented = A "{0}" funkciót már létrehoztuk "{1}" néven. CleanupTaskNotificationTitle = Windows tisztítása CleanupTaskNotificationEvent = Szeretné a nem használt fájlokat es frissitéseket eltávolítani? -CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. -CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. +CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. +CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. SoftwareDistributionTaskNotificationEvent = A Windows frissités számára fenntartott ideiglenes tárhely sikeresen megtisztítva. TempTaskNotificationEvent = Az ideiglenes fájlok tárolására szolgáló könyvtár tisztítása sikeresen megtörtént. -FolderTaskDescription = A {0} könyvtár tisztítása. +FolderTaskDescription = A {0} könyvtár tisztítása. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. EventViewerCustomViewName = Folyamatok EventViewerCustomViewDescription = Folyamatok létrehozása és parancssor ellenőrző események. RestartWarning = Kérem ne felejtse el újraindítani a számítógépét. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/it-IT/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/it-IT/Sophia.psd1 index 6fe856c71..4d07b1ee8 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/it-IT/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/it-IT/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Attività pianificate OneDriveUninstalling = Disinstallazione di OneDrive... OneDriveInstalling = Installazione di OneDrive... OneDriveDownloading = Download di OneDrive... -OneDriveWarning = La funzione "{0}" sarà applicata solo se il preset è configurato per rimuovere OneDrive (o se l'app è già stata rimossa), altrimenti la funzionalità di backup per le cartelle "Desktop" e "Pictures" in OneDrive si interromperà. +OneDriveWarning = La funzione "WinPrtScrFolder -Desktop" verrà applicata solo se l'utente ha configurato lo script per rimuovere OneDrive (o se OneDrive è già stato rimosso).\nIn caso contrario, la funzionalità di backup per le cartelle "Desktop" e "Immagini" di OneDrive si interrompe. WindowsFeaturesTitle = Funzionalità di Windows OptionalFeaturesTitle = Caratteristiche opzionali EnableHardwareVT = Abilita virtualizzazione in UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Volete impostare l'impostazione dell ScheduledTaskPresented = La funzione "{0}" è già stata creata come "{1}". CleanupTaskNotificationTitle = Pulizia di Windows CleanupTaskNotificationEvent = Eseguire l'operazione di pulizia dei file inutilizzati e aggiornamenti di Windows? -CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". -CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. +CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. +CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. SoftwareDistributionTaskNotificationEvent = La cache degli aggiornamenti di Windows cancellata con successo. TempTaskNotificationEvent = I file cartella Temp puliti con successo. -FolderTaskDescription = Pulizia della cartella "{0}". +FolderTaskDescription = Pulizia della cartella "{0}". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. EventViewerCustomViewName = Creazione del processo EventViewerCustomViewDescription = Creazione del processi e degli eventi di controllo della riga di comando. RestartWarning = Assicurarsi di riavviare il PC. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/pl-PL/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/pl-PL/Sophia.psd1 index 110ca874b..a9680db91 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/pl-PL/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/pl-PL/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Zaplanowane zadania OneDriveUninstalling = Odinstalowywanie OneDrive... OneDriveInstalling = Instalowanie OneDrive... OneDriveDownloading = Pobieranie OneDrive... -OneDriveWarning = Funkcja "{0}" zostanie zastosowana tylko wtedy, gdy ustawienie wstępne są skonfigurowane do usunięcia OneDrive (lub aplikacja została już usunięta), w przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Obrazy" w usłudze OneDrive ulegnie awarii. +OneDriveWarning = Funkcja "WinPrtScrFolder -Desktop" zostanie zastosowana tylko wtedy, gdy użytkownik skonfigurował skrypt do usuwania OneDrive (lub OneDrive został już usunięty).\nW przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Zdjęcia" w OneDrive zostanie przerwana. WindowsFeaturesTitle = Funkcje Windows OptionalFeaturesTitle = Funkcje opcjonalne EnableHardwareVT = Włącz wirtualizację w UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Czy chcesz ustawić wydajność graf ScheduledTaskPresented = Funkcja "{0}" została już utworzona jako "{1}". CleanupTaskNotificationTitle = Oczyszczanie system Windows CleanupTaskNotificationEvent = Uruchomić zadanie w celu usunięcia nieużywanych plików i aktualizacji systemu Windows? -CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. -CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. +CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. +CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. SoftwareDistributionTaskNotificationEvent = Pomyślnie usunięto pamięć podręczną aktualizacji systemu Windows. TempTaskNotificationEvent = Folder plików tymczasowych został pomyślnie wyczyszczony. -FolderTaskDescription = Czyszczenie folderu {0}. +FolderTaskDescription = Czyszczenie folderu {0}. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. EventViewerCustomViewName = Tworzenie procesu EventViewerCustomViewDescription = Tworzenie procesu i zdarzeń audytu. RestartWarning = Pamiętaj o ponownym uruchomieniu komputera. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/pt-BR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/pt-BR/Sophia.psd1 index 6972ff90b..4f29a91fa 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/pt-BR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/pt-BR/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Tarefas agendadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalar o OneDrive... OneDriveDownloading = Baixando OneDrive... -OneDriveWarning = A função "{0}" será aplicada somente se a predefinição for configurada para remover o OneDrive (ou a aplicação já foi removida), caso contrário a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive quebra. +OneDriveWarning = A função "WinPrtScrFolder -Desktop" será aplicada somente se o usuário tiver configurado o script para remover o OneDrive (ou se o OneDrive já tiver sido removido).\nCaso contrário, a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive será interrompida. WindowsFeaturesTitle = Recursos do Windows OptionalFeaturesTitle = Recursos opcionais EnableHardwareVT = Habilitar virtualização em UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Gostaria de definir a configuração ScheduledTaskPresented = A função "{0}" já foi criada como "{1}". CleanupTaskNotificationTitle = Limpeza do Windows CleanupTaskNotificationEvent = Executar tarefa para limpar arquivos e atualizações não utilizados do Windows? -CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. -CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. +CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. +CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. SoftwareDistributionTaskNotificationEvent = O cache de atualização do Windows excluído com sucesso. TempTaskNotificationEvent = Os arquivos da pasta Temp limpos com sucesso. -FolderTaskDescription = A limpeza da pasta "{0}". +FolderTaskDescription = A limpeza da pasta "{0}". A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. EventViewerCustomViewName = Criação de processo EventViewerCustomViewDescription = Criação de processos e eventos de auditoria de linha de comando. RestartWarning = Certifique-se de reiniciar o PC. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/ru-RU/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/ru-RU/Sophia.psd1 index 1be63e11c..3523c7578 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/ru-RU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/ru-RU/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Запланированные за OneDriveUninstalling = Удаление OneDrive... OneDriveInstalling = OneDrive устанавливается... OneDriveDownloading = Скачивается OneDrive... -OneDriveWarning = Функция "{0}" будет применена только в случае, если в пресете настроено удаление OneDrive (или приложение уже удалено), иначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. +OneDriveWarning = Функция "WinPrtScrFolder -Desktop" будет применена только в случае, если пользователь настроил удаление OneDrive (или приложение уже удалено).\nИначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. WindowsFeaturesTitle = Компоненты Windows OptionalFeaturesTitle = Дополнительные компоненты EnableHardwareVT = Включите виртуализацию в UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Установить для любо ScheduledTaskPresented = Функция "{0}" уже была создана от имени "{1}". CleanupTaskNotificationTitle = Очистка Windows CleanupTaskNotificationEvent = Запустить задание по очистке неиспользуемых файлов и обновлений Windows? -CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. -CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. +CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. Задание может быть запущено, только если пользователь {0} вошел в систему. +CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. Задание может быть запущено, только если пользователь {0} вошел в систему. SoftwareDistributionTaskNotificationEvent = Кэш обновлений Windows успешно удален. TempTaskNotificationEvent = Папка временных файлов успешно очищена. -FolderTaskDescription = Очистка папки {0}. +FolderTaskDescription = Очистка папки {0}. Задание может быть запущено, только если пользователь "{1}" вошел в систему. EventViewerCustomViewName = Создание процесса EventViewerCustomViewDescription = События создания нового процесса и аудит командной строки. RestartWarning = Обязательно перезагрузите ваш ПК. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/tr-TR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/tr-TR/Sophia.psd1 index 94e1d0f60..cab531792 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/tr-TR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/tr-TR/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Zamanlanan görevler OneDriveUninstalling = OneDrive kaldırılıyor... OneDriveInstalling = OneDrive kuruluyor... OneDriveDownloading = OneDrive indiriliyor... -OneDriveWarning = "{0}" işlevi yalnızca ön ayar OneDrive'ı kaldıracak şekilde yapılandırılırsa uygulanır (veya uygulama zaten kaldırılmışsa), aksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. +OneDriveWarning = "WinPrtScrFolder -Desktop" işlevi yalnızca kullanıcı OneDrive'ı kaldırmak için komut dosyası yapılandırmışsa (veya OneDrive zaten kaldırılmışsa) uygulanır.\nAksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. WindowsFeaturesTitle = Características do Windows OptionalFeaturesTitle = Opsiyonel özellikler EnableHardwareVT = UEFI'dan sanallaştırmayı aktifleştirin. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Seçtiğiniz bir uygulamanın grafik ScheduledTaskPresented = "{0}" işlevi zaten "{1}" olarak oluşturulmuştu. CleanupTaskNotificationTitle = Windows temizliği CleanupTaskNotificationEvent = Windows kullanılmayan dosyaları ve güncellemeleri temizlemek için görev çalıştırılsın mı? -CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. -CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. +CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. +CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. SoftwareDistributionTaskNotificationEvent = Windows güncelleme önbelleği başarıyla silindi. TempTaskNotificationEvent = Geçici dosyalar klasörü başarıyla temizlendi. -FolderTaskDescription = "{0}" klasörü temizleniyor. +FolderTaskDescription = "{0}" klasörü temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. EventViewerCustomViewName = Süreç Oluşturma EventViewerCustomViewDescription = Süreç oluşturma ve komut satırı denetleme olayları. RestartWarning = Bilgisayarınızı yeniden başlattığınızdan emin olun. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/uk-UA/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/uk-UA/Sophia.psd1 index 3330a3f54..449efe19b 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/uk-UA/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/uk-UA/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = Заплановані задачі OneDriveUninstalling = Видалення OneDrive... OneDriveInstalling = OneDrive встановлюється... OneDriveDownloading = Завантажується OneDrive... -OneDriveWarning = Функція "{0}" буде застосована тільки в разі, якщо в пресеті налаштовано видалення OneDrive (або застосунок вже видалено), інакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. +OneDriveWarning = Функція "WinPrtScrFolder -Desktop" буде застосована тільки в разі, якщо користувач налаштував видалення OneDrive (або застосунок уже видалено).\nІнакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. WindowsFeaturesTitle = Компоненти Windows OptionalFeaturesTitle = Додаткові компоненти EnableHardwareVT = Увімкніть віртуалізацію в UEFI. @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = Встановити для будь ScheduledTaskPresented = Функцію "{0}" уже було створено від імені "{1}". CleanupTaskNotificationTitle = Очищення Windows CleanupTaskNotificationEvent = Запустити завдання з очищення невикористовуваних файлів і оновлень Windows? -CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. -CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. +CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. +CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. SoftwareDistributionTaskNotificationEvent = Кеш оновлень Windows успішно видалено. TempTaskNotificationEvent = Папка тимчасових файлів успішно очищена. -FolderTaskDescription = Очищення папки "{0}". +FolderTaskDescription = Очищення папки "{0}". Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. EventViewerCustomViewName = Створення процесу EventViewerCustomViewDescription = Події створення нового процесу і аудит командного рядка. RestartWarning = Обов'язково перезавантажте ваш ПК. diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/zh-CN/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/zh-CN/Sophia.psd1 index 957b997a4..4fe20e4d4 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/zh-CN/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Localizations/zh-CN/Sophia.psd1 @@ -20,7 +20,7 @@ ScheduledTasks = 计划任务 OneDriveUninstalling = 卸载OneDrive..... OneDriveInstalling = OneDrive正在安装..... OneDriveDownloading = 正在下载OneDrive..... -OneDriveWarning = 只有当预设被配置为删除OneDrive(或应用程序已经被删除)时,才会应用"{0}"功能,否则OneDrive中 "桌面 "和 "图片 "文件夹的备份功能就会中断。 +OneDriveWarning = "WinPrtScrFolder -Desktop" 功能僅在使用者設定腳本移除 OneDrive (或 OneDrive 已移除) 後才會套用\n否則 OneDrive 中「桌面」和「圖片」資料夾的備份功能會中斷。 WindowsFeaturesTitle = Windows功能 OptionalFeaturesTitle = 可选功能 EnableHardwareVT = UEFI中开启虚拟化。 @@ -37,11 +37,11 @@ GraphicsPerformanceTitle = 是否将所选应用程序的图形 ScheduledTaskPresented = "{0}"函数已经被创建为"{1}"。 CleanupTaskNotificationTitle = Windows清理 CleanupTaskNotificationEvent = 运行任务以清理Windows未使用的文件和更新? -CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。 -CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。 +CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。只有登入使用者"{0}"才能啟動任務。 +CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。只有登入使用者"{0}"才能啟動任務。 SoftwareDistributionTaskNotificationEvent = Windows更新缓存已成功删除。 TempTaskNotificationEvent = 临时文件文件夹已成功清理。 -FolderTaskDescription = "{0}"文件夹清理。 +FolderTaskDescription = "{0}"文件夹清理。只有登入使用者"{0}"才能啟動任務。 EventViewerCustomViewName = 进程创建 EventViewerCustomViewDescription = 进程创建和命令行审核事件。 RestartWarning = 确保重启电脑。 diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 index 581de0981..e1b0aab66 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 @@ -698,7 +698,7 @@ public extern static string BrandingFormatString(string sFormat); Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements" -Verbose # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for updates Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan @@ -745,7 +745,7 @@ public extern static string BrandingFormatString(string sFormat); Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements" -Verbose # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for updates Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan @@ -1653,7 +1653,7 @@ function ScheduledTasks Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -4127,7 +4127,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4218,7 +4217,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4481,6 +4479,10 @@ function StorageSense $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Type CLEAR + if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy)) { New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -ItemType Directory -Force @@ -4494,7 +4496,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force # Turn on automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 1 -Force # Run Storage Sense every month New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 30 -Force @@ -4505,7 +4507,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force # Turn off automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 0 -Force # Run Storage Sense during low free disk space New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 0 -Force @@ -4758,6 +4760,10 @@ function DeliveryOptimization $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -4810,6 +4816,8 @@ function WindowsManageDefaultPrinter $Enable ) + Set-Policy -Scope User -Path "Software\Microsoft\Windows NT\CurrentVersion\Windows" -Name LegacyDefaultPrinterMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5106,7 +5114,7 @@ function WindowsFeatures Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5359,7 +5367,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -5420,7 +5427,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -5463,7 +5469,7 @@ function WindowsCapabilities Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5528,18 +5534,19 @@ function UpdateMicrosoftProducts $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" { - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force } "Disable" { - 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") - } + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -Force -ErrorAction Ignore } } } @@ -5582,6 +5589,10 @@ function RestartNotification $Hide ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Show" @@ -5633,6 +5644,12 @@ function RestartDeviceAfterUpdate $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -5684,6 +5701,16 @@ function ActiveHours $Manually ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers, AlwaysAutoRebootAtScheduledTime -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AlwaysAutoRebootAtScheduledTime -Type CLEAR + + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -5735,6 +5762,11 @@ function WindowsLatestUpdate $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent, SetAllowOptionalContent -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAllowOptionalContent -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5789,6 +5821,10 @@ function PowerPlan $Balanced ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "High" @@ -6962,66 +6998,77 @@ function WinPrtScrFolder $Default ) - # Checking whether user is logged into OneDrive (Microsoft account) - $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore - if ($UserEmail) - { - Write-Information -MessageData "" -InformationAction Continue - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose - Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - return - } - switch ($PSCmdlet.ParameterSetName) { "Desktop" { - # Check how the script was invoked: via a preset or Function.ps1 - # $_.File has no EndsWith() method - $PresetName = ((Get-PSCallStack).Position | Where-Object -FilterScript {($_.Text -eq "WinPrtScrFolder -Desktop") -or ($_.Text -match "Invoke-Expression")}).File | Where-Object -FilterScript {$_.EndsWith(".ps1") -and ($_ -notmatch "Functions.ps1")} - if ($PresetName) + # Checking whether user is logged into OneDrive (Microsoft account) + $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore + if ($UserEmail) { - # Checking whether a preset contains the "OneDrive -Uninstall" string uncommented out - if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) - { - # The string exists and is commented - $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false - } - else - { - # The string doesn't exist - $IsOneDriveToUninstall = $false - } + Write-Information -MessageData "" -InformationAction Continue + Write-Warning -Message $Localization.OneDriveWarning + Write-Error -Message $Localization.OneDriveWarning -ErrorAction SilentlyContinue - $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore - if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + return + } + + # Checking how the script was invoked: via a preset or Functions.ps1 + # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-variable + # This function works only if OneDrive was already uninstalled, or user is intended to uninstall "OneDrive -Uninstall" within commandline + $PresetName = (Get-Variable -Name MyInvocation -Scope Script).Value.PSCommandPath + $PSCallStack = (Get-PSCallStack).Position.Text + $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore + + # Checking whether function was called from Functions.ps1 + if ($PresetName -match "Functions.ps1") + { + # Checking whether command contains "WinPrtScrFolder -Desktop" + if ($PSCallStack -match "WinPrtScrFolder -Desktop") { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether other commands contains "OneDrive -Uninstall" which means that user is intended to uninstall "OneDrive -Uninstall", or OneDrive was uinstalled + if (($PSCallStack -match "OneDrive -Uninstall") -or (-not $OneDriveInstalled)) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } else { - # A preset file isn't taking a part so we ignore it and check only whether OneDrive was already uninstalled - if (-not (Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + # Checking whether function was called from Sophia.ps1, and preset contains the "OneDrive -Uninstall" string is uncommented that means OneDrive will be unistalled + if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether string exists and is uncommented + $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false + # Checking whether string exists and is uncommented, or OneDrive was uninstalled, or user called "OneDrive -Uninstall" from Sophia.ps1 alongside with "WinPrtScrFolder -Desktop" + if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled) -or ($PSCallStack -match "OneDrive -Uninstall")) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } } @@ -7073,6 +7120,19 @@ function RecommendedTroubleshooting $Default ) + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -Force -ErrorAction Ignore + + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR + + # Turn on Windows Error Reporting + Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore + + Get-Service -Name WerSvc | Set-Service -StartupType Manual + Get-Service -Name WerSvc | Start-Service + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -7082,24 +7142,6 @@ function RecommendedTroubleshooting New-Item -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Force } New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Name UserPreference -PropertyType DWord -Value 3 -Force - - # Set Windows level of diagnostic data gathering to "Optional diagnostic data" - if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack)) - { - New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Force - } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force - - Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWORD -Value 3 - - # Turn on Windows Error Reporting - Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore - - Get-Service -Name WerSvc | Set-Service -StartupType Manual - Get-Service -Name WerSvc | Start-Service } "Default" { @@ -7211,6 +7253,7 @@ function ReservedStorage } catch [System.Runtime.InteropServices.COMException] { + Write-Warning -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) Write-Error -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -7365,6 +7408,8 @@ function CapsLock $Enable ) + Remove-ItemProperty -Path HKCU:\Keyboard Layout -Name Attributes -Force -ErrorAction Ignore + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -7467,6 +7512,11 @@ function Autoplay $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer, HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + Set-Policy -Scope User -Path Software\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -8568,7 +8618,7 @@ public static void Refresh() Associations will be exported as Application_Associations.json file in script root folder .NOTES - Import exported JSON file after a clean installation. You have to install all apps according to an exported JSON file to restore all associations + You need to install all apps according to an exported JSON file to restore all associations .NOTES Machine-wide @@ -8746,11 +8796,8 @@ function Export-Associations .SYNOPSIS Import all Windows associations - .PARAMETER Path - Import all Windows associations from a JSON file - .EXAMPLE - Export-Associations -Path D:\ + Import-Associations .NOTES You have to install all apps according to an exported JSON file to restore all associations @@ -8945,10 +8992,10 @@ function InstallVCRedist <# .SYNOPSIS - Install the latest .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 .EXAMPLE - InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 + InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 .LINK https://dotnet.microsoft.com/en-us/download/dotnet @@ -8965,7 +9012,7 @@ function InstallDotNetRuntimes Mandatory = $true, ParameterSetName = "Runtimes" )] - [ValidateSet("NET6x64", "NET8x64")] + [ValidateSet("NET8x64", "NET9x64")] [string[]] $Runtimes ) @@ -8976,18 +9023,18 @@ function InstallDotNetRuntimes { switch ($Runtime) { - NET6x64 + NET8x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET6Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -8998,27 +9045,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 6 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 8 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET6Version has only three, unless the [System.Version] accelerator fails - $dotnet6Version = (Get-Item -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet6Version = "{0}.{1}.{2}" -f $dotnet6Version.Split(".") + # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails + $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") } else { - $dotnet6Version = "0.0" + $dotnet8Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 6 is not installed at all - if (([System.Version]$NET6Version -gt [System.Version]$dotnet6Version) -or ($dotnet6Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all + if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) { try { - # Downloading .NET Desktop Runtime 6 x64 + # .NET Desktop Runtime 8 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET6Version/dotnet-runtime-$NET6Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -9034,15 +9081,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET6Version" -Verbose + Write-Verbose -Message ".NET $NET8Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -9054,18 +9101,18 @@ function InstallDotNetRuntimes Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } - NET8x64 + NET9x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/9.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET9Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -9076,27 +9123,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 8 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 9 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails - $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") + # FileVersion has four properties while $NET9Version has only three, unless the [System.Version] accelerator fails + $dotnet9Version = (Get-Item -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet9Version = "{0}.{1}.{2}" -f $dotnet9Version.Split(".") } else { - $dotnet8Version = "0.0" + $dotnet9Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all - if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 9 is not installed at all + if (([System.Version]$NET9Version -gt [System.Version]$dotnet9Version) -or ($dotnet9Version -eq "0.0")) { try { - # .NET Desktop Runtime 8 x64 + # Downloading .NET Desktop Runtime 9 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET9Version/dotnet-runtime-$NET9Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -9112,15 +9159,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET8Version" -Verbose + Write-Verbose -Message ".NET $NET9Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -9326,57 +9373,6 @@ function PreventEdgeShortcutCreation } } -<# - .SYNOPSIS - Internal SATA drives up as removeable media in the taskbar notification area - - .PARAMETER Disable - Prevent all internal SATA drives from showing up as removable media in the taskbar notification area - - .PARAMETER Default - Show up all internal SATA drives as removeable media in the taskbar notification area - - .EXAMPLE - SATADrivesRemovableMedia -Disable - - .EXAMPLE - SATADrivesRemovableMedia -Default - - .NOTES - Machine-wide -#> -function SATADrivesRemovableMedia -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Default" - )] - [switch] - $Default - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Type MultiString -Value @(0, 1, 2, 3, 4, 5) -Force - } - "Default" - { - Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Force -ErrorAction Ignore - } - } -} - <# .SYNOPSIS Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups @@ -9468,7 +9464,6 @@ function Install-WSL { Write-Warning -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") Write-Error -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -9546,7 +9541,7 @@ function Install-WSL $Form.Close() # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for updates Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan @@ -9577,7 +9572,7 @@ function Install-WSL Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -10150,7 +10145,7 @@ function UninstallUWPApps Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11 LTSC 2024"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -10544,7 +10539,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro TaskPath = "Sophia" Principal = $Principal Action = $Action - Description = $Localization.CleanupTaskDescription + Description = $Localization.CleanupTaskDescription -f $env:USERNAME Settings = $Settings } Register-ScheduledTask @Parameters -Force @@ -10704,7 +10699,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription + Description = $Localization.CleanupNotificationTaskDescription -f $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -10722,7 +10717,8 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro $Paths = @( "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.vbs", "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.ps1", - "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1" + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1", + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.vbs" ) Remove-Item -Path $Paths -Force -ErrorAction Ignore @@ -11053,7 +11049,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -11338,6 +11334,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_ `$Paths = @( # Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent (-join ("`$env:SystemDrive\", '`$WinREAgent')), + (-join ("`$env:SystemDrive\", '`$SysReset')), + (-join ("`$env:SystemDrive\", '`$Windows.~WS')), + "`$env:SystemDrive\ESD", "`$env:SystemDrive\Intel", "`$env:SystemDrive\PerfLogs" ) @@ -11402,7 +11401,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" + Description = $Localization.FolderTaskDescription -f "%TEMP%", $env:USERNAME } Register-ScheduledTask @Parameters -Force diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 index 3bedc3d14..483c388aa 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 @@ -925,12 +925,12 @@ NetworkDiscovery -Enable InstallVCRedist <# - Install the latest .NET Desktop Runtime 6, 8 x64 - Установить последнюю версию .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 + Установить последнюю версию .NET Desktop Runtime 8, 9 x64 https://dotnet.microsoft.com/en-us/download/dotnet #> -InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 +InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 # Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only # Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России @@ -950,14 +950,6 @@ PreventEdgeShortcutCreation -Channels Stable, Beta, Dev, Canary # Не предотвращать создание ярлыков на рабочем столе при обновлении Microsoft Edge (значение по умолчанию) # PreventEdgeShortcutCreation -Disable -# Prevent all internal SATA drives from showing up as removable media in the taskbar notification area -# Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач -SATADrivesRemovableMedia -Disable - -# Show up all internal SATA drives as removeable media in the taskbar notification area (default value) -# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию) -# SATADrivesRemovableMedia -Default - # Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups # Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями # RegistryBackup -Enable diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/de-DE/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/de-DE/Sophia.psd1 index 012d98ace..2975f61d4 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/de-DE/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/de-DE/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Geplante Aufgaben OneDriveUninstalling = OneDrive deinstallieren... OneDriveInstalling = OneDrive installieren... OneDriveDownloading = OneDrive herunterladen... -OneDriveWarning = Die "{0}"-Funktion wird nur angewendet, wenn die Voreinstellung so konfiguriert ist, dass OneDrive entfernt wird (oder die App bereits entfernt wurde), andernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. +OneDriveWarning = Die Funktion "WinPrtScrFolder -Desktop" wird nur angewendet, wenn der Benutzer das Skript zum Entfernen von OneDrive konfiguriert hat (oder OneDrive bereits entfernt wurde).\nAndernfalls wird die Backup-Funktionalität für die Ordner "Desktop" und "Bilder" in OneDrive unterbrochen. WindowsFeaturesTitle = Windows-Features OptionalFeaturesTitle = Optionale Features EnableHardwareVT = Virtualisierung in UEFI aktivieren. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Möchten Sie die Einstellung der Gra ScheduledTaskPresented = Die Funktion "{0}" wurde bereits als "{1}" angelegt. CleanupTaskNotificationTitle = Windows aufräumen CleanupTaskNotificationEvent = Aufgabe zum Bereinigen nicht verwendeter Windows-Dateien und -Updates ausführen? -CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. -CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. +CleanupTaskDescription = Bereinigung von nicht verwendeten Windows-Dateien und Updates mit der integrierten Festplattenbereinigung. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. +CleanupNotificationTaskDescription = Popup-Benachrichtigung zur Erinnerung an die Bereinigung von nicht verwendeten Windows-Dateien und Updates. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{0}" im System angemeldet ist. SoftwareDistributionTaskNotificationEvent = Der Windows Update-Cache wurde erfolgreich gelöscht. TempTaskNotificationEvent = Der Ordner mit den temporären Dateien wurde erfolgreich bereinigt. -FolderTaskDescription = Ordner "{0}" bereinigen. +FolderTaskDescription = Ordner "{0}" bereinigen. Die geplante Aufgabe kann nur ausgeführt werden, wenn der Benutzer "{1}" im System angemeldet ist. EventViewerCustomViewName = Prozesserstellung EventViewerCustomViewDescription = Prozesserstellungen und Befehlszeilen-Auditing-Ereignisse. RestartWarning = Sicherstellen, dass Sie Ihren PC neu starten. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1 index 0f0cd3dda..50264be4a 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Scheduled tasks OneDriveUninstalling = Uninstalling OneDrive... OneDriveInstalling = Installing OneDrive... OneDriveDownloading = Downloading OneDrive... -OneDriveWarning = The "{0}" function will be applied only if the preset is configured to remove OneDrive (or the app was already removed), otherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. +OneDriveWarning = "WinPrtScrFolder -Desktop" function will be applied only if user configured script to remove OneDrive (or OneDrive was already removed).\nOtherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks. WindowsFeaturesTitle = Windows features OptionalFeaturesTitle = Optional features EnableHardwareVT = Enable Virtualization in UEFI. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Would you like to set the graphics p ScheduledTaskPresented = The "{0}" function was already created as "{1}". CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? -CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. -CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. +CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app. Scheduled task can be run only if user "{0}" logged into the system. +CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates. Scheduled task can be run only if user "{0}" logged into the system. SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted. TempTaskNotificationEvent = Temporary files folder successfully cleaned up. -FolderTaskDescription = The {0} folder cleanup. +FolderTaskDescription = The {0} folder cleanup. Scheduled task can be run only if user "{0}" logged into the system. EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events. RestartWarning = Make sure to restart your PC. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/es-ES/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/es-ES/Sophia.psd1 index 87a167370..36f1a6cc5 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/es-ES/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/es-ES/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Tareas programadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalación de OneDrive... OneDriveDownloading = Descargando OneDrive... -OneDriveWarning = La función "{0}" se aplicará sólo si el preajuste está configurado para eliminar OneDrive (o la aplicación ya fue eliminada), de lo contrario la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. +OneDriveWarning = La función "WinPrtScrFolder -Desktop" se aplicará sólo si el usuario configuró el script para eliminar OneDrive (o OneDrive ya fue eliminado).\nDe lo contrario, la funcionalidad de copia de seguridad para las carpetas "Escritorio" e "Imágenes" en OneDrive se rompe. WindowsFeaturesTitle = Características de Windows OptionalFeaturesTitle = Características opcionales EnableHardwareVT = Habilitar la virtualización en UEFI. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = ¿Le gustaría establecer la configu ScheduledTaskPresented = La función "{0}" ya fue creada como "{1}". CleanupTaskNotificationTitle = Limpieza de Windows CleanupTaskNotificationEvent = ¿Ejecutar la tarea de limpiar los archivos no utilizados y actualizaciones de Windows? -CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. -CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. +CleanupTaskDescription = La limpieza de Windows los archivos no utilizados y actualizaciones utilizando una función de aplicación de limpieza de discos. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. +CleanupNotificationTaskDescription = Pop-up recordatorio de notificaciones sobre la limpieza de archivos no utilizados de Windows y actualizaciones. La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. SoftwareDistributionTaskNotificationEvent = La caché de actualización de Windows eliminado correctamente. TempTaskNotificationEvent = Los archivos de la carpeta Temp limpiados con éxito. -FolderTaskDescription = La limpieza de la carpeta "{0}". +FolderTaskDescription = La limpieza de la carpeta "{0}". La tarea programada sólo puede ejecutarse si el usuario "{0}" ha iniciado sesión en el sistema. EventViewerCustomViewName = Creación de proceso EventViewerCustomViewDescription = Eventos de auditoría de línea de comandos y creación de procesos. RestartWarning = Asegúrese de reiniciar su PC. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/fr-FR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/fr-FR/Sophia.psd1 index d61ec0355..47de764a3 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/fr-FR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/fr-FR/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Tâches planifiées OneDriveUninstalling = Désinstalltion de OneDrive... OneDriveInstalling = Installation de OneDrive... OneDriveDownloading = Téléchargement de OneDrive... -OneDriveWarning = La fonction "{0}" sera appliquée uniquement si le préréglage est configuré pour supprimer OneDrive (ou si l'application a déjà été supprimée), sinon la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive s'interrompt. +OneDriveWarning = La fonction "WinPrtScrFolder -Desktop" ne sera appliquée que si l'utilisateur a configuré le script pour supprimer OneDrive (ou si OneDrive a déjà été supprimé).\nDans le cas contraire, la fonctionnalité de sauvegarde des dossiers "Desktop" et "Pictures" dans OneDrive est interrompue. WindowsFeaturesTitle = Fonctionnalités OptionalFeaturesTitle = Fonctionnalités optionnelles EnableHardwareVT = Activer la virtualisation dans UEFI. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Souhaitez-vous définir le paramètr ScheduledTaskPresented = La fonction "{0}" a déjà été créée en tant que "{1}". CleanupTaskNotificationTitle = Nettoyer Windows CleanupTaskNotificationEvent = Exécuter la tâche pour nettoyer les fichiers et les mises à jour inutilisés de Windows? -CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. -CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. +CleanupTaskDescription = Nettoyage des fichiers Windows inutilisés et des mises à jour à l'aide de l'application intégrée pour le nettoyage de disque. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. +CleanupNotificationTaskDescription = Rappel de notification contextuelle sur le nettoyage des fichiers et des mises à jour inutilisés de Windows. La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. SoftwareDistributionTaskNotificationEvent = Le cache de mise à jour Windows a bien été supprimé. TempTaskNotificationEvent = Le dossier des fichiers temporaires a été nettoyé avec succès. -FolderTaskDescription = Nettoyage du dossier "{0}". +FolderTaskDescription = Nettoyage du dossier "{0}". La tâche programmée ne peut être exécutée que si l'utilisateur "{0}" est connecté au système. EventViewerCustomViewName = Création du processus EventViewerCustomViewDescription = Audit des événements de création du processus et de ligne de commande. RestartWarning = Assurez-vous de redémarrer votre PC. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/hu-HU/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/hu-HU/Sophia.psd1 index d6fa351f8..a97c7c8d4 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/hu-HU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/hu-HU/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Ütemezett feladatok OneDriveUninstalling = OneDrive eltávolítása... OneDriveInstalling = OneDrive telepítése... OneDriveDownloading = OneDrive letöltése... -OneDriveWarning = A "{0}" funkció csak akkor kerül alkalmazásra, ha az előbeállítás a OneDrive eltávolítására van beállítva (vagy az alkalmazás már eltávolításra került), különben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. +OneDriveWarning = A "WinPrtScrFolder -Desktop" funkció csak akkor kerül alkalmazásra, ha a felhasználó a OneDrive eltávolítására konfigurálta a szkriptet (vagy a OneDrive már eltávolításra került).\nEllenkező esetben a OneDrive "Desktop" és "Pictures" mappáinak biztonsági mentési funkciója megszakad. WindowsFeaturesTitle = Windows szolgáltatások OptionalFeaturesTitle = Opcionális szolgáltatások EnableHardwareVT = Virtualizáció engedélyezése UEFI-ben. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Szeretné megváltoztatni a grafikus ScheduledTaskPresented = A "{0}" funkciót már létrehoztuk "{1}" néven. CleanupTaskNotificationTitle = Windows tisztítása CleanupTaskNotificationEvent = Szeretné a nem használt fájlokat es frissitéseket eltávolítani? -CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. -CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. +CleanupTaskDescription = A nem használt Windows fájlok és frissítések eltávolítása a beépített lemezkarbantartó alkalmazással. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. +CleanupNotificationTaskDescription = Előugró emlékeztető figyelmeztetés a nem használt Windows fájlok és frissítések törléséről. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. SoftwareDistributionTaskNotificationEvent = A Windows frissités számára fenntartott ideiglenes tárhely sikeresen megtisztítva. TempTaskNotificationEvent = Az ideiglenes fájlok tárolására szolgáló könyvtár tisztítása sikeresen megtörtént. -FolderTaskDescription = A {0} könyvtár tisztítása. +FolderTaskDescription = A {0} könyvtár tisztítása. Az ütemezett feladat csak akkor futtatható, ha "{0}" felhasználó bejelentkezett a rendszerbe. EventViewerCustomViewName = Folyamatok EventViewerCustomViewDescription = Folyamatok létrehozása és parancssor ellenőrző események. RestartWarning = Kérem ne felejtse el újraindítani a számítógépét. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/it-IT/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/it-IT/Sophia.psd1 index f02d662a0..ba78dbb63 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/it-IT/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/it-IT/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Attività pianificate OneDriveUninstalling = Disinstallazione di OneDrive... OneDriveInstalling = Installazione di OneDrive... OneDriveDownloading = Download di OneDrive... -OneDriveWarning = La funzione "{0}" sarà applicata solo se il preset è configurato per rimuovere OneDrive (o se l'app è già stata rimossa), altrimenti la funzionalità di backup per le cartelle "Desktop" e "Pictures" in OneDrive si interromperà. +OneDriveWarning = La funzione "WinPrtScrFolder -Desktop" verrà applicata solo se l'utente ha configurato lo script per rimuovere OneDrive (o se OneDrive è già stato rimosso).\nIn caso contrario, la funzionalità di backup per le cartelle "Desktop" e "Immagini" di OneDrive si interrompe. WindowsFeaturesTitle = Funzionalità di Windows OptionalFeaturesTitle = Caratteristiche opzionali EnableHardwareVT = Abilita virtualizzazione in UEFI. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Volete impostare l'impostazione dell ScheduledTaskPresented = La funzione "{0}" è già stata creata come "{1}". CleanupTaskNotificationTitle = Pulizia di Windows CleanupTaskNotificationEvent = Eseguire l'operazione di pulizia dei file inutilizzati e aggiornamenti di Windows? -CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". -CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. +CleanupTaskDescription = Pulizia di Windows e dei file inutilizzati degli aggiornamenti utilizzando l'app built-in ""pulizia disco". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. +CleanupNotificationTaskDescription = Pop-up promemoria di pulizia dei file inutilizzati e degli aggiornamenti di Windows. L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. SoftwareDistributionTaskNotificationEvent = La cache degli aggiornamenti di Windows cancellata con successo. TempTaskNotificationEvent = I file cartella Temp puliti con successo. -FolderTaskDescription = Pulizia della cartella "{0}". +FolderTaskDescription = Pulizia della cartella "{0}". L'attività pianificata può essere eseguita solo se l'utente "{0}" ha effettuato l'accesso al sistema. EventViewerCustomViewName = Creazione del processo EventViewerCustomViewDescription = Creazione del processi e degli eventi di controllo della riga di comando. RestartWarning = Assicurarsi di riavviare il PC. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pl-PL/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pl-PL/Sophia.psd1 index 90085db23..82dd8b5c8 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pl-PL/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pl-PL/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Zaplanowane zadania OneDriveUninstalling = Odinstalowywanie OneDrive... OneDriveInstalling = Instalowanie OneDrive... OneDriveDownloading = Pobieranie OneDrive... -OneDriveWarning = Funkcja "{0}" zostanie zastosowana tylko wtedy, gdy ustawienie wstępne są skonfigurowane do usunięcia OneDrive (lub aplikacja została już usunięta), w przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Obrazy" w usłudze OneDrive ulegnie awarii. +OneDriveWarning = Funkcja "WinPrtScrFolder -Desktop" zostanie zastosowana tylko wtedy, gdy użytkownik skonfigurował skrypt do usuwania OneDrive (lub OneDrive został już usunięty).\nW przeciwnym razie funkcja tworzenia kopii zapasowych folderów "Pulpit" i "Zdjęcia" w OneDrive zostanie przerwana. WindowsFeaturesTitle = Funkcje Windows OptionalFeaturesTitle = Funkcje opcjonalne EnableHardwareVT = Włącz wirtualizację w UEFI. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Czy chcesz ustawić wydajność graf ScheduledTaskPresented = Funkcja "{0}" została już utworzona jako "{1}". CleanupTaskNotificationTitle = Oczyszczanie system Windows CleanupTaskNotificationEvent = Uruchomić zadanie w celu usunięcia nieużywanych plików i aktualizacji systemu Windows? -CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. -CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. +CleanupTaskDescription = Czyszczenie nieużywanych plików i aktualizacji systemu Windows za pomocą wbudowanej aplikacji do czyszczenia dysku. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. +CleanupNotificationTaskDescription = Powiadomienie przypominające o czyszczeniu nieużywanych plików i aktualizacji systemu Windows. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. SoftwareDistributionTaskNotificationEvent = Pomyślnie usunięto pamięć podręczną aktualizacji systemu Windows. TempTaskNotificationEvent = Folder plików tymczasowych został pomyślnie wyczyszczony. -FolderTaskDescription = Czyszczenie folderu {0}. +FolderTaskDescription = Czyszczenie folderu {0}. Zaplanowane zadanie może zostać uruchomione tylko wtedy, gdy użytkownik "{0}" jest zalogowany do systemu. EventViewerCustomViewName = Tworzenie procesu EventViewerCustomViewDescription = Tworzenie procesu i zdarzeń audytu. RestartWarning = Pamiętaj o ponownym uruchomieniu komputera. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pt-BR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pt-BR/Sophia.psd1 index 50b6d1374..c466b3239 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pt-BR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pt-BR/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Tarefas agendadas OneDriveUninstalling = Desinstalar OneDrive... OneDriveInstalling = Instalar o OneDrive... OneDriveDownloading = Baixando OneDrive... -OneDriveWarning = A função "{0}" será aplicada somente se a predefinição for configurada para remover o OneDrive (ou a aplicação já foi removida), caso contrário a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive quebra. +OneDriveWarning = A função "WinPrtScrFolder -Desktop" será aplicada somente se o usuário tiver configurado o script para remover o OneDrive (ou se o OneDrive já tiver sido removido).\nCaso contrário, a funcionalidade de backup para as pastas "Desktop" e "Pictures" no OneDrive será interrompida. WindowsFeaturesTitle = Recursos do Windows OptionalFeaturesTitle = Recursos opcionais EnableHardwareVT = Habilitar virtualização em UEFI. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Gostaria de definir a configuração ScheduledTaskPresented = A função "{0}" já foi criada como "{1}". CleanupTaskNotificationTitle = Limpeza do Windows CleanupTaskNotificationEvent = Executar tarefa para limpar arquivos e atualizações não utilizados do Windows? -CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. -CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. +CleanupTaskDescription = Limpando o Windows arquivos não utilizados e atualizações usando o aplicativo de limpeza aplicativo de limpeza embutido no disco. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. +CleanupNotificationTaskDescription = Pop-up lembrete de notificação sobre a limpeza do Windows arquivos não utilizados e actualizações. A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. SoftwareDistributionTaskNotificationEvent = O cache de atualização do Windows excluído com sucesso. TempTaskNotificationEvent = Os arquivos da pasta Temp limpos com sucesso. -FolderTaskDescription = A limpeza da pasta "{0}". +FolderTaskDescription = A limpeza da pasta "{0}". A tarefa programada só pode ser executada se o usuário "{0}" estiver conectado ao sistema. EventViewerCustomViewName = Criação de processo EventViewerCustomViewDescription = Criação de processos e eventos de auditoria de linha de comando. RestartWarning = Certifique-se de reiniciar o PC. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/ru-RU/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/ru-RU/Sophia.psd1 index 5e95962bb..60611257e 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/ru-RU/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/ru-RU/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Запланированные за OneDriveUninstalling = Удаление OneDrive... OneDriveInstalling = OneDrive устанавливается... OneDriveDownloading = Скачивается OneDrive... -OneDriveWarning = Функция "{0}" будет применена только в случае, если в пресете настроено удаление OneDrive (или приложение уже удалено), иначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. +OneDriveWarning = Функция "WinPrtScrFolder -Desktop" будет применена только в случае, если пользователь настроил удаление OneDrive (или приложение уже удалено).\nИначе ломается функционал резервного копирования для папок "Рабочий стол" и "Изображения" в OneDrive. WindowsFeaturesTitle = Компоненты Windows OptionalFeaturesTitle = Дополнительные компоненты EnableHardwareVT = Включите виртуализацию в UEFI. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Установить для любо ScheduledTaskPresented = Функция "{0}" уже была создана от имени "{1}". CleanupTaskNotificationTitle = Очистка Windows CleanupTaskNotificationEvent = Запустить задание по очистке неиспользуемых файлов и обновлений Windows? -CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. -CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. +CleanupTaskDescription = Очистка неиспользуемых файлов и обновлений Windows, используя встроенную программу Очистка диска. Задание может быть запущено, только если пользователь {0} вошел в систему. +CleanupNotificationTaskDescription = Всплывающее уведомление с напоминанием об очистке неиспользуемых файлов и обновлений Windows. Задание может быть запущено, только если пользователь {0} вошел в систему. SoftwareDistributionTaskNotificationEvent = Кэш обновлений Windows успешно удален. TempTaskNotificationEvent = Папка временных файлов успешно очищена. -FolderTaskDescription = Очистка папки {0}. +FolderTaskDescription = Очистка папки {0}. Задание может быть запущено, только если пользователь "{1}" вошел в систему. EventViewerCustomViewName = Создание процесса EventViewerCustomViewDescription = События создания нового процесса и аудит командной строки. RestartWarning = Обязательно перезагрузите ваш ПК. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/tr-TR/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/tr-TR/Sophia.psd1 index f32d92954..09c035c42 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/tr-TR/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/tr-TR/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Zamanlanan görevler OneDriveUninstalling = OneDrive kaldırılıyor... OneDriveInstalling = OneDrive kuruluyor... OneDriveDownloading = OneDrive indiriliyor... -OneDriveWarning = "{0}" işlevi yalnızca ön ayar OneDrive'ı kaldıracak şekilde yapılandırılırsa uygulanır (veya uygulama zaten kaldırılmışsa), aksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. +OneDriveWarning = "WinPrtScrFolder -Desktop" işlevi yalnızca kullanıcı OneDrive'ı kaldırmak için komut dosyası yapılandırmışsa (veya OneDrive zaten kaldırılmışsa) uygulanır.\nAksi takdirde OneDrive'daki "Masaüstü" ve "Resimler" klasörleri için yedekleme işlevi bozulur. WindowsFeaturesTitle = Características do Windows OptionalFeaturesTitle = Opsiyonel özellikler EnableHardwareVT = UEFI'dan sanallaştırmayı aktifleştirin. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Seçtiğiniz bir uygulamanın grafik ScheduledTaskPresented = "{0}" işlevi zaten "{1}" olarak oluşturulmuştu. CleanupTaskNotificationTitle = Windows temizliği CleanupTaskNotificationEvent = Windows kullanılmayan dosyaları ve güncellemeleri temizlemek için görev çalıştırılsın mı? -CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. -CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. +CleanupTaskDescription = Kullanılmayan Windows dosyaları ve güncellemeleri yerleşik Disk Temizleme uygulaması ile temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. +CleanupNotificationTaskDescription = Windows kullanılmayan dosyaları ve güncellemeleri temizleme hakkında açılır bildirim hatırlatıcısı. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. SoftwareDistributionTaskNotificationEvent = Windows güncelleme önbelleği başarıyla silindi. TempTaskNotificationEvent = Geçici dosyalar klasörü başarıyla temizlendi. -FolderTaskDescription = "{0}" klasörü temizleniyor. +FolderTaskDescription = "{0}" klasörü temizleniyor. Zamanlanmış görev yalnızca "{0}" kullanıcısı sisteme giriş yaptığında çalıştırılabilir. EventViewerCustomViewName = Süreç Oluşturma EventViewerCustomViewDescription = Süreç oluşturma ve komut satırı denetleme olayları. RestartWarning = Bilgisayarınızı yeniden başlattığınızdan emin olun. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/uk-UA/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/uk-UA/Sophia.psd1 index b6988dc98..ddb0eef7a 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/uk-UA/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/uk-UA/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = Заплановані задачі OneDriveUninstalling = Видалення OneDrive... OneDriveInstalling = OneDrive встановлюється... OneDriveDownloading = Завантажується OneDrive... -OneDriveWarning = Функція "{0}" буде застосована тільки в разі, якщо в пресеті налаштовано видалення OneDrive (або застосунок вже видалено), інакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. +OneDriveWarning = Функція "WinPrtScrFolder -Desktop" буде застосована тільки в разі, якщо користувач налаштував видалення OneDrive (або застосунок уже видалено).\nІнакше ламається функціонал резервного копіювання для папок "Робочий стіл" і "Зображення" в OneDrive. WindowsFeaturesTitle = Компоненти Windows OptionalFeaturesTitle = Додаткові компоненти EnableHardwareVT = Увімкніть віртуалізацію в UEFI. @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = Встановити для будь ScheduledTaskPresented = Функцію "{0}" уже було створено від імені "{1}". CleanupTaskNotificationTitle = Очищення Windows CleanupTaskNotificationEvent = Запустити завдання з очищення невикористовуваних файлів і оновлень Windows? -CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. -CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. +CleanupTaskDescription = Очищення невикористовуваних файлів і оновлень Windows, використовуючи вбудовану програму Очищення диска. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. +CleanupNotificationTaskDescription = Спливаюче повідомлення з нагадуванням про очищення невикористовуваних файлів і оновлень Windows. Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. SoftwareDistributionTaskNotificationEvent = Кеш оновлень Windows успішно видалено. TempTaskNotificationEvent = Папка тимчасових файлів успішно очищена. -FolderTaskDescription = Очищення папки "{0}". +FolderTaskDescription = Очищення папки "{0}". Завдання може бути запущено, тільки якщо користувач "{0}" увійшов у систему. EventViewerCustomViewName = Створення процесу EventViewerCustomViewDescription = Події створення нового процесу і аудит командного рядка. RestartWarning = Обов'язково перезавантажте ваш ПК. diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/zh-CN/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/zh-CN/Sophia.psd1 index 150804032..362db9820 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/zh-CN/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/zh-CN/Sophia.psd1 @@ -21,7 +21,7 @@ ScheduledTasks = 计划任务 OneDriveUninstalling = 卸载OneDrive..... OneDriveInstalling = OneDrive正在安装..... OneDriveDownloading = 正在下载OneDrive..... -OneDriveWarning = 只有当预设被配置为删除OneDrive(或应用程序已经被删除)时,才会应用"{0}"功能,否则OneDrive中 "桌面 "和 "图片 "文件夹的备份功能就会中断。 +OneDriveWarning = "WinPrtScrFolder -Desktop" 功能僅在使用者設定腳本移除 OneDrive (或 OneDrive 已移除) 後才會套用\n否則 OneDrive 中「桌面」和「圖片」資料夾的備份功能會中斷。 WindowsFeaturesTitle = Windows功能 OptionalFeaturesTitle = 可选功能 EnableHardwareVT = UEFI中开启虚拟化。 @@ -38,11 +38,11 @@ GraphicsPerformanceTitle = 是否将所选应用程序的图形 ScheduledTaskPresented = "{0}"函数已经被创建为"{1}"。 CleanupTaskNotificationTitle = Windows清理 CleanupTaskNotificationEvent = 运行任务以清理Windows未使用的文件和更新? -CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。 -CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。 +CleanupTaskDescription = 使用内置磁盘清理工具清理未使用的Windows文件和更新。只有登入使用者"{0}"才能啟動任務。 +CleanupNotificationTaskDescription = 关于清理Windows未使用的文件和更新的弹出通知提醒。只有登入使用者"{0}"才能啟動任務。 SoftwareDistributionTaskNotificationEvent = Windows更新缓存已成功删除。 TempTaskNotificationEvent = 临时文件文件夹已成功清理。 -FolderTaskDescription = "{0}"文件夹清理。 +FolderTaskDescription = "{0}"文件夹清理。只有登入使用者"{0}"才能啟動任務。 EventViewerCustomViewName = 进程创建 EventViewerCustomViewDescription = 进程创建和命令行审核事件。 RestartWarning = 确保重启电脑。 diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 index f7e1ea4e3..045a726cc 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 @@ -178,7 +178,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); if ($PSVersionTable.PSVersion.Major -ne 7) { Write-Information -MessageData "" -InformationAction Continue - Write-Warning -Message $Localization.MicroSoftStorePowerShellWarning + Write-Warning -Message ($Localization.UnsupportedPowerShell -f $PSVersionTable.PSVersion.Major, $PSVersionTable.PSVersion.Minor) Write-Information -MessageData "" -InformationAction Continue Write-Verbose -Message "https://t.me/sophia_chat" -Verbose @@ -730,7 +730,7 @@ public extern static string BrandingFormatString(string sFormat); Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements" -Verbose # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for UWP apps updates Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod @@ -780,7 +780,7 @@ public extern static string BrandingFormatString(string sFormat); Write-Verbose -Message "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements" -Verbose # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for UWP apps updates Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod @@ -1700,7 +1700,7 @@ function ScheduledTasks Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -4303,7 +4303,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4394,7 +4393,6 @@ function Cursors { Write-Warning -Message ($Localization.NoResponse -f "https://github.com") Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -4611,6 +4609,10 @@ function OneDrive $AllUsers ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\Policies\Microsoft\Windows\OneDrive -Name DisableFileSyncNGSC -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\OneDrive -Name DisableFileSyncNGSC -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Uninstall" @@ -4834,7 +4836,6 @@ public static bool MarkFileDelete (string sourcefile) { Write-Warning -Message ($Localization.NoResponse -f "https://oneclient.sfx.ms") Write-Error -Message ($Localization.NoResponse -f "https://oneclient.sfx.ms") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -4890,6 +4891,10 @@ function StorageSense $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\StorageSense -Name AllowStorageSenseGlobal -Type CLEAR + if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy)) { New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -ItemType Directory -Force @@ -4903,7 +4908,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force # Turn on automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 1 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 1 -Force # Run Storage Sense every month New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 30 -Force @@ -4914,7 +4919,7 @@ function StorageSense New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force # Turn off automatic cleaning up temporary system and app files - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 01 -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 04 -PropertyType DWord -Value 0 -Force # Run Storage Sense during low free disk space New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy -Name 2048 -PropertyType DWord -Value 0 -Force @@ -5167,6 +5172,10 @@ function DeliveryOptimization $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization -Name DODownloadMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5219,6 +5228,8 @@ function WindowsManageDefaultPrinter $Enable ) + Set-Policy -Scope User -Path "Software\Microsoft\Windows NT\CurrentVersion\Windows" -Name LegacyDefaultPrinterMode -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -5515,7 +5526,7 @@ function WindowsFeatures Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5768,7 +5779,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -5829,7 +5839,6 @@ function WindowsCapabilities { Write-Warning -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") Write-Error -Message ($Localization.NoResponse -f "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -5872,7 +5881,7 @@ function WindowsCapabilities Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -5937,18 +5946,19 @@ function UpdateMicrosoftProducts $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AllowMUUpdateService -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" { - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force } "Disable" { - 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") - } + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -Force -ErrorAction Ignore } } } @@ -5991,6 +6001,10 @@ function RestartNotification $Hide ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAutoRestartNotificationDisable -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Show" @@ -6042,6 +6056,12 @@ function RestartDeviceAfterUpdate $Disable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Enable" @@ -6093,6 +6113,16 @@ function ActiveHours $Manually ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers, AlwaysAutoRebootAtScheduledTime -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name NoAutoRebootWithLoggedOnUsers -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name AlwaysAutoRebootAtScheduledTime -Type CLEAR + + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd, ActiveHoursStart, SetActiveHours -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursEnd -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name ActiveHoursStart -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetActiveHours -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -6144,6 +6174,11 @@ function WindowsLatestUpdate $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent, SetAllowOptionalContent -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name AllowOptionalContent -Type CLEAR + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name SetAllowOptionalContent -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -6198,6 +6233,10 @@ function PowerPlan $Balanced ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Power\PowerSettings -Name ActivePowerScheme -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "High" @@ -7371,66 +7410,77 @@ function WinPrtScrFolder $Default ) - # Checking whether user is logged into OneDrive (Microsoft account) - $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore - if ($UserEmail) - { - Write-Information -MessageData "" -InformationAction Continue - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose - Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - return - } - switch ($PSCmdlet.ParameterSetName) { "Desktop" { - # Check how the script was invoked: via a preset or Function.ps1 - # $_.File has no EndsWith() method - $PresetName = ((Get-PSCallStack).Position | Where-Object -FilterScript {($_.Text -eq "WinPrtScrFolder -Desktop") -or ($_.Text -match "Invoke-Expression")}).File | Where-Object -FilterScript {$_.EndsWith(".ps1") -and ($_ -notmatch "Functions.ps1")} - if ($PresetName) + # Checking whether user is logged into OneDrive (Microsoft account) + $UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore + if ($UserEmail) { - # Checking whether a preset contains the "OneDrive -Uninstall" string uncommented out - if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) - { - # The string exists and is commented - $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false - } - else - { - # The string doesn't exist - $IsOneDriveToUninstall = $false - } + Write-Information -MessageData "" -InformationAction Continue + Write-Warning -Message $Localization.OneDriveWarning + Write-Error -Message $Localization.OneDriveWarning -ErrorAction SilentlyContinue - $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore - if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + return + } + + # Checking how the script was invoked: via a preset or Functions.ps1 + # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-variable + # This function works only if OneDrive was already uninstalled, or user is intended to uninstall "OneDrive -Uninstall" within commandline + $PresetName = (Get-Variable -Name MyInvocation -Scope Script).Value.PSCommandPath + $PSCallStack = (Get-PSCallStack).Position.Text + $OneDriveInstalled = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore + + # Checking whether function was called from Functions.ps1 + if ($PresetName -match "Functions.ps1") + { + # Checking whether command contains "WinPrtScrFolder -Desktop" + if ($PSCallStack -match "WinPrtScrFolder -Desktop") { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether other commands contains "OneDrive -Uninstall" which means that user is intended to uninstall "OneDrive -Uninstall", or OneDrive was uinstalled + if (($PSCallStack -match "OneDrive -Uninstall") -or (-not $OneDriveInstalled)) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } else { - # A preset file isn't taking a part so we ignore it and check only whether OneDrive was already uninstalled - if (-not (Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -Force -ErrorAction Ignore)) - { - $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop - New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force - } - else + # Checking whether function was called from Sophia.ps1, and preset contains the "OneDrive -Uninstall" string is uncommented that means OneDrive will be unistalled + if (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch) { - Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) - Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + # Checking whether string exists and is uncommented + $IsOneDriveToUninstall = (Select-String -Path $PresetName -Pattern "OneDrive -Uninstall" -SimpleMatch).Line.StartsWith("#") -eq $false + # Checking whether string exists and is uncommented, or OneDrive was uninstalled, or user called "OneDrive -Uninstall" from Sophia.ps1 alongside with "WinPrtScrFolder -Desktop" + if ($IsOneDriveToUninstall -or (-not $OneDriveInstalled) -or ($PSCallStack -match "OneDrive -Uninstall")) + { + $DesktopFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name Desktop + New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B7BEDE81-DF94-4682-A7D8-57A52620B86F}" -PropertyType ExpandString -Value $DesktopFolder -Force + } + else + { + Write-Warning -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) + Write-Error -Message ($Localization.OneDriveWarning -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + + Write-Information -MessageData "" -InformationAction Continue + Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue + } } } } @@ -7482,6 +7532,19 @@ function RecommendedTroubleshooting $Default ) + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -Force -ErrorAction Ignore + Remove-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -Force -ErrorAction Ignore + + Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR + + # Turn on Windows Error Reporting + Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore + + Get-Service -Name WerSvc | Set-Service -StartupType Manual + Get-Service -Name WerSvc | Start-Service + switch ($PSCmdlet.ParameterSetName) { "Automatically" @@ -7491,24 +7554,6 @@ function RecommendedTroubleshooting New-Item -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Force } New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsMitigation -Name UserPreference -PropertyType DWord -Value 3 -Force - - # Set Windows level of diagnostic data gathering to "Optional diagnostic data" - if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack)) - { - New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Force - } - New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force - New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force - - Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWORD -Value 3 - - # Turn on Windows Error Reporting - Get-ScheduledTask -TaskName QueueReporting -ErrorAction Ignore | Enable-ScheduledTask - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction Ignore - - Get-Service -Name WerSvc | Set-Service -StartupType Manual - Get-Service -Name WerSvc | Start-Service } "Default" { @@ -7620,6 +7665,7 @@ function ReservedStorage } catch [System.Runtime.InteropServices.COMException] { + Write-Warning -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) Write-Error -Message ($Localization.ReservedStorageIsInUse -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } @@ -7774,6 +7820,8 @@ function CapsLock $Enable ) + Remove-ItemProperty -Path HKCU:\Keyboard Layout -Name Attributes -Force -ErrorAction Ignore + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -7876,6 +7924,11 @@ function Autoplay $Enable ) + # Remove all policies in order to make changes visible in UI only if it's possible + Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer, HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Force -ErrorAction Ignore + Set-Policy -Scope Computer -Path SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + Set-Policy -Scope User -Path Software\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name NoDriveTypeAutoRun -Type CLEAR + switch ($PSCmdlet.ParameterSetName) { "Disable" @@ -8977,7 +9030,7 @@ public static void Refresh() Associations will be exported as Application_Associations.json file in script root folder .NOTES - Import exported JSON file after a clean installation. You have to install all apps according to an exported JSON file to restore all associations + You need to install all apps according to an exported JSON file to restore all associations .NOTES Machine-wide @@ -9155,11 +9208,8 @@ function Export-Associations .SYNOPSIS Import all Windows associations - .PARAMETER Path - Import all Windows associations from a JSON file - .EXAMPLE - Export-Associations -Path D:\ + Import-Associations .NOTES You have to install all apps according to an exported JSON file to restore all associations @@ -9431,10 +9481,10 @@ function InstallVCRedist <# .SYNOPSIS - Install the latest .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 .EXAMPLE - InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 + InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 .LINK https://dotnet.microsoft.com/en-us/download/dotnet @@ -9451,7 +9501,7 @@ function InstallDotNetRuntimes Mandatory = $true, ParameterSetName = "Runtimes" )] - [ValidateSet("NET6x64", "NET8x64")] + [ValidateSet("NET8x64", "NET9x64")] [string[]] $Runtimes ) @@ -9462,18 +9512,18 @@ function InstallDotNetRuntimes { switch ($Runtime) { - NET6x64 + NET8x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET6Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -9484,27 +9534,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 6 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 8 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET6Version has only three, unless the [System.Version] accelerator fails - $dotnet6Version = (Get-Item -Path "$env:ProgramData\Package Cache\{9d3fc73f-1cf4-412c-a1c9-d2ad28ccbd62}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet6Version = "{0}.{1}.{2}" -f $dotnet6Version.Split(".") + # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails + $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") } else { - $dotnet6Version = "0.0" + $dotnet8Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 6 is not installed at all - if (([System.Version]$NET6Version -gt [System.Version]$dotnet6Version) -or ($dotnet6Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all + if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) { try { - # Downloading .NET Desktop Runtime 6 x64 + # .NET Desktop Runtime 8 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET6Version/dotnet-runtime-$NET6Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -9520,15 +9570,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET6Version" -Verbose + Write-Verbose -Message ".NET $NET8Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET6Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -9540,18 +9590,18 @@ function InstallDotNetRuntimes Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue } } - NET8x64 + NET9x64 { try { # Get latest build version # https://github.com/dotnet/core/blob/main/release-notes/releases-index.json $Parameters = @{ - Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json" + Uri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/9.0/releases.json" Verbose = $true UseBasicParsing = $true } - $NET8Version = (Invoke-RestMethod @Parameters)."latest-release" + $NET9Version = (Invoke-RestMethod @Parameters)."latest-release" } catch [System.Net.WebException] { @@ -9562,27 +9612,27 @@ function InstallDotNetRuntimes return } - # Checking whether .NET 8 installed - if (Test-Path -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe") + # Checking whether .NET 9 installed + if (Test-Path -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe") { - # FileVersion has four properties while $NET8Version has only three, unless the [System.Version] accelerator fails - $dotnet8Version = (Get-Item -Path "$env:ProgramData\Package Cache\{e883dae5-a63d-4a45-afb9-257f64d5a59b}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion - $dotnet8Version = "{0}.{1}.{2}" -f $dotnet8Version.Split(".") + # FileVersion has four properties while $NET9Version has only three, unless the [System.Version] accelerator fails + $dotnet9Version = (Get-Item -Path "$env:ProgramData\Package Cache\{72922c3b-f4df-4f93-9e3b-5b9c8a5ffb42}\dotnet-runtime-*-win-x64.exe").VersionInfo.FileVersion + $dotnet9Version = "{0}.{1}.{2}" -f $dotnet9Version.Split(".") } else { - $dotnet8Version = "0.0" + $dotnet9Version = "0.0" } - # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 8 is not installed at all - if (([System.Version]$NET8Version -gt [System.Version]$dotnet8Version) -or ($dotnet8Version -eq "0.0")) + # Proceed if currently installed build is lower than available from Microsoft or json file is unreachable, or .NET 9 is not installed at all + if (([System.Version]$NET9Version -gt [System.Version]$dotnet9Version) -or ($dotnet9Version -eq "0.0")) { try { - # .NET Desktop Runtime 8 x64 + # Downloading .NET Desktop Runtime 9 x64 $Parameters = @{ - Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET8Version/dotnet-runtime-$NET8Version-win-x64.exe" - OutFile = "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" + Uri = "https://dotnetcli.azureedge.net/dotnet/Runtime/$NET9Version/dotnet-runtime-$NET9Version-win-x64.exe" + OutFile = "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" UseBasicParsing = $true Verbose = $true } @@ -9598,15 +9648,15 @@ function InstallDotNetRuntimes } Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ".NET $NET8Version" -Verbose + Write-Verbose -Message ".NET $NET9Version" -Verbose Write-Information -MessageData "" -InformationAction Continue - Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait + Start-Process -FilePath "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe" -ArgumentList "/install /passive /norestart" -Wait # PowerShell 5.1 (7.5 too) interprets 8.3 file name literally, if an environment variable contains a non-Latin word # https://github.com/PowerShell/PowerShell/issues/21070 $Paths = @( - "$DownloadsFolder\dotnet-runtime-$NET8Version-win-x64.exe", + "$DownloadsFolder\dotnet-runtime-$NET9Version-win-x64.exe", "$env:TEMP\Microsoft_.NET_Runtime*.log" ) Get-ChildItem -Path $Paths -Force -ErrorAction Ignore | Remove-Item -Force -ErrorAction Ignore @@ -9812,57 +9862,6 @@ function PreventEdgeShortcutCreation } } -<# - .SYNOPSIS - Internal SATA drives up as removeable media in the taskbar notification area - - .PARAMETER Disable - Prevent all internal SATA drives from showing up as removable media in the taskbar notification area - - .PARAMETER Default - Show up all internal SATA drives as removeable media in the taskbar notification area - - .EXAMPLE - SATADrivesRemovableMedia -Disable - - .EXAMPLE - SATADrivesRemovableMedia -Default - - .NOTES - Machine-wide -#> -function SATADrivesRemovableMedia -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Default" - )] - [switch] - $Default - ) - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Type MultiString -Value @(0, 1, 2, 3, 4, 5) -Force - } - "Default" - { - Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device -Name TreatAsInternalPort -Force -ErrorAction Ignore - } - } -} - <# .SYNOPSIS Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups @@ -9954,7 +9953,6 @@ function Install-WSL { Write-Warning -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") Write-Error -Message ($Localization.NoResponse -f "https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json") -ErrorAction SilentlyContinue - Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return @@ -10032,7 +10030,7 @@ function Install-WSL $Form.Close() # Receive updates for other Microsoft products when you update Windows - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name AllowMUUpdateService -PropertyType DWord -Value 1 -Force # Check for updates Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan @@ -10063,7 +10061,7 @@ function Install-WSL Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -10646,7 +10644,7 @@ function UninstallUWPApps Add-Type -AssemblyName System.Windows.Forms # We cannot use Get-Process -Id $PID as script might be invoked via Terminal with different $PID - Get-Process | Where-Object -FilterScript {(($_.ProcessName -eq "powershell") -or ($_.ProcessName -eq "WindowsTerminal")) -and ($_.MainWindowTitle -match "Sophia Script for Windows 11")} | ForEach-Object -Process { + Get-Process -Name powershell, WindowsTerminal -ErrorAction Ignore | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows 11"} | ForEach-Object -Process { # Show window, if minimized [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 10) @@ -10737,66 +10735,6 @@ function CortanaAutostart } } } - -<# - .SYNOPSIS - Microsoft Teams autostarting - - .PARAMETER Disable - Enable Teams autostarting - - .PARAMETER Enable - Disable Teams autostarting - - .EXAMPLE - TeamsAutostart -Disable - - .EXAMPLE - TeamsAutostart -Enable - - .NOTES - Current user -#> -function TeamsAutostart -{ - param - ( - [Parameter( - Mandatory = $true, - ParameterSetName = "Disable" - )] - [switch] - $Disable, - - [Parameter( - Mandatory = $true, - ParameterSetName = "Enable" - )] - [switch] - $Enable - ) - - if (-not (Get-AppxPackage -Name MSTeams)) - { - Write-Information -MessageData "" -InformationAction Continue - Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose - Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue - - return - } - - switch ($PSCmdlet.ParameterSetName) - { - "Disable" - { - New-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask" -Name State -PropertyType DWord -Value 1 -Force - } - "Enable" - { - New-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask" -Name State -PropertyType DWord -Value 2 -Force - } - } -} #endregion UWP apps #region Gaming @@ -11281,7 +11219,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro TaskPath = "Sophia" Principal = $Principal Action = $Action - Description = $Localization.CleanupTaskDescription + Description = $Localization.CleanupTaskDescription -f $env:USERNAME Settings = $Settings } Register-ScheduledTask @Parameters -Force @@ -11441,7 +11379,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.CleanupNotificationTaskDescription + Description = $Localization.CleanupNotificationTaskDescription -f $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -11459,7 +11397,8 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro $Paths = @( "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.vbs", "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup_Notification.ps1", - "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1" + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.ps1", + "$env:SystemRoot\System32\Tasks\Sophia\Windows_Cleanup.vbs" ) Remove-Item -Path $Paths -Force -ErrorAction Ignore @@ -11790,7 +11729,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download" + Description = $Localization.FolderTaskDescription -f "%SystemRoot%\SoftwareDistribution\Download", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -12075,6 +12014,9 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_ `$Paths = @( # Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent (-join ("`$env:SystemDrive\", '`$WinREAgent')), + (-join ("`$env:SystemDrive\", '`$SysReset')), + (-join ("`$env:SystemDrive\", '`$Windows.~WS')), + "`$env:SystemDrive\ESD", "`$env:SystemDrive\Intel", "`$env:SystemDrive\PerfLogs" ) @@ -12139,7 +12081,7 @@ CreateObject("Wscript.Shell").Run "powershell.exe -ExecutionPolicy Bypass -NoPro Settings = $Settings Principal = $Principal Trigger = $Trigger - Description = $Localization.FolderTaskDescription -f "%TEMP%" + Description = $Localization.FolderTaskDescription -f "%TEMP%", $env:USERNAME } Register-ScheduledTask @Parameters -Force @@ -12232,6 +12174,7 @@ function NetworkProtection { Write-Information -MessageData "" -InformationAction Continue Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose + Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue return } diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 index e1603f3a0..1621269cc 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 @@ -957,12 +957,12 @@ DefaultTerminalApp -WindowsTerminal InstallVCRedist <# - Install the latest .NET Desktop Runtime 6, 8 x64 - Установить последнюю версию .NET Desktop Runtime 6, 8 x64 + Install the latest .NET Desktop Runtime 8, 9 x64 + Установить последнюю версию .NET Desktop Runtime 8, 9 x64 https://dotnet.microsoft.com/en-us/download/dotnet #> -InstallDotNetRuntimes -Runtimes NET6x64, NET8x64 +InstallDotNetRuntimes -Runtimes NET8x64, NET9x64 # Enable proxying only blocked sites from the unified registry of Roskomnadzor. The function is applicable for Russia only # Включить проксирование только заблокированных сайтов из единого реестра Роскомнадзора. Функция применима только для России @@ -982,14 +982,6 @@ PreventEdgeShortcutCreation -Channels Stable, Beta, Dev, Canary # Не предотвращать создание ярлыков на рабочем столе при обновлении Microsoft Edge (значение по умолчанию) # PreventEdgeShortcutCreation -Disable -# Prevent all internal SATA drives from showing up as removable media in the taskbar notification area -# Запретить отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач -SATADrivesRemovableMedia -Disable - -# Show up all internal SATA drives as removeable media in the taskbar notification area (default value) -# Отображать все внутренние SATA-диски как съемные носители в области уведомлений на панели задач (значение по умолчанию) -# SATADrivesRemovableMedia -Default - # Back up the system registry to %SystemRoot%\System32\config\RegBack folder when PC restarts and create a RegIdleBackup in the Task Scheduler task to manage subsequent backups # Создавать копии реестра при перезагрузки ПК и создавать задание RegIdleBackup в Планировщике задания для управления последующими резервными копиями # RegistryBackup -Enable @@ -1045,14 +1037,6 @@ CortanaAutostart -Disable # Enable Cortana autostarting (default value) # Включить автозагрузку Кортана (значение по умолчанию) # CortanaAutostart -Enable - -# Disable Microsoft Teams autostarting -# Выключить автозагрузку Microsoft Teams -TeamsAutostart -Disable - -# Enable Microsoft Teams autostarting (default value) -# Включить автозагрузку Microsoft Teams (значение по умолчанию) -# TeamsAutostart -Enable #endregion UWP apps #region Gaming