From 0a6970d7a783f032ed61afc460fabc45cedb182d Mon Sep 17 00:00:00 2001 From: LeDragoX Date: Sun, 25 Oct 2020 14:25:25 -0300 Subject: [PATCH] small changes, enable specific regs, change backup dir, create new script from utils, renamed elevate-cmd.bat --- Script-Win10.ps1 | 21 +++++++++------- scripts/all-in-one-tweaks.ps1 | 9 +++---- scripts/backup-system.ps1 | 3 ++- scripts/fix-general-problems.ps1 | 25 ++++++++++++++++++++ utils/Extra/{elevate-cmd.bat => elevate.cmd} | 2 ++ utils/fix-explorer.bat | 20 ---------------- utils/fix-start-menu-Win10.ps1 | 13 ---------- 7 files changed, 46 insertions(+), 47 deletions(-) create mode 100644 scripts/fix-general-problems.ps1 rename utils/Extra/{elevate-cmd.bat => elevate.cmd} (98%) delete mode 100644 utils/fix-explorer.bat delete mode 100644 utils/fix-start-menu-Win10.ps1 diff --git a/Script-Win10.ps1 b/Script-Win10.ps1 index eb1bfeb..bd1dde2 100644 --- a/Script-Win10.ps1 +++ b/Script-Win10.ps1 @@ -41,32 +41,35 @@ Function RunScripts { ls -Recurse *.ps*1 | Unblock-File Clear-Host - Write-Output "=========================================================================================" "backup-system.ps1" + Write-Output "|==================== backup-system.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"backup-system.ps1" Clear-Host - Write-Output "=========================================================================================" "all-in-one-tweaks.ps1" + Write-Output "|==================== all-in-one-tweaks.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"all-in-one-tweaks.ps1" Clear-Host - Write-Output "=========================================================================================" "block-telemetry.ps1" + Write-Output "|==================== block-telemetry.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"block-telemetry.ps1" Clear-Host - Write-Output "=========================================================================================" "disable-services.ps1" + Write-Output "|==================== disable-services.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"disable-services.ps1" Clear-Host - Write-Output "=========================================================================================" "fix-privacy-settings.ps1" + Write-Output "|==================== fix-privacy-settings.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"fix-privacy-settings.ps1" Clear-Host - Write-Output "=========================================================================================" "optimize-user-interface.ps1" + Write-Output "|==================== optimize-user-interface.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"optimize-user-interface.ps1" Clear-Host - Write-Output "=========================================================================================" "optimize-windows-update.ps1" + Write-Output "|==================== optimize-windows-update.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"optimize-windows-update.ps1" Clear-Host - Write-Output "=========================================================================================" "remove-default-apps.ps1" + Write-Output "|==================== remove-default-apps.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"remove-default-apps.ps1" Clear-Host - Write-Output "=========================================================================================" "remove-onedrive.ps1" + Write-Output "|==================== remove-onedrive.ps1 ====================|" "" PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"remove-onedrive.ps1" + Clear-Host + Write-Output "|==================== fix-general-problems.ps1 ====================|" "" + PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"fix-general-problems.ps1" Pop-Location } diff --git a/scripts/all-in-one-tweaks.ps1 b/scripts/all-in-one-tweaks.ps1 index 5a9a7df..3f55888 100644 --- a/scripts/all-in-one-tweaks.ps1 +++ b/scripts/all-in-one-tweaks.ps1 @@ -105,6 +105,7 @@ reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWi # Change Windows Updates to "Notify to schedule restart" reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v UxOption /t REG_DWORD /d 1 /f + # Disable P2P Update downloads outside of local network reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v DODownloadMode /t REG_DWORD /d 0 /f @@ -117,17 +118,17 @@ reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Ad # *** Set Windows Explorer to start on This PC instead of Quick Access *** # 1 = This PC, 2 = Quick access -reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 1 /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 1 /f # NOW JUST SOME TWEAKS # *** Show hidden files in Explorer *** -# reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 1 /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 1 /f # *** Show super hidden system files in Explorer *** -# reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSuperHidden" /t REG_DWORD /d 1 /f +# reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSuperHidden" /t REG_DWORD /d 1 /f # *** Show file extensions in Explorer *** -reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f +reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f Write-Output "" "*** Misc. Tweaks ***" "" diff --git a/scripts/backup-system.ps1 b/scripts/backup-system.ps1 index 238fdc8..153627e 100644 --- a/scripts/backup-system.ps1 +++ b/scripts/backup-system.ps1 @@ -1,4 +1,5 @@ # Made by LeDragoX inspired by Chris Titus Tech Write-Output "Enabling system drive Restore Point" -Enable-ComputerRestore -Drive "C:\" +mkdir "$env:SystemDrive\WinBackup" +Enable-ComputerRestore -Drive "$env:SystemDrive\WinBackup" Checkpoint-Computer -Description "RestorePoint1" -RestorePointType "MODIFY_SETTINGS" \ No newline at end of file diff --git a/scripts/fix-general-problems.ps1 b/scripts/fix-general-problems.ps1 new file mode 100644 index 0000000..1a92f14 --- /dev/null +++ b/scripts/fix-general-problems.ps1 @@ -0,0 +1,25 @@ +Write-Output "============================================" +Write-Output "" +Write-Output "Fix windows explorer opening with no reason" +Write-Output "" +Write-Output "============================================" +Write-Output "" + +sfc /scannow +dism.exe /online /cleanup-image /restorehealth + +Write-Output "==========================================" +Write-Output "" +Write-Output "This will Fix your Start Menu not opening" +Write-Output "" +Write-Output "==========================================" +Write-Output "" + +taskkill /F /IM explorer.exe + +REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V EnableXamlStartMenu /T REG_DWORD /D 0 /F +Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} + +Start-Process explorer + +Write-Output "Restart your Computer!" | Msg * /time:3 \ No newline at end of file diff --git a/utils/Extra/elevate-cmd.bat b/utils/Extra/elevate.cmd similarity index 98% rename from utils/Extra/elevate-cmd.bat rename to utils/Extra/elevate.cmd index 95ea892..2db59ac 100644 --- a/utils/Extra/elevate-cmd.bat +++ b/utils/Extra/elevate.cmd @@ -51,3 +51,5 @@ :gotPrivileges setlocal & cd /d %~dp0 if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) + +REM "Your script here" \ No newline at end of file diff --git a/utils/fix-explorer.bat b/utils/fix-explorer.bat deleted file mode 100644 index 347e9a5..0000000 --- a/utils/fix-explorer.bat +++ /dev/null @@ -1,20 +0,0 @@ -@echo ---- Preparation ---- - -@set this=%~dp0 -@set thisdrive=%this:~0,2% - -%thisdrive% -@cd %this% - -@echo This bat drive = %thisdrive% -@echo This bat folder = %this% - -@echo off & echo ---- Prepared ---- -@Echo ============================================ -@Echo Fix windows explorer opening with no reason -@Echo ============================================ - -@sfc /scannow -@dism.exe /online /cleanup-image /restorehealth - -@PowerShell Write-Output 'Restart your Computer!' | Msg * /time:3 \ No newline at end of file diff --git a/utils/fix-start-menu-Win10.ps1 b/utils/fix-start-menu-Win10.ps1 deleted file mode 100644 index d46467c..0000000 --- a/utils/fix-start-menu-Win10.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -Write-Output "====================================" -Write-Output "This will Fix your Start Menu click" -Write-Output "====================================" - -taskkill /F /IM explorer.exe - -PowerShell Set-ExecutionPolicy Unrestricted -REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V EnableXamlStartMenu /T REG_DWORD /D 0 /F -Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} -PowerShell Set-ExecutionPolicy Restricted - - -start explorer \ No newline at end of file