From 6454043013d9b5b7d4c0acf6c71815dddcf1f162 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:42:13 +0100 Subject: [PATCH] Reduced clutter of options in custom mode - Certain options now only show if you are running specific windows builds - Added more info to in-script info pages - Updated README instructions --- Menus/DefaultSettings.txt | 2 +- Menus/Info.txt | 14 +++++++------- README.md | 11 +++++++---- Win11Debloat.ps1 | 35 ++++++++++++++++++++++------------- 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/Menus/DefaultSettings.txt b/Menus/DefaultSettings.txt index 0a2c407..959a47a 100644 --- a/Menus/DefaultSettings.txt +++ b/Menus/DefaultSettings.txt @@ -7,8 +7,8 @@ Win11Debloat will make the following changes: - Disable bing search & cortana in windows search. - Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper) - Disable tips, tricks and suggestions in the start menu and settings, and ads in windows explorer. +- Disable Windows Copilot. (Windows 11 build 22621+) - Show file extensions for known file types. -- Disable Windows Copilot. (Windows 11 only) - Disable the widget service & hide the icon from the taskbar. - Hide the Chat (meet now) icon from the taskbar. - Hide the 3D objects folder in windows explorer. (Windows 10 only) diff --git a/Menus/Info.txt b/Menus/Info.txt index fa962c1..4e8efce 100644 --- a/Menus/Info.txt +++ b/Menus/Info.txt @@ -24,20 +24,20 @@ through all the settings yourself, or removing apps one by one! ------------------------------------------------------------------------------------------- - Remove bloatware apps, the list can be found in the 'Appslist.txt' file. - Remove gaming-related apps, the list can be found in the 'GamingAppslist.txt' file. +- Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 build 22621+) - Disable telemetry, diagnostic data, app-launch tracking & targeted ads. - Disable bing search, bing AI & cortana in windows search. - Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen. -- Disable Windows Copilot. (Windows 11 only) -- Restore the old Windows 10 style context menu (Windows 11 only) +- Disable Windows Copilot. (Windows 11 build 22621+) +- Restore the old Windows 10 style context menu. (Windows 11 build 22000+) - Show hidden files, folders and drives. - Show file extensions for known file types. - Hide duplicate removable drive entries from the windows explorer navigation pane, so only the entry under 'This PC' remains. -- Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 update 22H2 or later only) -- Align taskbar icons to the left. (Windows 11 only) -- Hide or change the search icon/box on the taskbar. (Windows 11 only) -- Hide the taskview button from the taskbar. (Windows 11 only) +- Align taskbar icons to the left. (Windows 11 build 22000+) +- Hide or change the search icon/box on the taskbar. (Windows 11 build 22000+) +- Hide the taskview button from the taskbar. (Windows 11 build 22000+) - Disable the widget service & hide the icon from the taskbar. -- Hide the chat (meet now) icon from the taskbar. +- Hide the chat (meet now) icon from the taskbar. (Up to build 22621) - Hide the 3D objects, music or onedrive folder in the windows explorer sidepanel. (Windows 10 only) - Hide the 'Include in library', 'Give access to' and 'Share' options in the context menu. (Windows 10 only) diff --git a/README.md b/README.md index 8dab1a4..21346a7 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,12 @@ Give you access to even more options and allow you to customize the script to yo In this mode you'll be able to make any of the following changes: - Remove all bloatware apps from [this list](#click-for-list-of-bloat-that-is-removed) and optionally also remove gaming-related apps. -- Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 update 22H2 or later only) +- Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 only) - Disable telemetry, diagnostic data, app-launch tracking & targeted ads. - Disable bing search, bing AI & cortana in windows search. - Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen. - Disable Windows Copilot. (Windows 11 only) -- Restore the old Windows 10 style context menu (Windows 11 only) +- Restore the old Windows 10 style context menu. (Windows 11 only) - Show hidden files, folders and drives. - Show file extensions for known file types. - Hide duplicate removable drive entries from the windows explorer navigation pane, so only the entry under 'This PC' remains. @@ -56,6 +56,9 @@ Disclaimer: I believe this script to be completely safe to run, in fact, great c 3. Double click the 'Run.bat' file to start the script. Note: If the console window immediately closes and nothing happens, try the advanced method below. 4. Accept the windows UAC prompt to run the script as administrator, this is required for the script to function. 5. A new powershell window will now open, showing the Win11Debloat menu. Select either the default or custom setup to continue. +6. Carefully read through and follow the on-screen instructions. + +After making the selected changes the Win11Debloat script will restart the Windows Explorer process to properly apply them. If Windows Explorer does not recover after running the script and your desktop stays black, don't worry. Just press Ctrl + Alt + Del to restart your PC. ### Advanced method @@ -66,7 +69,7 @@ This method gives you the option to run the script with certain parameters to ta 3. Enable powershell execution by entering the following command: `Set-ExecutionPolicy Unrestricted -Scope Process` 4. In powershell, navigate to the directory where the files were extracted. Example: `cd c:\Win11Debloat` 5. Enter this into powershell to run the script: `.\Win11Debloat.ps1` -6. A menu will now open. Select either the default or custom setup to continue. +6. The Win11Debloat menu will now open. Select either the default or custom setup to continue. To run the script without any user input, simply add parameters at the end, example: `.\Win11Debloat.ps1 -RemoveApps -DisableBing -Silent` @@ -103,7 +106,7 @@ To run the script without any user input, simply add parameters at the end, exam ## Debloat Windows -By default, this script removes a large selection preinstalled bloatware, while preserving actually useful apps like the calculator, mail, media player and photos. If you do end up needing any of the removed apps in the future you can easily reinstall them through the Microsoft store. A full list of what is and isn't removed can be found below, but if you're unhappy with the default selection you can customize exactly which apps are removed by the script by editing the apps list found in the ['Appslist.txt'](https://github.com/Raphire/Win11Debloat/blob/master/Appslist.txt) and ['GamingAppslist.txt'](https://github.com/Raphire/Win11Debloat/blob/master/GamingAppslist.txt) files. +By default, this script removes a large selection preinstalled bloatware, while preserving actually useful apps like the calculator, mail, media player and photos. If you do end up needing any of the removed apps in the future you can easily reinstall them through the Microsoft store. A full list of what is and isn't removed can be found below. If you're unhappy with the default selection you can customize exactly which apps are removed by the script by editing the apps list found in the ['Appslist.txt'](https://github.com/Raphire/Win11Debloat/blob/master/Appslist.txt) and ['GamingAppslist.txt'](https://github.com/Raphire/Win11Debloat/blob/master/GamingAppslist.txt) files.

Click for list of bloat that is removed

diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index 9beea21..1259050 100644 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -240,6 +240,9 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( # Custom mode, add options based on user input '2' { + # Get current windows version to compare against features + $winversion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' CurrentBuild + Clear-Host Write-Output "-------------------------------------------------------------------------------------------" Write-Output " Win11Debloat Script - Custom Configuration" @@ -255,10 +258,10 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( } } - Write-Output "" + # Only show this option for windows 11 users running build 22621 or later + if ($winversion -ge 22621){ + Write-Output "" - # Only show this options for windows 11 users - if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){ if ($( Read-Host -Prompt "Remove all pinned apps from the start menu? This applies to all existing and new users and can't be reverted (y/n)" ) -eq 'y') { $PSBoundParameters.Add('ClearStart', $ClearStart) } @@ -283,14 +286,17 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( $PSBoundParameters.Add('DisableLockscreenTips', $DisableLockscreenTips) } - Write-Output "" + # Only show this option for windows 11 users running build 22621 or later + if ($winversion -ge 22621){ + Write-Output "" - # Only show these options for windows 11 users - if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){ if ($( Read-Host -Prompt "Disable Windows Copilot? This applies to all users (y/n)" ) -eq 'y') { - $PSBoundParameters.Add('DisableCopilot', $DisableCopilot) + $PSBoundParameters.Add('DisableCopilot', $DisableCopilot) } + } + # Only show this option for windows 11 users running build 22000 or later + if ($winversion -ge 22000){ Write-Output "" if ($( Read-Host -Prompt "Restore the old Windows 10 style context menu? (y/n)" ) -eq 'y') { @@ -301,8 +307,8 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( Write-Output "" if ($( Read-Host -Prompt "Do you want to make any changes to the taskbar and related services? (y/n)" ) -eq 'y') { - # Only show these specific options for windows 11 users - if (get-ciminstance -query "select caption from win32_operatingsystem where caption like '%Windows 11%'"){ + # Only show these specific options for windows 11 users running build 22000 or later + if ($winversion -ge 22000){ Write-Output "" if ($( Read-Host -Prompt " Align taskbar buttons to the left side? (y/n)" ) -eq 'y') { @@ -351,10 +357,13 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( $PSBoundParameters.Add('DisableWidgets', $DisableWidgets) } - Write-Output "" + # Only show this options for windows users running build 22621 or earlier + if ($winversion -le 22621){ + Write-Output "" - if ($( Read-Host -Prompt " Hide the chat (meet now) icon from the taskbar? (y/n)" ) -eq 'y') { - $PSBoundParameters.Add('HideChat', $HideChat) + if ($( Read-Host -Prompt " Hide the chat (meet now) icon from the taskbar? (y/n)" ) -eq 'y') { + $PSBoundParameters.Add('HideChat', $HideChat) + } } } @@ -375,7 +384,7 @@ if ((-not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or ( Write-Output "" - if ($( Read-Host -Prompt " Hide duplicate removable drive entries from the windows explorer sidepane so they only show under 'This PC'? (y/n)" ) -eq 'y') { + if ($( Read-Host -Prompt " Hide duplicate removable drive entries from the windows explorer sidepane so they only show under This PC? (y/n)" ) -eq 'y') { $PSBoundParameters.Add('HideDupliDrive', $HideDupliDrive) }