Permalink
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also .
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
- 13 commits
- 11 files changed
- 0 comments
- 1 contributor
Commits on Oct 09, 2020
Unified
Split
Showing
with
574 additions
and 396 deletions.
- 0 { → 4.x (outdated)}/190x/1903-1909.cmd
- +1 −1 { → 4.x (outdated)}/190x/1903-1909.ps1
- 0 { → 4.x (outdated)}/200x/2004.cmd
- +1 −1 { → 4.x (outdated)}/200x/2004.ps1
- +16 −5 README.md
- +11 −6 Sophia/Sophia.ps1
- BIN Sophia/Sophia.psd1
- +13 −41 Sophia/Sophia.psm1
- +178 −0 Sophia/de-DE/Sophia.psd1
- +177 −171 Sophia/en-US/Sophia.psd1
- +177 −171 Sophia/ru-RU/Sophia.psd1
File renamed without changes.
| @@ -3518,4 +3518,4 @@ if ($Error) | ||
| } | ||
| } | ||
| } | Sort-Object -Property Line | Format-Table -AutoSize -Wrap | Out-String).Trim() | ||
| } | ||
| } | ||
File renamed without changes.
| @@ -3588,4 +3588,4 @@ if ($Error) | ||
| } | ||
| } | ||
| } | Sort-Object -Property Line | Format-Table -AutoSize -Wrap | Out-String).Trim() | ||
| } | ||
| } | ||
| @@ -1,7 +1,7 @@ | ||
| <div align="center"> | ||
| <h1>Windows 10 Sophia Script</h1> | ||
|
|
||
| **"Windows 10 Sophia Script" is a set of functions for Windows 10 fine-tuning and automating the routine tasks** 🏆 | ||
| **"Windows 10 Sophia Script" is a module for Windows 10 fine-tuning and automating the routine tasks** 🏆 | ||
|
|
||
| [](https://www.codacy.com/manual/farag2/Windows-10-Sophia-Script) | ||
|  | ||
| @@ -15,7 +15,7 @@ | ||
| ## ⚠️ Before running ⚠️ | ||
|
|
||
| * Due to the fact that the script includes more than **270** functions, you must read the entire **preset file** carefully and **comment out/uncomment** those functions that you do/do not want to be executed. Every tweak in a preset file has its' corresponding function to **restore the default settings**. | ||
| * Running the script is best done on a fresh install because running it on tweaked system may result in errors occurring. | ||
| * Running the script is best done on a fresh install because running it on **wrong** tweaked system may result in errors occurring. | ||
| * Some third-party antiviruses flag this script or its' part as malicious one. This is a false positive due to [$EncodedScript](https://github.com/farag2/Windows-10-Sophia-Script/blob/0f9bbee7e1d43f487eb0855e0d1e44ff569fc4a9/200x/2004.ps1#L2837) variable. You can read more about in "CreateCleanUpTask" function. You might need to disable tamper protection from your antivirus settings, re-enable it after running the script, and reboot. | ||
|
|
||
| ## Screenshots | ||
| @@ -85,17 +85,28 @@ To run the script: | ||
| * Type | ||
|
|
||
| ``` | ||
| .\Preset.ps1 | ||
| .\Sophia.ps1 | ||
| ``` | ||
|
|
||
| * Press Enter | ||
|
|
||
| ## How to translate | ||
|
|
||
| * Get your OS UI culture by | ||
|
|
||
| ```powershell | ||
| $PSUICulture | ||
| ``` | ||
|
|
||
| * Create a folder with the UI culture name; | ||
| * Place your localized Sophia.psd1 file into this folder | ||
|
|
||
| ## Supported Windows 10 versions | ||
|
|
||
| |Version|Code name| Marketing name |Build | Arch | Editions | Script version | | ||
| |:-----:|:-------:|:------------------:|:----:|:----:|:-----------------:|:--------------:| | ||
| | 2009 | 20H2 |October 2020 Update |19042 | x64 |Home/Pro/Enterprise|[5.0.1](https://github.com/farag2/Windows-10-Sophia-Script/tree/master/Sophia)| | ||
| | 2004 | 20H1 | May 2020 Update |19041 | x64 |Home/Pro/Enterprise|[5.0.1](https://github.com/farag2/Windows-10-Sophia-Script/tree/master/Sophia)| | ||
| | 2009 | 20H2 |October 2020 Update |19042 | x64 |Home/Pro/Enterprise|[5.1](https://github.com/farag2/Windows-10-Sophia-Script/tree/master/Sophia)| | ||
| | 2004 | 20H1 | May 2020 Update |19041 | x64 |Home/Pro/Enterprise|[5.1](https://github.com/farag2/Windows-10-Sophia-Script/tree/master/Sophia)| | ||
| | 1909 | 19H2 |November 2019 Update|18363 | x64 |Home/Pro/Enterprise|[4.5](https://github.com/farag2/Windows-10-Sophia-Script/tree/master/190x)| | ||
| | 1903 | 19H1 | May 2019 Update |18362 | x64 |Home/Pro/Enterprise|[4.5](https://github.com/farag2/Windows-10-Sophia-Script/tree/master/190x)| | ||
| | 1809 | |LTSC Enterprise 2019|17763 | x64 | Enterprise |[4.5](https://github.com/farag2/Windows-10-Sophia-Script/tree/master/LTSC)| | ||
| @@ -2,8 +2,8 @@ | ||
| .SYNOPSIS | ||
| Default preset file for "Windows 10 Sophia Script" | ||
| Version: v5.1 | ||
| Date: 05.10.2020 | ||
| Version: v5.1.1 | ||
| Date: 09.10.2020 | ||
| Copyright (c) 2020 farag & oZ-Zo | ||
| Thanks to all http://forum.ru-board.com members involved | ||
| @@ -15,7 +15,7 @@ | ||
| and comment out/uncomment those functions that you do/do not want to be executed | ||
| Every tweak in a preset file has its' corresponding function to restore the default settings | ||
| Running the script is best done on a fresh install because running it on tweaked system may result in errors occurring | ||
| Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring | ||
| PowerShell must be run with elevated privileges | ||
| Set execution policy to be able to run scripts only in the current PowerShell session: | ||
| @@ -34,8 +34,13 @@ | ||
| https://github.com/farag2/Windows-10-Sophia-Script | ||
| #> | ||
|
|
||
| #Requires -RunAsAdministrator | ||
| #Requires -Version 5.1 | ||
|
|
||
| Clear-Host | ||
|
|
||
| Remove-Module -Name Sophia -Force -ErrorAction Ignore | ||
| Import-Module -Name .\Sophia.psm1 -Force | ||
| Import-Module -Name .\Sophia.psd1 -PassThru -Force | ||
|
|
||
| Import-LocalizedData -BindingVariable Global:Localization | ||
|
|
||
| @@ -492,11 +497,11 @@ SetTempPath | ||
|
|
||
| # Enable Windows 260 character path limit | ||
| # Включить ограничение Windows на 260 символов в пути | ||
| # EnableWin32LongPaths | ||
| EnableWin32LongPaths | ||
|
|
||
| # Disable Windows 260 character path limit | ||
| # Отключить ограничение Windows на 260 символов в пути | ||
| DisableWin32LongPaths | ||
| # DisableWin32LongPaths | ||
|
|
||
| # Display the Stop error information on the BSoD | ||
| # Отображать Stop-ошибку при появлении BSoD | ||
Binary file not shown.
| @@ -2,8 +2,8 @@ | ||
| .SYNOPSIS | ||
| "Windows 10 Sophia Script" is a set of functions for Windows 10 fine-tuning and automating the routine tasks | ||
| Version: v5.1 | ||
| Date: 08.10.2020 | ||
| Version: v5.1.1 | ||
| Date: 09.10.2020 | ||
| Copyright (c) 2020 farag & oZ-Zo | ||
| Thanks to all http://forum.ru-board.com members involved | ||
| @@ -37,11 +37,6 @@ | ||
| #region Check | ||
| function Check | ||
| { | ||
| #Requires -RunAsAdministrator | ||
| #Requires -Version 5.1 | ||
|
|
||
| Clear-Host | ||
|
|
||
| Set-StrictMode -Version Latest | ||
|
|
||
| # Сlear the $Error variable | ||
| @@ -57,7 +52,6 @@ function Check | ||
| Write-Warning -Message $Localization.UnsupportedOSBitness | ||
| break | ||
| } | ||
| Default {} | ||
| } | ||
|
|
||
| # Turn off Controlled folder access to let the script proceed | ||
| @@ -73,7 +67,6 @@ function Check | ||
| # Открыть раздел "Защита от программ-шатажистов" | ||
| Start-Process -FilePath windowsdefender://RansomwareProtection | ||
| } | ||
| Default {} | ||
| } | ||
| } | ||
| #endregion Check | ||
| @@ -146,6 +139,7 @@ function DisableWindowsErrorReporting | ||
| { | ||
| if ((Get-WindowsEdition -Online).Edition -notmatch "Core*") | ||
| { | ||
| Get-ScheduledTask -TaskName QueueReporting | Disable-ScheduledTask | ||
| New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name Disabled -PropertyType DWord -Value 1 -Force | ||
| } | ||
| } | ||
| @@ -154,6 +148,7 @@ function DisableWindowsErrorReporting | ||
| # Включить отчеты об ошибках Windows для текущего пользователя | ||
| function EnableWindowsErrorReporting | ||
| { | ||
| Get-ScheduledTask -TaskName QueueReporting | Enable-ScheduledTask | ||
| Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction SilentlyContinue | ||
| } | ||
|
|
||
| @@ -228,10 +223,6 @@ function DisableScheduledTasks | ||
| # Синхронизирует последние параметры со службой функций семьи учетных записей Майкрософт | ||
| "FamilySafetyRefreshTask", | ||
|
|
||
| # Windows Error Reporting task to process queued reports | ||
| # Задача отчетов об ошибках обрабатывает очередь отчетов | ||
| "QueueReporting", | ||
|
|
||
| # XblGameSave Standby Task | ||
| "XblGameSaveTask" | ||
| ) | ||
| @@ -300,10 +291,6 @@ function EnableScheduledTasks | ||
| # Синхронизирует последние параметры со службой функций семьи учетных записей Майкрософт | ||
| "FamilySafetyRefreshTask", | ||
|
|
||
| # Windows Error Reporting task to process queued reports | ||
| # Задача отчетов об ошибках обрабатывает очередь отчетов | ||
| "QueueReporting", | ||
|
|
||
| # XblGameSave Standby Task | ||
| "XblGameSaveTask" | ||
| ) | ||
| @@ -1485,8 +1472,8 @@ function SetDefaultTempPath | ||
| # Перезапустить службу "Диспетчер печати" (Spooler) | ||
| Restart-Service -Name Spooler -Force | ||
|
|
||
| Stop-Process -Name OneDrive -Force -ErrorAction SilentlyContinue | ||
| Stop-Process -Name FileCoAuth -Force -ErrorAction SilentlyContinue | ||
| Stop-Process -Name OneDrive -Force -ErrorAction Ignore | ||
| Stop-Process -Name FileCoAuth -Force -ErrorAction Ignore | ||
|
|
||
| Remove-Item -Path $env:SystemDrive\Temp -Recurse -Force -ErrorAction Ignore | ||
| } | ||
| @@ -4129,30 +4116,15 @@ $app = "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\cleanmgr.exe" | ||
| $Template = [Windows.UI.Notifications.ToastTemplateType]::ToastImageAndText01 | ||
| [xml]$ToastTemplate = ([Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent($Template).GetXml()) | ||
| if ($PSUICulture -eq "ru-RU") | ||
| { | ||
| [xml]$ToastTemplate = @" | ||
| [xml]$ToastTemplate = @" | ||
| <toast launch="app-defined-string"> | ||
| <visual> | ||
| <binding template="ToastGeneric"> | ||
| <text>Очистка неиспользуемых файлов и обновлений Windows начнется через минуту</text> | ||
| <text>$($Localization.CleanUpTaskToast)</text> | ||
| </binding> | ||
| </visual> | ||
| </toast> | ||
| "@ | ||
| } | ||
| else | ||
| { | ||
| [xml]$ToastTemplate = @" | ||
| <toast launch="app-defined-string"> | ||
| <visual> | ||
| <binding template="ToastGeneric"> | ||
| <text>Cleaning up unused Windows files and updates starts in a minute</text> | ||
| </binding> | ||
| </visual> | ||
| </toast> | ||
| "@ | ||
| } | ||
| $ToastXml = New-Object -TypeName Windows.Data.Xml.Dom.XmlDocument | ||
| $ToastXml.LoadXml($ToastTemplate.OuterXml) | ||
| @@ -4388,8 +4360,8 @@ function RemoveProtectedFolders | ||
| if ($null -ne (Get-MpPreference).ControlledFolderAccessProtectedFolders) | ||
| { | ||
| Write-Verbose -Message $Localization.RemoveProtectedFoldersList -Verbose | ||
| Remove-MpPreference -ControlledFolderAccessProtectedFolders (Get-MpPreference).ControlledFolderAccessProtectedFolders -Force | ||
| (Get-MpPreference).ControlledFolderAccessProtectedFolders | Format-Table -AutoSize -Wrap | ||
| Remove-MpPreference -ControlledFolderAccessProtectedFolders (Get-MpPreference).ControlledFolderAccessProtectedFolders -Force | ||
| } | ||
| } | ||
|
|
||
| @@ -4498,8 +4470,8 @@ function RemoveDefenderExclusionFolders | ||
| { | ||
| if ($null -ne (Get-MpPreference).ExclusionPath) | ||
| { | ||
| Write-Verbose -Message "Removed excluded folders:" -Verbose | ||
| $ExcludedFolders = (Get-Item -Path (Get-MpPreference).ExclusionPath -Force | Where-Object -FilterScript {$_.Attributes -match "Directory"}).FullName | ||
| Write-Verbose -Message $Localization.RemoveDefenderExclusionFoldersList -Verbose | ||
| $ExcludedFolders = (Get-Item -Path (Get-MpPreference).ExclusionPath -Force -ErrorAction Ignore | Where-Object -FilterScript {$_.Attributes -match "Directory"}).FullName | ||
| $ExcludedFolders | Format-Table -AutoSize -Wrap | ||
| Remove-MpPreference -ExclusionPath $ExcludedFolders -Force | ||
| } | ||
| @@ -4555,8 +4527,8 @@ function RemoveDefenderExclusionFiles | ||
| { | ||
| if ($null -ne (Get-MpPreference).ExclusionPath) | ||
| { | ||
| Write-Verbose -Message "Removed excluded files:" -Verbose | ||
| $ExcludedFiles = (Get-Item -Path (Get-MpPreference).ExclusionPath -Force | Where-Object -FilterScript {$_.Attributes -notmatch "Directory"}).FullName | ||
| Write-Verbose -Message $Localization.RemoveDefenderExclusionFilesList -Verbose | ||
| $ExcludedFiles = (Get-Item -Path (Get-MpPreference).ExclusionPath -Force -ErrorAction Ignore | Where-Object -FilterScript {$_.Attributes -notmatch "Directory"}).FullName | ||
| $ExcludedFiles | Format-Table -AutoSize -Wrap | ||
| Remove-MpPreference -ExclusionPath $ExcludedFiles -Force | ||
| } | ||
Oops, something went wrong.