From dbc7301d5b4ca6caee47676536167e1fe49326a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pl=C3=ADnio=20Larrubia?= Date: Sun, 17 Jul 2022 19:45:08 -0300 Subject: [PATCH] Move most src/utils scripts to individual-tweaks.psm1 - Updated references to non pt-br (hehe) - Future toogleable tweaks should go inside individual-tweaks - Merging all to one file should save time - Use more suggestive function names --- Win10ScriptCLI.ps1 | 46 ++--- Win10ScriptGUI.ps1 | 127 ++++++------ src/scripts/install-package-managers.ps1 | 2 +- src/scripts/optimize-performance.ps1 | 10 +- src/scripts/optimize-privacy.ps1 | 38 ++-- src/scripts/optimize-security.ps1 | 2 +- src/scripts/optimize-task-scheduler.ps1 | 2 +- src/scripts/personal-tweaks.ps1 | 14 +- src/utils/disable-activity-history.reg | 6 - src/utils/disable-bg-apps.reg | 7 - src/utils/disable-clipboard-history.reg | 7 - src/utils/disable-cortana.reg | Bin 510 -> 0 bytes src/utils/disable-encrypted-dns-doh.ps1 | 11 -- src/utils/disable-game-bar-dvr.reg | 13 -- src/utils/disable-god-mode.ps1 | 24 --- src/utils/disable-old-volume-control.reg | 4 - src/utils/disable-shutdown-pc-shortcut.ps1 | 11 -- src/utils/disable-telemetry.reg | 8 - src/utils/disable-wsearch-service.ps1 | 9 - src/utils/enable-activity-history.reg | 6 - src/utils/enable-bg-apps.reg | 7 - src/utils/enable-clipboard-history.reg | 7 - src/utils/enable-cortana.reg | Bin 510 -> 0 bytes src/utils/enable-encrypted-dns-doh.ps1 | 15 -- src/utils/enable-game-bar-dvr.reg | 13 -- src/utils/enable-god-mode.ps1 | 24 --- src/utils/enable-old-volume-control.reg | 4 - src/utils/enable-shutdown-pc-shortcut.ps1 | 18 -- src/utils/enable-telemetry.reg | 8 - src/utils/enable-wsearch-service.ps1 | 9 - src/utils/individual-tweaks.psm1 | 212 +++++++++++++++++++++ src/utils/use-dark-theme.reg | 8 - src/utils/use-light-theme.reg | 8 - 33 files changed, 331 insertions(+), 349 deletions(-) delete mode 100644 src/utils/disable-activity-history.reg delete mode 100644 src/utils/disable-bg-apps.reg delete mode 100644 src/utils/disable-clipboard-history.reg delete mode 100644 src/utils/disable-cortana.reg delete mode 100644 src/utils/disable-encrypted-dns-doh.ps1 delete mode 100644 src/utils/disable-game-bar-dvr.reg delete mode 100644 src/utils/disable-god-mode.ps1 delete mode 100644 src/utils/disable-old-volume-control.reg delete mode 100644 src/utils/disable-shutdown-pc-shortcut.ps1 delete mode 100644 src/utils/disable-telemetry.reg delete mode 100644 src/utils/disable-wsearch-service.ps1 delete mode 100644 src/utils/enable-activity-history.reg delete mode 100644 src/utils/enable-bg-apps.reg delete mode 100644 src/utils/enable-clipboard-history.reg delete mode 100644 src/utils/enable-cortana.reg delete mode 100644 src/utils/enable-encrypted-dns-doh.ps1 delete mode 100644 src/utils/enable-game-bar-dvr.reg delete mode 100644 src/utils/enable-god-mode.ps1 delete mode 100644 src/utils/enable-old-volume-control.reg delete mode 100644 src/utils/enable-shutdown-pc-shortcut.ps1 delete mode 100644 src/utils/enable-telemetry.reg delete mode 100644 src/utils/enable-wsearch-service.ps1 create mode 100644 src/utils/individual-tweaks.psm1 delete mode 100644 src/utils/use-dark-theme.reg delete mode 100644 src/utils/use-light-theme.reg diff --git a/Win10ScriptCLI.ps1 b/Win10ScriptCLI.ps1 index 9d14f4b5..3a574409 100644 --- a/Win10ScriptCLI.ps1 +++ b/Win10ScriptCLI.ps1 @@ -1,3 +1,26 @@ +function Main() { + Clear-Host + Request-AdminPrivilege # Check admin rights + Get-ChildItem -Recurse $PSScriptRoot\*.ps*1 | Unblock-File + + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"open-file.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-console-style.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"show-dialog-window.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"start-logging.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"title-templates.psm1" -Force + + Set-ConsoleStyle # Makes the console look cooler + Start-Logging -File (Split-Path -Path $PSCommandPath -Leaf).Split(".")[0] + Write-Caption "$((Split-Path -Path $PSCommandPath -Leaf).Split('.')[0]) v$((Get-Item "$(Split-Path -Path $PSCommandPath -Leaf)").LastWriteTimeUtc | Get-Date -Format "yyyy-MM-dd")" + Write-Host "Your Current Folder $pwd" + Write-Host "Script Root Folder $PSScriptRoot" + Use-WindowsForm + Open-Script # Run all scripts inside 'scripts' folder + Stop-Logging + Write-ScriptLogo # Thanks Figlet + Request-PcRestart # Prompt options to Restart the PC +} + function Request-AdminPrivilege() { # Used from https://stackoverflow.com/a/31602095 because it preserves the working directory! If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } @@ -26,27 +49,4 @@ function Open-Script() { Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage -OpenFromGUI $false } -function Main() { - Clear-Host - Request-AdminPrivilege # Check admin rights - Get-ChildItem -Recurse $PSScriptRoot\*.ps*1 | Unblock-File - - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"open-file.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-console-style.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"show-dialog-window.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"start-logging.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"title-templates.psm1" -Force - - Set-ConsoleStyle # Makes the console look cooler - Start-Logging -File (Split-Path -Path $PSCommandPath -Leaf).Split(".")[0] - Write-Caption "$((Split-Path -Path $PSCommandPath -Leaf).Split('.')[0]) v$((Get-Item "$(Split-Path -Path $PSCommandPath -Leaf)").LastWriteTimeUtc | Get-Date -Format "yyyy-MM-dd")" - Write-Host "Your Current Folder $pwd" - Write-Host "Script Root Folder $PSScriptRoot" - Use-WindowsForm - Open-Script # Run all scripts inside 'scripts' folder - Stop-Logging - Write-ScriptLogo # Thanks Figlet - Request-PcRestart # Prompt options to Restart the PC -} - Main \ No newline at end of file diff --git a/Win10ScriptGUI.ps1 b/Win10ScriptGUI.ps1 index f38ccdf4..52d35014 100644 --- a/Win10ScriptGUI.ps1 +++ b/Win10ScriptGUI.ps1 @@ -2,6 +2,38 @@ # Adapted majorly from https://github.com/ChrisTitusTech/win10script and https://github.com/Sycnex/Windows10Debloater # Take Ownership tweak from: https://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/ +function Main() { + Clear-Host + Request-AdminPrivilege # Check admin rights + Get-ChildItem -Recurse $PSScriptRoot\*.ps*1 | Unblock-File + + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"download-web-file.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"get-hardware-info.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"ui-helper.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"open-file.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"manage-software.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-console-style.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"show-dialog-window.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"start-logging.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"title-templates.psm1" -Force + Import-Module -DisableNameChecking $PSScriptRoot\src\utils\"individual-tweaks.psm1" -Force + + Set-ConsoleStyle # Makes the console look cooler + Start-Logging -File (Split-Path -Path $PSCommandPath -Leaf).Split(".")[0] + Write-Caption "$((Split-Path -Path $PSCommandPath -Leaf).Split('.')[0]) v$((Get-Item "$(Split-Path -Path $PSCommandPath -Leaf)").LastWriteTimeUtc | Get-Date -Format "yyyy-MM-dd")" + Write-Host "Your Current Folder $pwd" + Write-Host "Script Root Folder $PSScriptRoot" + Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts "install-package-managers.ps1" -NoDialog # Install Winget and Chocolatey at the beginning + Write-ScriptLogo # Thanks Figlet + Show-GUI # Load the GUI + + Write-Verbose "Restart: $Script:NeedRestart" + If ($Script:NeedRestart) { + Request-PcRestart # Prompt options to Restart the PC + } + Stop-Logging +} + function Request-AdminPrivilege() { # Used from https://stackoverflow.com/a/31602095 because it preserves the working directory! If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } @@ -112,7 +144,7 @@ function Show-GUI() { # ==> T1 Panel 2 $ClCustomizeFeatures = New-Label -Text "Customize System Features" -Width $PanelElementWidth -Height $CaptionLabelHeight -LocationX $PanelElementX -LocationY 0 - $CbDarkTheme = New-CheckBox -Text "Use Dark Theme" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $ClCustomizeFeatures -MarginTop $DistanceBetweenElements + $CbDarkTheme = New-CheckBox -Text "Enable Dark Theme" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $ClCustomizeFeatures -MarginTop $DistanceBetweenElements $CbActivityHistory = New-CheckBox -Text "Enable Activity History" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbDarkTheme $CbBackgroundsApps = New-CheckBox -Text "Enable Background Apps" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbActivityHistory $CbClipboardHistory = New-CheckBox -Text "Enable Clipboard History" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbBackgroundsApps @@ -127,7 +159,7 @@ function Show-GUI() { $HEVCSupport = New-Button -Text "Get H.265 video codec" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $ClMiscFeatures $CbGodMode = New-CheckBox -Text "Enable God Mode" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $HEVCSupport $CbTakeOwnership = New-CheckBox -Text "Enable Take Ownership menu" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbGodMode - $CbShutdownPCShortcut = New-CheckBox -Text "Enable Shutdown PC shortcut" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbTakeOwnership + $CbFastShutdownPCShortcut = New-CheckBox -Text "Enable Fast Shutdown shortcut" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbTakeOwnership # ==> Tab 2 $TlSoftwareInstall = New-Label -Text "Software Install" -Width $TotalWidth -Height $TitleLabelHeight -LocationX 0 -LocationY $TitleLabelY -FontSize $Header1 -FontStyle "Bold" -ForeColor $WinBlue @@ -314,7 +346,7 @@ function Show-GUI() { $T1Panel1.Controls.AddRange(@($ClDebloatTools, $ApplyTweaks, $UndoTweaks, $RemoveOneDrive, $RemoveXbox, $InstallOneDrive, $ReinstallBloatApps, $RepairWindows, $ShowDebloatInfo, $PictureBox1)) $T1Panel2.Controls.AddRange(@($ClCustomizeFeatures)) $T1Panel2.Controls.AddRange(@($CbDarkTheme, $CbActivityHistory, $CbBackgroundsApps, $CbClipboardHistory, $CbCortana, $CbEncryptedDNS, $CbOldVolumeControl, $CbPhotoViewer, $CbTelemetry, $CbWSearchService, $CbXboxGameBarAndDVR)) - $T1Panel2.Controls.AddRange(@($ClMiscFeatures, $HEVCSupport, $CbGodMode, $CbTakeOwnership, $CbShutdownPCShortcut)) + $T1Panel2.Controls.AddRange(@($ClMiscFeatures, $HEVCSupport, $CbGodMode, $CbTakeOwnership, $CbFastShutdownPCShortcut)) $T2Panel1.Controls.AddRange(@($UpgradeAll)) $T2Panel1.Controls.AddRange(@($ClCpuGpuDrivers, $InstallAmdRyzenChipsetDriver, $InstallIntelDSA, $InstallNvidiaGeForceExperience, $InstallNVCleanstall)) @@ -413,70 +445,70 @@ function Show-GUI() { $CbDarkTheme.Add_Click( { If ($CbDarkTheme.CheckState -eq "Checked") { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("use-dark-theme.reg") -NoDialog + Enable-DarkTheme $CbDarkTheme.Text = "[ON] Dark Theme" } Else { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("use-light-theme.reg") -NoDialog + Disable-DarkTheme $CbDarkTheme.Text = "[OFF] Dark Theme *" } }) $CbActivityHistory.Add_Click( { If ($CbActivityHistory.CheckState -eq "Checked") { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-activity-history.reg") -NoDialog + Enable-ActivityHistory $CbActivityHistory.Text = "[ON] Activity History *" } Else { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-activity-history.reg") -NoDialog + Disable-ActivityHistory $CbActivityHistory.Text = "[OFF] Activity History" } }) $CbBackgroundsApps.Add_Click( { If ($CbBackgroundsApps.CheckState -eq "Checked") { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-bg-apps.reg") -NoDialog + Enable-BackgroundApps $CbBackgroundsApps.Text = "[ON] Background Apps *" } Else { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-bg-apps.reg") -NoDialog + Disable-BackgroundApps $CbBackgroundsApps.Text = "[OFF] Background Apps" } }) $CbClipboardHistory.Add_Click( { If ($CbClipboardHistory.CheckState -eq "Checked") { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-clipboard-history.reg") -NoDialog + Enable-ClipboardHistory $CbClipboardHistory.Text = "[ON] Clipboard History *" } Else { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-clipboard-history.reg") -NoDialog + Disable-ClipboardHistory $CbClipboardHistory.Text = "[OFF] Clipboard History" } }) $CbCortana.Add_Click( { If ($CbCortana.CheckState -eq "Checked") { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-cortana.reg") -NoDialog + Enable-Cortana $CbCortana.Text = "[ON] Cortana *" } Else { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-cortana.reg") -NoDialog + Disable-Cortana $CbCortana.Text = "[OFF] Cortana" } }) $CbEncryptedDNS.Add_Click( { If ($CbEncryptedDNS.CheckState -eq "Checked") { - Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-encrypted-dns-doh.ps1") -NoDialog + Enable-EncryptedDNS $CbEncryptedDNS.Text = "[ON] Encrypted DNS" } Else { - Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-encrypted-dns-doh.ps1") -NoDialog + Disable-EncryptedDNS $CbEncryptedDNS.Text = "[OFF] Encrypted DNS *" } }) $CbOldVolumeControl.Add_Click( { If ($CbOldVolumeControl.CheckState -eq "Checked") { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-old-volume-control.reg") -NoDialog + Enable-OldVolumeControl $CbOldVolumeControl.Text = "[ON] Old Volume Control" } Else { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-old-volume-control.reg") -NoDialog + Disable-OldVolumeControl $CbOldVolumeControl.Text = "[OFF] Old Volume Control *" } }) @@ -493,30 +525,30 @@ function Show-GUI() { $CbTelemetry.Add_Click( { If ($CbTelemetry.CheckState -eq "Checked") { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-telemetry.reg") -NoDialog + Enable-Telemetry $CbTelemetry.Text = "[ON] Telemetry *" } Else { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-telemetry.reg") -NoDialog + Disable-Telemetry $CbTelemetry.Text = "[OFF] Telemetry" } }) $CbWSearchService.Add_Click( { If ($CbWSearchService.CheckState -eq "Checked") { - Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-wsearch-service.ps1") -NoDialog + Enable-WSearchService $CbWSearchService.Text = "[ON] WSearch Service *" } Else { - Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-wsearch-service.ps1") -NoDialog + Disable-WSearchService $CbWSearchService.Text = "[OFF] WSearch Service" } }) $CbXboxGameBarAndDVR.Add_Click( { If ($CbXboxGameBarAndDVR.CheckState -eq "Checked") { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-game-bar-dvr.reg") -NoDialog + Enable-XboxGameBarDVR $CbXboxGameBarAndDVR.Text = "[ON] Xbox GameBar/DVR *" } Else { - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-game-bar-dvr.reg") -NoDialog + Disable-XboxGameBarDVR $CbXboxGameBarAndDVR.Text = "[OFF] Xbox GameBar/DVR" } }) @@ -527,10 +559,10 @@ function Show-GUI() { $CbGodMode.Add_Click( { If ($CbGodMode.CheckState -eq "Checked") { - Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-god-mode.ps1") -NoDialog + Enable-GodMode $CbGodMode.Text = "[ON] God Mode" } Else { - Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-god-mode.ps1") -NoDialog + Disable-GodMode $CbGodMode.Text = "[OFF] God Mode *" } }) @@ -545,13 +577,13 @@ function Show-GUI() { } }) - $CbShutdownPCShortcut.Add_Click( { - If ($CbShutdownPCShortcut.CheckState -eq "Checked") { - Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-shutdown-pc-shortcut.ps1") -NoDialog - $CbShutdownPCShortcut.Text = "[ON] Shutdown PC shortcut" + $CbFastShutdownPCShortcut.Add_Click( { + If ($CbFastShutdownPCShortcut.CheckState -eq "Checked") { + Enable-FastShutdownShortcut + $CbFastShutdownPCShortcut.Text = "[ON] Fast Shutdown shortcut" } Else { - Open-PowerShellFilesCollection -RelativeLocation "src\utils" -Scripts @("disable-shutdown-pc-shortcut.ps1") -NoDialog - $CbShutdownPCShortcut.Text = "[OFF] Shutdown PC... *" + Disable-FastShutdownShortcut + $CbFastShutdownPCShortcut.Text = "[OFF] Fast Shutdown shortcut *" } }) @@ -1273,35 +1305,4 @@ function Show-GUI() { $Form.Dispose() # When done, dispose of the GUI } -function Main() { - Clear-Host - Request-AdminPrivilege # Check admin rights - Get-ChildItem -Recurse $PSScriptRoot\*.ps*1 | Unblock-File - - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"download-web-file.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"get-hardware-info.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"ui-helper.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"open-file.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"manage-software.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-console-style.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"show-dialog-window.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"start-logging.psm1" -Force - Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"title-templates.psm1" -Force - - Set-ConsoleStyle # Makes the console look cooler - Start-Logging -File (Split-Path -Path $PSCommandPath -Leaf).Split(".")[0] - Write-Caption "$((Split-Path -Path $PSCommandPath -Leaf).Split('.')[0]) v$((Get-Item "$(Split-Path -Path $PSCommandPath -Leaf)").LastWriteTimeUtc | Get-Date -Format "yyyy-MM-dd")" - Write-Host "Your Current Folder $pwd" - Write-Host "Script Root Folder $PSScriptRoot" - Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts "install-package-managers.ps1" -NoDialog # Install Winget and Chocolatey at the beginning - Write-ScriptLogo # Thanks Figlet - Show-GUI # Load the GUI - - Write-Verbose "Restart: $Script:NeedRestart" - If ($Script:NeedRestart) { - Request-PcRestart # Prompt options to Restart the PC - } - Stop-Logging -} - -Main \ No newline at end of file +Main diff --git a/src/scripts/install-package-managers.ps1 b/src/scripts/install-package-managers.ps1 index 2be3afc4..3ee78f3a 100644 --- a/src/scripts/install-package-managers.ps1 +++ b/src/scripts/install-package-managers.ps1 @@ -63,7 +63,7 @@ function Install-PackageManager() { } function Install-WingetDependency() { - # Dependency for Winget: https://docs.microsoft.com/pt-br/troubleshoot/cpp/c-runtime-packages-desktop-bridge#how-to-install-and-update-desktop-framework-packages + # Dependency for Winget: https://docs.microsoft.com/en-us/troubleshoot/developer/visualstudio/cpp/libraries/c-runtime-packages-desktop-bridge#how-to-install-and-update-desktop-framework-packages $OSArchList = Get-OSArchitecture ForEach ($OSArch in $OSArchList) { diff --git a/src/scripts/optimize-performance.ps1 b/src/scripts/optimize-performance.ps1 index 2c2493c4..8e8ab963 100644 --- a/src/scripts/optimize-performance.ps1 +++ b/src/scripts/optimize-performance.ps1 @@ -1,6 +1,7 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"open-file.psm1" Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"unregister-duplicated-power-plans.psm1" +Import-Module -DisableNameChecking $PSScriptRoot\..\utils\"individual-tweaks.psm1" # Adapted from: https://youtu.be/hQSkPmZRCjc # Adapted from: https://github.com/ChrisTitusTech/win10script @@ -38,12 +39,11 @@ function Optimize-Performance() { Write-Title -Text "Performance Tweaks" Write-Section -Text "Gaming" - Write-Status -Types $EnableStatus[0].Symbol, $TweakType -Status "$($EnableStatus[0].Status) Game Bar & Game DVR..." - $Scripts = @("disable-game-bar-dvr.reg") - If ($Revert) { - $Scripts = @("enable-game-bar-dvr.reg") + If (!$Revert) { + Disable-XboxGameBarDVR + } Else { + Enable-XboxGameBarDVR } - Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts $Scripts -NoDialog Write-Status -Types "=", $TweakType -Status "Enabling game mode..." Set-ItemProperty -Path "$PathToCUGameBar" -Name "AllowAutoGameMode" -Type DWord -Value 1 diff --git a/src/scripts/optimize-privacy.ps1 b/src/scripts/optimize-privacy.ps1 index 6df011ac..f3032433 100644 --- a/src/scripts/optimize-privacy.ps1 +++ b/src/scripts/optimize-privacy.ps1 @@ -1,4 +1,5 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" +Import-Module -DisableNameChecking $PSScriptRoot\..\utils\"individual-tweaks.psm1" # Adapted from: https://youtu.be/qWESrvP_uU8 # Adapted from: https://youtu.be/hQSkPmZRCjc @@ -30,14 +31,11 @@ function Optimize-Privacy() { } # Initialize all Path variables used to Registry Tweaks - $PathToLMActivityHistory = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" $PathToLMAutoLogger = "HKLM:\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger" $PathToLMDeliveryOptimizationCfg = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" $PathToLMPoliciesAdvertisingInfo = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" $PathToLMPoliciesCloudContent = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" $PathToLMPoliciesSQMClient = "HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows" - $PathToLMPoliciesTelemetry = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" - $PathToLMPoliciesTelemetry2 = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" $PathToLMPoliciesToWifi = "HKLM:\Software\Microsoft\PolicyManager\default\WiFi" $PathToLMPoliciesWindowsUpdate = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" $PathToLMWindowsTroubleshoot = "HKLM:\SOFTWARE\Microsoft\WindowsMitigation" @@ -47,7 +45,6 @@ function Optimize-Privacy() { $PathToCUInputTIPC = "HKCU:\SOFTWARE\Microsoft\Input\TIPC" $PathToCUOnlineSpeech = "HKCU:\SOFTWARE\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy" $PathToCUPoliciesCloudContent = "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" - $PathToCUSearch = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" $PathToCUSiufRules = "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" Write-Title -Text "Privacy Tweaks" @@ -123,11 +120,11 @@ function Optimize-Privacy() { Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -Type DWord -Value $Zero Write-Caption -Text "Diagnostics & Feedback" - Write-Status -Types $EnableStatus[0].Symbol, $TweakType -Status "$($EnableStatus[0].Status) telemetry..." - # [@] (0 = Security (Enterprise only), 1 = Basic Telemetry, 2 = Enhanced Telemetry, 3 = Full Telemetry) - Set-ItemProperty -Path "$PathToLMPoliciesTelemetry" -Name "AllowTelemetry" -Type DWord -Value $Zero - Set-ItemProperty -Path "$PathToLMPoliciesTelemetry2" -Name "AllowTelemetry" -Type DWord -Value $Zero - Set-ItemProperty -Path "$PathToLMPoliciesTelemetry" -Name "AllowDeviceNameInTelemetry" -Type DWord -Value $Zero + If (!$Revert) { + Disable-Telemetry + } Else { + Enable-Telemetry + } Write-Status -Types $EnableStatus[0].Symbol, $TweakType -Status "$($EnableStatus[0].Status) send inking and typing data to Microsoft..." If (!(Test-Path "$PathToCUInputTIPC")) { @@ -151,17 +148,10 @@ function Optimize-Privacy() { Set-ItemProperty -Path "$PathToCUSiufRules" -Name "NumberOfSIUFInPeriod" -Type DWord -Value $Zero Write-Caption -Text "Activity History" - Write-Status -Types $EnableStatus[0].Symbol, $TweakType -Status "$($EnableStatus[0].Status) Activity History..." - $ActivityHistoryDisableOnZero = @( - "EnableActivityFeed" - "PublishUserActivities" - "UploadUserActivities" - ) - - Write-Status -Types "?", $TweakType -Status "From Path: [$PathToLMActivityHistory]" -Warning - ForEach ($Name in $ActivityHistoryDisableOnZero) { - Write-Status -Types $EnableStatus[0].Symbol, $TweakType -Status "$($EnableStatus[0].Status) $($Name): $Zero" - Set-ItemProperty -Path "$PathToLMActivityHistory" -Name "$ActivityHistoryDisableOnZero" -Type DWord -Value $Zero + If ($Revert) { + Enable-ActivityHistory + } Else { + Disable-ActivityHistory } Write-Section -Text "Privacy -> Apps Permissions" @@ -191,16 +181,14 @@ function Optimize-Privacy() { Set-ItemProperty -Path "$PathToCUDeviceAccessGlobal\LooselyCoupled" -Name "Value" -Value "Deny" ForEach ($key in (Get-ChildItem "$PathToCUDeviceAccessGlobal")) { If ($key.PSChildName -EQ "LooselyCoupled") { - continue + Continue } Write-Status -Types $EnableStatus[1].Symbol, $TweakType -Status "$($EnableStatus[1].Status) Setting $($key.PSChildName) value to 'Deny' ..." Set-ItemProperty -Path ("$PathToCUDeviceAccessGlobal\" + $key.PSChildName) -Name "Value" -Value "Deny" } Write-Caption -Text "Background Apps" - Write-Status -Types $EnableStatus[1].Symbol, $TweakType -Status "$($EnableStatus[1].Status) Background Apps..." - Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Name "GlobalUserDisabled" -Type DWord -Value 0 - Set-ItemProperty -Path "$PathToCUSearch" -Name "BackgroundAppGlobalToggle" -Type DWord -Value 1 + Enable-BackgroundApps Write-Section -Text "Update & Security" Write-Caption -Text "Windows Update" @@ -291,7 +279,7 @@ function Optimize-Privacy() { Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" -Name "AITEnable" -Type DWord -Value $Zero Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" -Name "DisableUAR" -Type DWord -Value $One - # Details: https://docs.microsoft.com/pt-br/windows-server/remote/remote-desktop-services/rds-vdi-recommendations-2004#windows-system-startup-event-traces-autologgers + # Details: https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/rds-vdi-recommendations-2004#windows-system-startup-event-traces-autologgers Write-Status -Types $EnableStatus[0].Symbol, $TweakType -Status "$($EnableStatus[0].Status) some startup event traces (AutoLoggers)..." If (!(Test-Path "$PathToLMAutoLogger\AutoLogger-Diagtrack-Listener")) { New-Item -Path "$PathToLMAutoLogger\AutoLogger-Diagtrack-Listener" -Force | Out-Null diff --git a/src/scripts/optimize-security.ps1 b/src/scripts/optimize-security.ps1 index 19d7afea..f74f5ab8 100644 --- a/src/scripts/optimize-security.ps1 +++ b/src/scripts/optimize-security.ps1 @@ -74,7 +74,7 @@ function Optimize-Security() { Set-ItemProperty -Path "$PathToCUExplorerAdvanced" -Name "HideFileExt" -Type DWord -Value 0 Write-Section -Text "User Account Control (UAC)" - # Details: https://docs.microsoft.com/pt-br/windows/security/identity-protection/user-account-control/user-account-control-group-policy-and-registry-key-settings + # Details: https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-group-policy-and-registry-key-settings Write-Status -Types "+", $TweakType -Status "Raising UAC level..." If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System")) { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Force | Out-Null diff --git a/src/scripts/optimize-task-scheduler.ps1 b/src/scripts/optimize-task-scheduler.ps1 index adcd408b..14028431 100644 --- a/src/scripts/optimize-task-scheduler.ps1 +++ b/src/scripts/optimize-task-scheduler.ps1 @@ -13,7 +13,7 @@ function Optimize-TaskScheduler() { [Switch] $Revert ) - # Adapted from: https://docs.microsoft.com/pt-br/windows-server/remote/remote-desktop-services/rds-vdi-recommendations#task-scheduler + # Adapted from: https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/rds-vdi-recommendations#task-scheduler $DisableScheduledTasks = @( "\Microsoft\Office\OfficeTelemetryAgentLogOn" "\Microsoft\Office\OfficeTelemetryAgentFallBack" diff --git a/src/scripts/personal-tweaks.ps1 b/src/scripts/personal-tweaks.ps1 index 29d697de..d5292627 100644 --- a/src/scripts/personal-tweaks.ps1 +++ b/src/scripts/personal-tweaks.ps1 @@ -1,5 +1,6 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"open-file.psm1" Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" +Import-Module -DisableNameChecking $PSScriptRoot\..\utils\"individual-tweaks.psm1" # Adapted from: https://github.com/ChrisTitusTech/win10script # Adapted from: https://github.com/Sycnex/Windows10Debloater @@ -39,9 +40,16 @@ function Register-PersonalTweaksList() { $PathToCUSearch = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" Write-Title -Text "My Personal Tweaks" - $Scripts = @("use-dark-theme.reg", "disable-cortana.reg", "enable-photo-viewer.reg", "disable-clipboard-history.reg") - If ($Revert) { - $Scripts = @("use-light-theme.reg", "enable-cortana.reg", "disable-photo-viewer.reg", "enable-clipboard-history.reg") + If (!$Revert) { + $Scripts = @("enable-photo-viewer.reg") + Disable-ClipboardHistory + Disable-Cortana + Enable-DarkTheme + } Else { + $Scripts = @("disable-photo-viewer.reg") + Enable-ClipboardHistory + Enable-Cortana + Disable-DarkTheme } Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts $Scripts -NoDialog diff --git a/src/utils/disable-activity-history.reg b/src/utils/disable-activity-history.reg deleted file mode 100644 index 15278b7a..00000000 --- a/src/utils/disable-activity-history.reg +++ /dev/null @@ -1,6 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System] -"EnableActivityFeed"=dword:00000000 -"PublishUserActivities"=dword:00000000 -"UploadUserActivities"=dword:00000000 diff --git a/src/utils/disable-bg-apps.reg b/src/utils/disable-bg-apps.reg deleted file mode 100644 index e8ebb86a..00000000 --- a/src/utils/disable-bg-apps.reg +++ /dev/null @@ -1,7 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications] -"GlobalUserDisabled"=dword:00000001 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search] -"BackgroundAppGlobalToggle"=dword:00000000 \ No newline at end of file diff --git a/src/utils/disable-clipboard-history.reg b/src/utils/disable-clipboard-history.reg deleted file mode 100644 index b244fc55..00000000 --- a/src/utils/disable-clipboard-history.reg +++ /dev/null @@ -1,7 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System] -"AllowClipboardHistory"=dword:00000000 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Clipboard] -"EnableClipboardHistory"=dword:00000000 \ No newline at end of file diff --git a/src/utils/disable-cortana.reg b/src/utils/disable-cortana.reg deleted file mode 100644 index 08088f5162be45ebcbf37baf60d00f43730d27df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 510 zcma)&%Sr=55Jk^g@E?YJfat=F;6g?vVtf!EL7WgKNk<351ZE<^pI1*e1QJ(6QQcHk z-&^rv}6nkeAsJQ)9`KQ%4ub_vd(yQ-Z-tSYwJ^vI5rMBNcm2mTQP4; z81O*Oh4+Lz@7&o9_f89*oL%$G$o?>O9%Wq0J2QhD3Nf*2?6>AZ4TbM__5QCjc>|@G z8J~=kqMjR;Ms%2aHu98eFX?fvw@vEJIZHmGmu*B(`{>B>C1!U^Hv+j diff --git a/src/utils/disable-encrypted-dns-doh.ps1 b/src/utils/disable-encrypted-dns-doh.ps1 deleted file mode 100644 index 3c2dfa0f..00000000 --- a/src/utils/disable-encrypted-dns-doh.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" - -function Disable-EncryptedDNS() { - # I'm still not sure how to disable DNS over HTTPS, so this'll need to wait - # Adapted from: https://stackoverflow.com/questions/64465089/powershell-cmdlet-to-remove-a-statically-configured-dns-addresses-from-a-network - Write-Status -Types "*" -Status "Resetting DNS server configs..." - Set-DnsClientServerAddress -InterfaceAlias "Ethernet*" -ResetServerAddresses - Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi*" -ResetServerAddresses -} - -Disable-EncryptedDNS \ No newline at end of file diff --git a/src/utils/disable-game-bar-dvr.reg b/src/utils/disable-game-bar-dvr.reg deleted file mode 100644 index 7c809eef..00000000 --- a/src/utils/disable-game-bar-dvr.reg +++ /dev/null @@ -1,13 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR] -"value"=dword:00000000 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR] -"AppCaptureEnabled"=dword:00000000 - -[HKEY_CURRENT_USER\System\GameConfigStore] -"GameDVR_Enabled"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR] -"AllowGameDVR"=dword:00000000 diff --git a/src/utils/disable-god-mode.ps1 b/src/utils/disable-god-mode.ps1 deleted file mode 100644 index 16f92d1e..00000000 --- a/src/utils/disable-god-mode.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" - -function Disable-GodMode() { - Write-Status -Types "*" -Status "Disabling God Mode hidden folder..." -Warning - Write-Host @" -############################################################################### -# _______ _______ ______ __ __ _______ ______ _______ # -# | || || | | |_| || || | | | # -# | ___|| _ || _ | | || _ || _ || ___| # -# | | __ | | | || | | | | || | | || | | || |___ # -# | || || |_| || |_| | | || |_| || |_| || ___| # -# | |_| || || | | ||_|| || || || |___ # -# |_______||_______||______| |_| |_||_______||______| |_______| # -# # -# God Mode has been disabled, link removed from your Desktop # -# # -############################################################################### -"@ -ForegroundColor Cyan - - $DesktopPath = [Environment]::GetFolderPath("Desktop"); - Remove-Item -Path "$DesktopPath\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" -} - -Disable-GodMode \ No newline at end of file diff --git a/src/utils/disable-old-volume-control.reg b/src/utils/disable-old-volume-control.reg deleted file mode 100644 index c55be29c..00000000 --- a/src/utils/disable-old-volume-control.reg +++ /dev/null @@ -1,4 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC] -"EnableMtcUvc"=dword:00000001 diff --git a/src/utils/disable-shutdown-pc-shortcut.ps1 b/src/utils/disable-shutdown-pc-shortcut.ps1 deleted file mode 100644 index 2cab3ae1..00000000 --- a/src/utils/disable-shutdown-pc-shortcut.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"new-shortcut.psm1" -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" - -function Disable-ShutdownShortcut() { - $DesktopPath = [Environment]::GetFolderPath("Desktop"); - - Write-Status -Types "*" -Status "Removing the shortcut to shutdown the computer on the Desktop..." -Warning - Remove-Item -Path "$DesktopPath\Shutdown Computer.lnk" -} - -Disable-ShutdownShortcut \ No newline at end of file diff --git a/src/utils/disable-telemetry.reg b/src/utils/disable-telemetry.reg deleted file mode 100644 index fb8a3f53..00000000 --- a/src/utils/disable-telemetry.reg +++ /dev/null @@ -1,8 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection] -"AllowTelemetry"=dword:00000000 -"AllowDeviceNameInTelemetry"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection] -"AllowTelemetry"=dword:00000000 diff --git a/src/utils/disable-wsearch-service.ps1 b/src/utils/disable-wsearch-service.ps1 deleted file mode 100644 index 58369342..00000000 --- a/src/utils/disable-wsearch-service.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" - -function Disable-WSearchService() { - Write-Status -Types "-", "Service" -Status "Disabling Search Indexing (Recommended for HDDs)..." - Get-Service -Name "WSearch" -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled - Stop-Service "WSearch" -Force -NoWait -} - -Disable-WSearchService \ No newline at end of file diff --git a/src/utils/enable-activity-history.reg b/src/utils/enable-activity-history.reg deleted file mode 100644 index db43dd2c..00000000 --- a/src/utils/enable-activity-history.reg +++ /dev/null @@ -1,6 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System] -"EnableActivityFeed"=dword:00000001 -"PublishUserActivities"=dword:00000001 -"UploadUserActivities"=dword:00000001 diff --git a/src/utils/enable-bg-apps.reg b/src/utils/enable-bg-apps.reg deleted file mode 100644 index 15c6964f..00000000 --- a/src/utils/enable-bg-apps.reg +++ /dev/null @@ -1,7 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications] -"GlobalUserDisabled"=dword:00000000 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search] -"BackgroundAppGlobalToggle"=dword:00000001 diff --git a/src/utils/enable-clipboard-history.reg b/src/utils/enable-clipboard-history.reg deleted file mode 100644 index 0238f3c9..00000000 --- a/src/utils/enable-clipboard-history.reg +++ /dev/null @@ -1,7 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System] -"AllowClipboardHistory"=dword:00000001 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Clipboard] -"EnableClipboardHistory"=dword:00000001 diff --git a/src/utils/enable-cortana.reg b/src/utils/enable-cortana.reg deleted file mode 100644 index 9dadcefd0bcd4103a6f6c8097fc8db2558853851..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 510 zcma)(-Acni5QV>M!FLFK0MQF?1TQ2imikBiDbh$u+f@T4g``q^dG*^ZLKQEbH@M^DRMZ<@kGpCi+(mLbOdE>OQuB{K*W8c_iC*_z624bF= zaLElhC*BjTymM!LuALU#IXmZ`k^N!n+{(C+cV-4R6k=l4*l*1jH59(z*88{4y(A9Q4S7qh*k8%x|=8$o3&&)*ym aIt+RXOgpMN^*gkBnCk2Y*Fv< diff --git a/src/utils/enable-encrypted-dns-doh.ps1 b/src/utils/enable-encrypted-dns-doh.ps1 deleted file mode 100644 index ba553b50..00000000 --- a/src/utils/enable-encrypted-dns-doh.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" - -function Enable-EncryptedDNS() { - # Adapted from: https://techcommunity.microsoft.com/t5/networking-blog/windows-insiders-gain-new-dns-over-https-controls/ba-p/2494644 - Write-Status -Types "+" -Status "Setting up the DNS over HTTPS for Google and Cloudflare (ipv4 and ipv6)..." - Set-DnsClientDohServerAddress -ServerAddress ("8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844") -AutoUpgrade $true -AllowFallbackToUdp $true - Set-DnsClientDohServerAddress -ServerAddress ("1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001") -AutoUpgrade $true -AllowFallbackToUdp $true - - Write-Status -Types "+" -Status "Setting up the DNS from Cloudflare and Google (ipv4 and ipv6)..." - #Get-DnsClientServerAddress # To look up the current config. # Cloudflare, Google, Cloudflare, Google - Set-DNSClientServerAddress -InterfaceAlias "Ethernet*" -ServerAddresses ("1.1.1.1", "8.8.8.8", "2606:4700:4700::1111", "2001:4860:4860::8888") - Set-DNSClientServerAddress -InterfaceAlias "Wi-Fi*" -ServerAddresses ("1.1.1.1", "8.8.8.8", "2606:4700:4700::1111", "2001:4860:4860::8888") -} - -Enable-EncryptedDNS \ No newline at end of file diff --git a/src/utils/enable-game-bar-dvr.reg b/src/utils/enable-game-bar-dvr.reg deleted file mode 100644 index f7098386..00000000 --- a/src/utils/enable-game-bar-dvr.reg +++ /dev/null @@ -1,13 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR] -"value"=dword:00000001 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR] -"AppCaptureEnabled"=dword:00000001 - -[HKEY_CURRENT_USER\System\GameConfigStore] -"GameDVR_Enabled"=dword:00000001 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR] -"AllowGameDVR"=dword:00000001 diff --git a/src/utils/enable-god-mode.ps1 b/src/utils/enable-god-mode.ps1 deleted file mode 100644 index 76dd7ff8..00000000 --- a/src/utils/enable-god-mode.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" - -function Enable-GodMode() { - Write-Status -Types "@" -Status "Enabling God Mode hidden folder on Desktop..." - Write-Host @" -############################################################################### -# _______ _______ ______ __ __ _______ ______ _______ # -# | || || | | |_| || || | | | # -# | ___|| _ || _ | | || _ || _ || ___| # -# | | __ | | | || | | | | || | | || | | || |___ # -# | || || |_| || |_| | | || |_| || |_| || ___| # -# | |_| || || | | ||_|| || || || |___ # -# |_______||_______||______| |_| |_||_______||______| |_______| # -# # -# God Mode has been enabled, check out the new link on your Desktop # -# # -############################################################################### -"@ -ForegroundColor Blue - - $DesktopPath = [Environment]::GetFolderPath("Desktop"); - New-Item -Path "$DesktopPath\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" -ItemType Directory -Force -} - -Enable-GodMode \ No newline at end of file diff --git a/src/utils/enable-old-volume-control.reg b/src/utils/enable-old-volume-control.reg deleted file mode 100644 index fd45e8db..00000000 --- a/src/utils/enable-old-volume-control.reg +++ /dev/null @@ -1,4 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC] -"EnableMtcUvc"=dword:00000000 diff --git a/src/utils/enable-shutdown-pc-shortcut.ps1 b/src/utils/enable-shutdown-pc-shortcut.ps1 deleted file mode 100644 index aab8c2e2..00000000 --- a/src/utils/enable-shutdown-pc-shortcut.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"new-shortcut.psm1" -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" - -function Enable-ShutdownShortcut() { - $DesktopPath = [Environment]::GetFolderPath("Desktop"); - - $SourcePath = "$env:SystemRoot\System32\shutdown.exe" - $ShortcutPath = "$DesktopPath\Shutdown Computer.lnk" - $Description = "Turns off the computer without any prompt" - $IconLocation = "$env:SystemRoot\System32\shell32.dll, 27" - $Arguments = "-s -f -t 0" - $Hotkey = "CTRL+ALT+F12" - - Write-Status -Types "@" -Status "Creating a shortcut to shutdown the computer on the Desktop..." - New-Shortcut -SourcePath $SourcePath -ShortcutPath $ShortcutPath -Description $Description -IconLocation $IconLocation -Arguments $Arguments -Hotkey $Hotkey -} - -Enable-ShutdownShortcut \ No newline at end of file diff --git a/src/utils/enable-telemetry.reg b/src/utils/enable-telemetry.reg deleted file mode 100644 index 2f78c3c5..00000000 --- a/src/utils/enable-telemetry.reg +++ /dev/null @@ -1,8 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection] -"AllowTelemetry"=dword:00000003 -"AllowDeviceNameInTelemetry"=dword:00000001 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection] -"AllowTelemetry"=dword:00000003 diff --git a/src/utils/enable-wsearch-service.ps1 b/src/utils/enable-wsearch-service.ps1 deleted file mode 100644 index 0fe16d3a..00000000 --- a/src/utils/enable-wsearch-service.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" - -function Enable-WSearchService() { - Write-Status -Types "*", "Service" -Status "Enabling Search Indexing (Recommended for SSDs)..." - Get-Service -Name "WSearch" -ErrorAction SilentlyContinue | Set-Service -StartupType Automatic - Start-Service "WSearch" -} - -Enable-WSearchService \ No newline at end of file diff --git a/src/utils/individual-tweaks.psm1 b/src/utils/individual-tweaks.psm1 new file mode 100644 index 00000000..39643430 --- /dev/null +++ b/src/utils/individual-tweaks.psm1 @@ -0,0 +1,212 @@ +Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"new-shortcut.psm1" +Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1" + +function Disable-ActivityHistory() { + $PathToLMActivityHistory = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" + + Write-Status -Types "-", "Privacy" -Status "Disabling Activity History..." + Set-ItemProperty -Path $PathToLMActivityHistory -Name "EnableActivityFeed" -Type DWord -Value 0 + Set-ItemProperty -Path $PathToLMActivityHistory -Name "PublishUserActivities" -Type DWord -Value 0 + Set-ItemProperty -Path $PathToLMActivityHistory -Name "UploadUserActivities" -Type DWord -Value 0 +} + +function Enable-ActivityHistory() { + $PathToLMActivityHistory = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" + + Write-Status -Types "*", "Privacy" -Status "Enabling Activity History..." + Set-ItemProperty -Path $PathToLMActivityHistory -Name "EnableActivityFeed" -Type DWord -Value 1 + Set-ItemProperty -Path $PathToLMActivityHistory -Name "PublishUserActivities" -Type DWord -Value 1 + Set-ItemProperty -Path $PathToLMActivityHistory -Name "UploadUserActivities" -Type DWord -Value 1 +} + +function Disable-BackgroundApps() { + Write-Status -Types "-", "Misc" -Status "Disabling Background Apps..." + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Name "GlobalUserDisabled" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "BackgroundAppGlobalToggle" -Type DWord -Value 0 +} + +function Enable-BackgroundApps() { + Write-Status -Types "*", "Misc" -Status "Enabling Background Apps..." + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Name "GlobalUserDisabled" -Type DWord -Value 0 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "BackgroundAppGlobalToggle" -Type DWord -Value 1 +} + +function Disable-ClipboardHistory() { + Write-Status -Types "-", "Privacy" -Status "Disabling Clipboard History..." + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -Type DWord -Value 0 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Clipboard" -Name "EnableClipboardHistory" -Type DWord -Value 0 +} + +function Enable-ClipboardHistory() { + Write-Status -Types "*", "Privacy" -Status "Enabling Clipboard History..." + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Clipboard" -Name "EnableClipboardHistory" -Type DWord -Value 1 +} + +function Disable-Cortana() { + $PathToLMPoliciesCortana = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" + + Write-Status -Types "-", "Privacy" -Status "Disabling Cortana..." + Set-ItemProperty -Path "$PathToLMPoliciesCortana" -Name "AllowCortana" -Type DWord -Value 0 + Set-ItemProperty -Path "$PathToLMPoliciesCortana" -Name "AllowCloudSearch" -Type DWord -Value 0 + Set-ItemProperty -Path "$PathToLMPoliciesCortana" -Name "ConnectedSearchUseWeb" -Type DWord -Value 0 + Set-ItemProperty -Path "$PathToLMPoliciesCortana" -Name "DisableWebSearch" -Type DWord -Value 1 +} + +function Enable-Cortana() { + $PathToLMPoliciesCortana = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" + + Write-Status -Types "*", "Privacy" -Status "Enabling Cortana..." + Set-ItemProperty -Path "$PathToLMPoliciesCortana" -Name "AllowCortana" -Type DWord -Value 1 + Set-ItemProperty -Path "$PathToLMPoliciesCortana" -Name "AllowCloudSearch" -Type DWord -Value 1 + Set-ItemProperty -Path "$PathToLMPoliciesCortana" -Name "ConnectedSearchUseWeb" -Type DWord -Value 1 + Set-ItemProperty -Path "$PathToLMPoliciesCortana" -Name "DisableWebSearch" -Type DWord -Value 0 +} + +function Disable-XboxGameBarDVR() { + Write-Status -Types "-", "Performance" -Status "Disabling Xbox Game Bar DVR..." + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR" -Name "value" -Type DWord -Value 0 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name "AppCaptureEnabled" -Type DWord -Value 0 + Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type DWord -Value 0 +} + +function Enable-XboxGameBarDVR() { + Write-Status -Types "*", "Performance" -Status "Enabling Xbox Game Bar DVR..." + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR" -Name "value" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name "AppCaptureEnabled" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type DWord -Value 1 +} + +function Disable-OldVolumeControl() { + Write-Status -Types "*", "Misc" -Status "Disabling Old Volume Control..." + Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC" -Name "EnableMtcUvc" -Type DWord -Value 1 +} + +function Enable-OldVolumeControl() { + Write-Status -Types "+", "Misc" -Status "Enabling Old Volume Control..." + Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC" -Name "EnableMtcUvc" -Type DWord -Value 0 +} + +function Disable-Telemetry() { + Write-Status -Types "-", "Privacy" -Status "Disabling Telemetry..." + # [@] (0 = Security (Enterprise only), 1 = Basic Telemetry, 2 = Enhanced Telemetry, 3 = Full Telemetry) + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowDeviceNameInTelemetry" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0 +} + +function Enable-Telemetry() { + Write-Status -Types "*", "Privacy" -Status "Enabling Telemetry..." + # [@] (0 = Security (Enterprise only), 1 = Basic Telemetry, 2 = Enhanced Telemetry, 3 = Full Telemetry) + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 3 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowDeviceNameInTelemetry" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 3 +} + +function Disable-DarkTheme() { + Write-Status -Types "*", "Personal" -Status "Disabling Dark Theme..." + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "AppsUseLightTheme" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "SystemUsesLightTheme" -Type DWord -Value 1 +} +function Enable-DarkTheme() { + Write-Status -Types "+", "Personal" -Status "Enabling Dark Theme..." + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "AppsUseLightTheme" -Type DWord -Value 0 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "SystemUsesLightTheme" -Type DWord -Value 0 +} + +function Disable-EncryptedDNS() { + # I'm still not sure how to disable DNS over HTTPS, so this'll need to wait + # Adapted from: https://stackoverflow.com/questions/64465089/powershell-cmdlet-to-remove-a-statically-configured-dns-addresses-from-a-network + Write-Status -Types "*" -Status "Resetting DNS server configs..." + Set-DnsClientServerAddress -InterfaceAlias "Ethernet*" -ResetServerAddresses + Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi*" -ResetServerAddresses +} + +function Enable-EncryptedDNS() { + # Adapted from: https://techcommunity.microsoft.com/t5/networking-blog/windows-insiders-gain-new-dns-over-https-controls/ba-p/2494644 + Write-Status -Types "+" -Status "Setting up the DNS over HTTPS for Google and Cloudflare (ipv4 and ipv6)..." + Set-DnsClientDohServerAddress -ServerAddress ("8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844") -AutoUpgrade $true -AllowFallbackToUdp $true + Set-DnsClientDohServerAddress -ServerAddress ("1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001") -AutoUpgrade $true -AllowFallbackToUdp $true + + Write-Status -Types "+" -Status "Setting up the DNS from Cloudflare and Google (ipv4 and ipv6)..." + #Get-DnsClientServerAddress # To look up the current config. # Cloudflare, Google, Cloudflare, Google + Set-DNSClientServerAddress -InterfaceAlias "Ethernet*" -ServerAddresses ("1.1.1.1", "8.8.8.8", "2606:4700:4700::1111", "2001:4860:4860::8888") + Set-DNSClientServerAddress -InterfaceAlias "Wi-Fi*" -ServerAddresses ("1.1.1.1", "8.8.8.8", "2606:4700:4700::1111", "2001:4860:4860::8888") +} + +function Disable-FastShutdownShortcut() { + $DesktopPath = [Environment]::GetFolderPath("Desktop"); + + Write-Status -Types "*" -Status "Removing the shortcut to shutdown the computer on the Desktop..." -Warning + Remove-Item -Path "$DesktopPath\Fast Shutdown.lnk" +} + +function Enable-FastShutdownShortcut() { + $DesktopPath = [Environment]::GetFolderPath("Desktop"); + + $SourcePath = "$env:SystemRoot\System32\shutdown.exe" + $ShortcutPath = "$DesktopPath\Fast Shutdown.lnk" + $Description = "Turns off the computer without any prompt" + $IconLocation = "$env:SystemRoot\System32\shell32.dll, 27" + $Arguments = "-s -f -t 0" + $Hotkey = "CTRL+ALT+F12" + + Write-Status -Types "+" -Status "Creating a shortcut to shutdown the computer on the Desktop..." + New-Shortcut -SourcePath $SourcePath -ShortcutPath $ShortcutPath -Description $Description -IconLocation $IconLocation -Arguments $Arguments -Hotkey $Hotkey +} + +function Disable-GodMode() { + Write-Status -Types "*" -Status "Disabling God Mode hidden folder..." -Warning + Write-Host @" +############################################################################### +# _______ _______ ______ __ __ _______ ______ _______ # +# | || || | | |_| || || | | | # +# | ___|| _ || _ | | || _ || _ || ___| # +# | | __ | | | || | | | | || | | || | | || |___ # +# | || || |_| || |_| | | || |_| || |_| || ___| # +# | |_| || || | | ||_|| || || || |___ # +# |_______||_______||______| |_| |_||_______||______| |_______| # +# # +# God Mode has been disabled, link removed from your Desktop # +# # +############################################################################### +"@ -ForegroundColor Cyan + + $DesktopPath = [Environment]::GetFolderPath("Desktop"); + Remove-Item -Path "$DesktopPath\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" +} + +function Enable-GodMode() { + Write-Status -Types "+" -Status "Enabling God Mode hidden folder on Desktop..." + Write-Host @" +############################################################################### +# _______ _______ ______ __ __ _______ ______ _______ # +# | || || | | |_| || || | | | # +# | ___|| _ || _ | | || _ || _ || ___| # +# | | __ | | | || | | | | || | | || | | || |___ # +# | || || |_| || |_| | | || |_| || |_| || ___| # +# | |_| || || | | ||_|| || || || |___ # +# |_______||_______||______| |_| |_||_______||______| |_______| # +# # +# God Mode has been enabled, check out the new link on your Desktop # +# # +############################################################################### +"@ -ForegroundColor Blue + + $DesktopPath = [Environment]::GetFolderPath("Desktop"); + New-Item -Path "$DesktopPath\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" -ItemType Directory -Force +} + +function Disable-WSearchService() { + Write-Status -Types "-", "Service" -Status "Disabling Search Indexing (Recommended for HDDs)..." + Get-Service -Name "WSearch" -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled + Stop-Service "WSearch" -Force -NoWait +} + +function Enable-WSearchService() { + Write-Status -Types "*", "Service" -Status "Enabling Search Indexing (Recommended for SSDs)..." + Get-Service -Name "WSearch" -ErrorAction SilentlyContinue | Set-Service -StartupType Automatic + Start-Service "WSearch" +} diff --git a/src/utils/use-dark-theme.reg b/src/utils/use-dark-theme.reg deleted file mode 100644 index fe821bca..00000000 --- a/src/utils/use-dark-theme.reg +++ /dev/null @@ -1,8 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize] -"AppsUseLightTheme"=dword:00000000 -"SystemUsesLightTheme"=dword:00000000 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize] -"AppsUseLightTheme"=dword:00000000 \ No newline at end of file diff --git a/src/utils/use-light-theme.reg b/src/utils/use-light-theme.reg deleted file mode 100644 index 405313cb..00000000 --- a/src/utils/use-light-theme.reg +++ /dev/null @@ -1,8 +0,0 @@ -Windows Registry Editor Version 5.00 - -[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize] -"AppsUseLightTheme"=dword:00000001 -"SystemUsesLightTheme"=dword:00000001 - -[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize] -"AppsUseLightTheme"=dword:00000001 \ No newline at end of file