2 Commits

Author SHA1 Message Date
Raphire
b9de9b353d Fix Modern Standby check to be language-independant 2025-08-20 20:07:59 +02:00
Raphire
b27971933e Properly check if Modern Standby is supported 2025-08-20 10:52:14 +02:00
19 changed files with 65 additions and 173 deletions

View File

@@ -1,15 +1,16 @@
Win11Debloat will make the following changes:
- Remove the default selection of apps, the list can be found in the 'Appslist.txt' file.
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
- Disable tips, tricks, suggestions and ads in start, settings, notifications and more.
- Disable ads, suggestions and the MSN news feed in Microsoft Edge.
- Disable ads and the MSN news feed in Microsoft Edge.
- Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper)
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
- Disable & remove Microsoft Copilot.
- Disable Windows Recall snapshots. (W11 only)
- Disable & remove Microsoft Copilot. (W11 only)
- Disable Fast Start-up to ensure a full shutdown.
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
- Show file extensions for known file types.
- Hide the 3D objects folder in Windows Explorer. (W10 only)
- Disable widgets on the taskbar & lockscreen.
- Disable the widget service & hide the icon from the taskbar.
- Hide the Chat (meet now) icon from the taskbar.

View File

@@ -12,12 +12,12 @@ App Removal
Telemetry, Tracking & Suggested Content
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
- Disable tips, tricks, suggestions & ads across Windows.
- Disable ads, suggestions and the MSN news feed in Microsoft Edge.
- Disable ads and the MSN news feed in Microsoft Edge.
- Disable the 'Windows Spotlight' desktop background option.
Bing Web Search, Copilot & AI Features
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
- Disable & remove Microsoft Copilot.
- Disable & remove Microsoft Copilot. (W11 only)
- Disable Windows Recall snapshots. (W11 only)
- Disable AI Features in Paint (W11 only)
- Disable AI Features in Notepad (W11 only)
@@ -42,7 +42,7 @@ Taskbar
- Align taskbar icons to the left. (W11 only)
- Hide or change the search icon/box on the taskbar. (W11 only)
- Hide the taskview button from the taskbar. (W11 only)
- Disable widgets on the taskbar & lockscreen.
- Disable the widgets service & hide icon from the taskbar.
- Hide the chat (meet now) icon from the taskbar.
- Enable the 'End Task' option in the taskbar right click menu. (W11 only)
- Enable the 'Last Active Click' behavior in the taskbar app area.
@@ -62,19 +62,17 @@ Other
Default mode
-------------------------------------------------------------------------------------------
The default mode applies the changes that are recommended for most users. This includes:
- Remove the default selection or your custom selection of apps.
- Remove the default selection of apps, the list can be found in the 'Appslist.txt' file.
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
- Disable tips, tricks, suggestions and ads in start, settings, notifications and more.
- Disable ads, suggestions and the MSN news feed in Microsoft Edge.
- Disable ads and the MSN news feed in Microsoft Edge.
- Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper)
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
- Disable & remove Microsoft Copilot.
- Disable Windows Recall snapshots. (W11 only)
- Disable & remove Microsoft Copilot. (W11 only)
- Disable Fast Start-up to ensure a full shutdown.
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
- Show file extensions for known file types.
- Hide the 3D objects folder in Windows Explorer. (W10 only)
- Disable widgets on the taskbar & lockscreen.
- Disable the widget service & hide the icon from the taskbar.
- Hide the Chat (meet now) icon from the taskbar.

View File

@@ -6,8 +6,7 @@ param (
[string]$User,
[switch]$CreateRestorePoint,
[switch]$RunAppsListGenerator, [switch]$RunAppConfigurator,
[switch]$RunDefaults,
[switch]$RunDefaultsLite,
[switch]$RunDefaults, [switch]$RunWin11Defaults,
[switch]$RunSavedSettings,
[switch]$RemoveApps,
[switch]$RemoveAppsCustom,
@@ -86,7 +85,7 @@ Write-Output "------------------------------------------------------------------
Write-Output "> Downloading Win11Debloat..."
# Download latest version of Win11Debloat from github as zip archive
Invoke-RestMethod https://api.github.com/repos/Raphire/Win11Debloat/zipball/2025.09.13 -OutFile "$env:TEMP/win11debloat.zip"
Invoke-RestMethod https://api.github.com/repos/Raphire/Win11Debloat/zipball/2025.08.16 -OutFile "$env:TEMP/win11debloat.zip"
# Remove old script folder if it exists, except for CustomAppsList and SavedSettings files
if (Test-Path "$env:TEMP/Win11Debloat") {

View File

@@ -108,7 +108,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo
#### Bing Web Search, Copilot & AI Features
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
- Disable & remove Microsoft Copilot.
- Disable & remove Microsoft Copilot. (W11 only)
- Disable Windows Recall snapshots. (W11 only)
- Disable AI Features in Edge (W11 only)
- Disable AI Features in Paint (W11 only)
@@ -137,7 +137,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo
- Align taskbar icons to the left. (W11 only)
- Hide or change the search icon/box on the taskbar. (W11 only)
- Hide the taskview button from the taskbar. (W11 only)
- Disable widgets on the taskbar & lockscreen.
- Disable the widgets service & hide icon from the taskbar.
- Hide the chat (meet now) icon from the taskbar.
- Enable the 'End Task' option in the taskbar right click menu. (W11 only)
- Enable the 'Last Active Click' behavior in the taskbar app area. This allows you to repeatedly click on an application's icon in the taskbar to switch focus between the open windows of that application.
@@ -157,34 +157,28 @@ Below is an overview of the key features and functionality offered by Win11Deblo
### Default Settings
Win11Debloat's default mode allows you to quickly and easily apply the changes that are recommended for most people. This includes removing many annoying distractions, disabling telemetry and tracking and optionally uninstalling the default or your custom selection of apps. To apply the default settings, launch the script as you normally would and select option `1` in the script menu.
Win11Debloat offers a default mode that allows you to quickly and easily apply the changes that are recommended for most people. This includes uninstalling apps that most would consider bloatware, removing many annoying distractions and disabling telemetry and tracking. To apply the default settings, launch the script as you normally would and select option `1` in the script menu. Alternatively, you can launch the script with the `-RunDefaults` parameter. Example:
Alternatively, you can launch the script with the `-RunDefaults` or `-RunDefaultsLite` parameters to immediately run the defaults without going through the menu or the app removal options. Using the `-RunDefaults` parameter will run the script in default mode and remove the default selection of apps. While using the `-RunDefaultsLite` parameter will run the script in default mode without removing any apps.
Example:
```Powershell
& ([scriptblock]::Create((irm "https://debloat.raphi.re/"))) -RunDefaults
```
#### Changes included in the default mode
- Remove the default or your custom selection of apps. (See below for the default selection of apps)
- Remove the default selection of bloatware apps. (See below for full list)
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
- Disable tips, tricks, suggestions and ads in start, settings, notifications, File Explorer, and on the lockscreen.
- Disable ads, suggestions and the MSN news feed in Microsoft Edge.
- Disable ads and the MSN news feed in Microsoft Edge.
- Disable & remove Bing web search, Bing AI and Cortana from Windows search.
- Disable & remove Microsoft Copilot.
- Disable Windows Recall snapshots. (W11 only)
- Disable & remove Microsoft Copilot. (W11 only)
- Disable Fast Start-up to ensure a full shutdown.
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
- Show file extensions for known file types.
- Hide the 3D objects folder under 'This pc' from File Explorer. (W10 only)
- Disable widgets on the taskbar & lockscreen.
- Disable the widget service & hide the icon from the taskbar.
- Hide the Chat (meet now) icon from the taskbar.
#### Apps that ARE removed as part of the default mode
These apps are uninstalled when you opt to remove the default selection of apps. This includes apps from both Microsoft and third parties.
<details>
<summary>Click to expand</summary>
<blockquote>
@@ -218,7 +212,6 @@ These apps are uninstalled when you opt to remove the default selection of apps.
- Microsoft.Office.Sway
- Microsoft.OneConnect
- Microsoft.Print3D
- Microsoft.StartExperiencesApp** (Widgets app)
- Microsoft.SkypeApp
- Microsoft.Todos
- Microsoft.WindowsAlarms
@@ -228,7 +221,6 @@ These apps are uninstalled when you opt to remove the default selection of apps.
- Microsoft.XboxApp (Old Xbox Console Companion App, no longer supported)
- Microsoft.ZuneVideo
- MicrosoftCorporationII.MicrosoftFamily (Microsoft Family Safety)
- MicrosoftCorporationII.QuickAssist (Remote assistance tool)
- MicrosoftTeams (Old personal version of MS Teams from the MS Store)
- MSTeams (New MS Teams app)
@@ -245,6 +237,7 @@ These apps are uninstalled when you opt to remove the default selection of apps.
- CyberLinkMediaSuiteEssentials
- DisneyMagicKingdoms
- Disney
- Dolby
- DrawboardPDF
- Duolingo-LearnLanguagesforFree
- EclipseManager
@@ -273,6 +266,7 @@ These apps are uninstalled when you opt to remove the default selection of apps.
- Shazam
- Sidia.LiveWallpaper
- SlingTV
- Speed Test
- Spotify
- TikTok
- TuneInRadio
@@ -282,15 +276,12 @@ These apps are uninstalled when you opt to remove the default selection of apps.
- Wunderlist
- XING
* Removed when disabling Bing web search, Bing AI and Cortana from Windows search
** Removed when disabling widgets on the taskbar & lockscreen
* App is removed when disabling Bing in Windows search.
</blockquote>
</details>
#### Apps that are NOT removed as part of the default mode
These apps are not removed by default. They will only be removed if you manually select them.
<details>
<summary>Click to expand</summary>
<blockquote>

Binary file not shown.

View File

@@ -3,7 +3,3 @@ Windows Registry Editor Version 5.00
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize]
"AppsUseLightTheme"=dword:00000000
"SystemUsesLightTheme"=dword:00000000
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"AppsUseLightTheme"="reg add HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize /v AppsUseLightTheme /t REG_DWORD /d 0 /f"
"SystemUsesLightTheme"="reg add HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize /v SystemUsesLightTheme /t REG_DWORD /d 0 /f"

View File

@@ -1,7 +0,0 @@
Windows Registry Editor Version 5.00
; Allow personalization of ads, Microsoft Edge, search, news and other Microsoft services by sending browsing history, favorites and collections, usage and other browsing data to Microsoft
; Allow sending required and optional diagnostic data about browser usage
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"PersonalizationReportingEnabled"=-
"DiagnosticData"=-

Binary file not shown.

View File

@@ -8,8 +8,7 @@ param (
[string]$User,
[switch]$CreateRestorePoint,
[switch]$RunAppsListGenerator, [switch]$RunAppConfigurator,
[switch]$RunDefaults,
[switch]$RunDefaultsLite,
[switch]$RunDefaults, [switch]$RunWin11Defaults,
[switch]$RunSavedSettings,
[switch]$RemoveApps,
[switch]$RemoveAppsCustom,
@@ -468,7 +467,7 @@ function ForceRemoveEdge {
$hklm = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $regView)
$hklm.CreateSubKey('SOFTWARE\Microsoft\EdgeUpdateDev').SetValue('AllowUninstall', '')
# Create stub (Creating this somehow allows uninstalling Edge)
# Create stub (Creating this somehow allows uninstalling edge)
$edgeStub = "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
New-Item $edgeStub -ItemType Directory | Out-Null
New-Item "$edgeStub\MicrosoftEdge.exe" | Out-Null
@@ -501,7 +500,7 @@ function ForceRemoveEdge {
Write-Output "Cleaning up registry..."
# Remove MS Edge from autostart
# Remove ms edge from autostart
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v "MicrosoftEdgeAutoLaunch_A9F6DCE4ABADF4F51CF45CD7129E3C6C" /f *>$null
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v "Microsoft Edge Update" /f *>$null
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" /v "MicrosoftEdgeAutoLaunch_A9F6DCE4ABADF4F51CF45CD7129E3C6C" /f *>$null
@@ -572,33 +571,6 @@ function CheckModernStandbySupport {
}
# Returns the directory path of the specified user, exits script if user path can't be found
function GetUserDirectory {
param (
$userName,
$fileName = "",
$exitIfPathNotFound = $true
)
$userDirectoryExists = Test-Path "$env:SystemDrive\Users\$userName"
$userPath = "$env:SystemDrive\Users\$userName\$fileName"
if ((Test-Path $userPath) -or ($userDirectoryExists -and (-not $exitIfPathNotFound))) {
return $userPath
}
$userDirectoryExists = Test-Path $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), "\$userName"
$userPath = $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), "\$userName\$fileName"
if ((Test-Path $userPath) -or ($userDirectoryExists -and (-not $exitIfPathNotFound))) {
return $userPath
}
Write-Host "Error: Unable to find user directory path for user $userName" -ForegroundColor Red
AwaitKeyToExit
}
# Import & execute regfile
function RegImport {
param (
@@ -609,14 +581,14 @@ function RegImport {
Write-Output $message
if ($script:Params.ContainsKey("Sysprep")) {
$defaultUserPath = GetUserDirectory -userName "Default" -fileName "NTUSER.DAT"
$defaultUserPath = $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), '\Default\NTUSER.DAT'
reg load "HKU\Default" $defaultUserPath | Out-Null
reg import "$PSScriptRoot\Regfiles\Sysprep\$path"
reg unload "HKU\Default" | Out-Null
}
elseif ($script:Params.ContainsKey("User")) {
$userPath = GetUserDirectory -userName $script:Params.Item("User") -fileName "NTUSER.DAT"
$userPath = $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), "\$($script:Params.Item("User"))\NTUSER.DAT"
reg load "HKU\Default" $userPath | Out-Null
reg import "$PSScriptRoot\Regfiles\Sysprep\$path"
@@ -679,7 +651,7 @@ function ReplaceStartMenuForAllUsers {
}
# Get path to start menu file for all users
$userPathString = GetUserDirectory -userName "*" -fileName "AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState"
$userPathString = $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), "\*\AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState"
$usersStartMenuPaths = get-childitem -path $userPathString
# Go through all users and replace the start menu file
@@ -688,7 +660,7 @@ function ReplaceStartMenuForAllUsers {
}
# Also replace the start menu file for the default user profile
$defaultStartMenuPath = GetUserDirectory -userName "Default" -fileName "AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState" -exitIfPathNotFound $false
$defaultStartMenuPath = $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), '\Default\AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState'
# Create folder if it doesn't exist
if (-not (Test-Path $defaultStartMenuPath)) {
@@ -713,7 +685,7 @@ function ReplaceStartMenu {
# Change path to correct user if a user was specified
if ($script:Params.ContainsKey("User")) {
$startMenuBinFile = GetUserDirectory -userName "$(GetUserName)" -fileName "AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState\start2.bin"
$startMenuBinFile = $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), "\$(GetUserName)\AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState\start2.bin"
}
# Check if template bin file exists, return early if it doesn't
@@ -727,11 +699,9 @@ function ReplaceStartMenu {
return
}
$userName = [regex]::Match($startMenuBinFile, '(?:Users\\)([^\\]+)(?:\\AppData)').Groups[1].Value
# Check if bin file exists, return early if it doesn't
if (-not (Test-Path $startMenuBinFile)) {
Write-Host "Error: Unable to replace start menu for user $userName, original start2.bin file not found" -ForegroundColor Red
Write-Host "Error: Unable to replace start menu for user $(GetUserName), original start2.bin file not found" -ForegroundColor Red
return
}
@@ -743,7 +713,7 @@ function ReplaceStartMenu {
# Copy template file
Copy-Item -Path $startMenuTemplate -Destination $startMenuBinFile -Force
Write-Output "Replaced start menu for user $userName"
Write-Output "Replaced start menu for user $(GetUserName)"
}
@@ -799,15 +769,12 @@ function PrintHeader {
function PrintFromFile {
param (
$path,
$title,
$printHeader = $true
$title
)
if ($printHeader) {
Clear-Host
Clear-Host
PrintHeader $title
}
PrintHeader $title
# Get & print script menu from file
Foreach ($line in (Get-Content -Path $path )) {
@@ -977,9 +944,9 @@ function DisplayCustomModeOptions {
Write-Output ""
if ($( Read-Host -Prompt "Disable tips, tricks, suggestions and ads in start, settings, notifications, explorer, lockscreen and Edge? (y/n)" ) -eq 'y') {
if ($( Read-Host -Prompt "Disable tips, tricks, suggestions and ads in start, settings, notifications, explorer, lockscreen and edge? (y/n)" ) -eq 'y') {
AddParameter 'DisableSuggestions' 'Disable tips, tricks, suggestions and ads in start, settings, notifications and File Explorer'
AddParameter 'DisableEdgeAds' 'Disable ads, suggestions and the MSN news feed in Microsoft Edge'
AddParameter 'DisableEdgeAds' 'Disable ads and the MSN news feed in Microsoft Edge'
AddParameter 'DisableSettings365Ads' 'Disable Microsoft 365 ads in Settings Home'
AddParameter 'DisableLockscreenTips' 'Disable tips & tricks on the lockscreen'
}
@@ -1199,8 +1166,8 @@ function DisplayCustomModeOptions {
Write-Output ""
if ($( Read-Host -Prompt " Disable the widgets service to remove widgets on the taskbar & lockscreen? (y/n)" ) -eq 'y') {
AddParameter 'DisableWidgets' 'Disable widgets on the taskbar & lockscreen'
if ($( Read-Host -Prompt " Disable the widgets service and hide the icon from the taskbar? (y/n)" ) -eq 'y') {
AddParameter 'DisableWidgets' 'Disable the widget service & hide the widget (news and interests) icon from the taskbar'
}
# Only show this options for Windows users running build 22621 or earlier
@@ -1388,9 +1355,15 @@ else {
$ProgressPreference = 'Continue'
}
# Make sure all requirements for Sysprep are met, if Sysprep is enabled
if ($script:Params.ContainsKey("Sysprep")) {
$defaultUserPath = GetUserDirectory -userName "Default"
$defaultUserPath = $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), '\Default\NTUSER.DAT'
# Exit script if default user directory or NTUSER.DAT file cannot be found
if (-not (Test-Path "$defaultUserPath")) {
Write-Host "Error: Unable to start Win11Debloat in Sysprep mode, cannot find default user folder at '$defaultUserPath'" -ForegroundColor Red
AwaitKeyToExit
}
# Exit script if run in Sysprep mode on Windows 10
if ($WinVersion -lt 22000) {
Write-Host "Error: Win11Debloat Sysprep mode is not supported on Windows 10" -ForegroundColor Red
@@ -1400,7 +1373,13 @@ if ($script:Params.ContainsKey("Sysprep")) {
# Make sure all requirements for User mode are met, if User is specified
if ($script:Params.ContainsKey("User")) {
$userPath = GetUserDirectory -userName $script:Params.Item("User")
$userPath = $env:USERPROFILE -Replace ('\\' + $env:USERNAME + '$'), "\$($script:Params.Item("User"))\NTUSER.DAT"
# Exit script if user directory or NTUSER.DAT file cannot be found
if (-not (Test-Path "$userPath")) {
Write-Host "Error: Unable to run Win11Debloat for user $($script:Params.Item("User")), cannot find user data at '$userPath'" -ForegroundColor Red
AwaitKeyToExit
}
}
# Remove SavedSettings file if it exists and is empty
@@ -1427,8 +1406,8 @@ if ($RunAppConfigurator -or $RunAppsListGenerator) {
}
# Change script execution based on provided parameters or user input
if ((-not $script:Params.Count) -or $RunDefaults -or $RunDefaultsLite -or $RunSavedSettings -or ($SPParamCount -eq $script:Params.Count)) {
if ($RunDefaults -or $RunDefaultsLite) {
if ((-not $script:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunSavedSettings -or ($SPParamCount -eq $script:Params.Count)) {
if ($RunDefaults -or $RunWin11Defaults) {
$Mode = '1'
}
elseif ($RunSavedSettings) {
@@ -1483,74 +1462,15 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunDefaultsLite -or $RunSa
switch ($Mode) {
# Default mode, loads defaults after confirmation
'1' {
if (-not $script:Params.ContainsKey('CreateRestorePoint')) {
$script:Params.Add('CreateRestorePoint', $true)
}
# Show the default settings with confirmation, unless Silent parameter was passed
if (-not $Silent) {
# Show options for app removal
if ((-not $RunDefaults) -and (-not $RunDefaultsLite)) {
PrintHeader 'Default Mode'
Do {
Write-Host "Options:" -ForegroundColor Yellow
Write-Host " (n) Don't remove any apps" -ForegroundColor Yellow
Write-Host " (1) Only remove the default selection of bloatware apps" -ForegroundColor Yellow
Write-Host " (2) Manually select which apps to remove" -ForegroundColor Yellow
$RemoveAppsInput = Read-Host "Do you want to remove any apps? Apps will be removed for all users (n/1/2)"
# Show app selection form if user entered option 3
if ($RemoveAppsInput -eq '2') {
$result = ShowAppSelectionForm
if ($result -ne [System.Windows.Forms.DialogResult]::OK) {
# User cancelled or closed app selection, show error and change RemoveAppsInput so the menu will be shown again
Write-Output ""
Write-Host "Cancelled application selection, please try again" -ForegroundColor Red
$RemoveAppsInput = 'c'
}
Write-Output ""
}
}
while ($RemoveAppsInput -ne 'n' -and $RemoveAppsInput -ne '0' -and $RemoveAppsInput -ne '1' -and $RemoveAppsInput -ne '2')
} elseif ($RunDefaultsLite) {
$RemoveAppsInput = '0'
} else {
$RemoveAppsInput = '1'
}
PrintFromFile "$PSScriptRoot/Assets/Menus/DefaultSettings" "Default Mode"
PrintHeader 'Default Mode'
Write-Output "Win11Debloat will make the following changes:"
# Select correct option based on user input
switch ($RemoveAppsInput) {
'1' {
if (-not $script:Params.ContainsKey('RemoveApps')) {
$script:Params.Add('RemoveApps', $true)
}
Write-Output "- Remove the default selection of apps."
}
'2' {
if (-not $script:Params.ContainsKey('RemoveAppsCustom')) {
$script:Params.Add('RemoveAppsCustom', $true)
}
Write-Output "- Remove your custom selection of $($script:SelectedApps.Count) apps."
}
}
PrintFromFile "$PSScriptRoot/Assets/Menus/DefaultSettings" "Default Mode" $false
Write-Output "Press enter to execute the script or press CTRL+C to quit..."
Read-Host | Out-Null
}
$DefaultParameterNames = 'DisableTelemetry','DisableBing','DisableLockscreenTips','DisableSuggestions','DisableEdgeAds','ShowKnownFileExt','DisableWidgets','HideChat','DisableFastStartup','DisableCopilot'
$DefaultParameterNames = 'CreateRestorePoint','RemoveApps','DisableTelemetry','DisableBing','DisableLockscreenTips','DisableSuggestions','DisableEdgeAds','ShowKnownFileExt','DisableWidgets','HideChat','DisableCopilot','DisableFastStartup'
PrintHeader 'Default Mode'
@@ -1566,16 +1486,10 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunDefaultsLite -or $RunSa
$script:Params.Add('Hide3dObjects', $Hide3dObjects)
}
# Only add these options for Windows 11 users (build 22000+), if it doesn't already exist
if ($WinVersion -ge 22000) {
if (-not $script:Params.ContainsKey('DisableRecall')) {
$script:Params.Add('DisableRecall', $true)
}
if ($script:ModernStandbySupported -and (-not $script:Params.ContainsKey('DisableModernStandbyNetworking'))) {
$script:Params.Add('DisableModernStandbyNetworking', $true)
}
}
# Only add this option for Windows 11 users (build 22000+), if it doesn't already exist
if (($WinVersion -ge 22000) -and $script:ModernStandbySupported -and (-not $script:Params.ContainsKey('DisableModernStandbyNetworking'))) {
$script:Params.Add('DisableModernStandbyNetworking', $true)
}
}
# Custom mode, show & add options based on user input
@@ -1737,7 +1651,7 @@ switch ($script:Params.Keys) {
continue
}
'DisableEdgeAds' {
RegImport "> Disabling ads, suggestions and the MSN news feed in Microsoft Edge..." "Disable_Edge_Ads_And_Suggestions.reg"
RegImport "> Disabling ads and the MSN news feed in Microsoft Edge..." "Disable_Edge_Ads_And_Suggestions.reg"
continue
}
{$_ -in "DisableLockscrTips", "DisableLockscreenTips"} {
@@ -1873,7 +1787,7 @@ switch ($script:Params.Keys) {
continue
}
{$_ -in "HideWidgets", "DisableWidgets"} {
RegImport "> Disabling widgets on the taskbar & lockscreen..." "Disable_Widgets_Service.reg"
RegImport "> Disabling the widget service and hiding the widget icon from the taskbar..." "Disable_Widgets_Taskbar.reg"
# Also remove the app package for Widgets
$appsList = 'Microsoft.StartExperiencesApp'