Minor improvements & changes

* The script now clearly states no changes were made if the user doesn't select any during setup.
* Updated info page inside the script.
* Silent parameter now suppresses more prompts.
This commit is contained in:
Raphire
2023-09-28 16:11:04 +02:00
parent 1b6ce050ab
commit 20e96f0e39
2 changed files with 163 additions and 150 deletions

View File

@@ -3,8 +3,8 @@
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
Win11Debloat is a simple and lightweight powershell script that removes pre-installed Win11Debloat is a simple and lightweight powershell script that removes pre-installed
windows bloatware apps, disables telemetry and declutters the experience by disabling windows bloatware apps, disables telemetry and declutters the experience by disabling
or removing intrusive interface elements, ads and context menu items. No need to or removing intrusive interface elements, ads and more. No need to painstakingly go
painstakingly go through all the settings yourself, or removing apps one by one! through all the settings yourself, or removing apps one by one!
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
Using the default configuration the script will Using the default configuration the script will
@@ -12,12 +12,11 @@ painstakingly go 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 bloatware apps, the list can be found in the 'Appslist.txt' file.
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads. - Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
- Disable bing search & cortana in windows search. - Disable bing search & cortana in windows search.
- Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper) - Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen.
- Disable tips, tricks and suggestions in the start menu and settings, and ads in windows explorer.
- Show file extensions for known file types. - Show file extensions for known file types.
- Disable the widget service & hide the widget (news and interests) icon from the taskbar. - Disable the widget service & hide the widget (news and interests) icon from the taskbar.
- Hide the Chat (meet now) icon from the taskbar. - Hide the Chat (meet now) icon from the taskbar.
- Hide the 3D objects folder in windows explorer. (Windows 10 only) - Hide the 3D objects folder under 'This pc' in windows explorer. (Windows 10 only)
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
Using the custom mode you can Using the custom mode you can
@@ -25,17 +24,17 @@ painstakingly go 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 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 gaming-related apps, the list can be found in the 'GamingAppslist.txt' file.
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads. - Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
- Disable bing search & cortana in windows search. - Disable bing search, bing AI & cortana in windows search.
- Disable tips & tricks on the lockscreen. (This may change your lockscreen wallpaper) - Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen.
- Disable tips, tricks and suggestions in the start menu and settings, and ads in windows explorer.
- Show hidden files, folders and drives. - Show hidden files, folders and drives.
- Show file extensions for known file types. - Show file extensions for known file types.
- 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) - Align taskbar icons to the left. (Windows 11 only)
- Hide or change the search icon/box on the taskbar. (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) - Hide the taskview button from the taskbar. (Windows 11 only)
- Disable Windows copilot. (Windows 11 only)
- Disable the widget service & hide the widget (news and interests) icon from the taskbar. - Disable the widget service & hide the widget (news and interests) icon from the taskbar.
- Hide the Chat (meet now) icon from the taskbar. - Hide the chat (meet now) icon from the taskbar.
- Hide the 3D objects, music or onedrive folders in windows explorer. (Windows 10 only) - 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) - Hide the 'Include in library', 'Give access to' and 'Share' options in the context menu. (Windows 10 only)

View File

@@ -156,7 +156,7 @@ function ClearStartMenu {
} }
$SPParams = 'WhatIf', 'Confirm', 'Verbose' $SPParams = 'WhatIf', 'Confirm', 'Verbose', 'Silent'
$SPParamCount = 0 $SPParamCount = 0
foreach ($param in $SPParams) { foreach ($param in $SPParams) {
@@ -182,7 +182,7 @@ if ((-Not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
$Mode = Read-Host "Please select an option (1/2/0)" $Mode = Read-Host "Please select an option (1/2/0)"
# Show information based on user input # Show information based on user input, Suppress user prompt if Silent parameter was passed
if ($Mode -eq '0') { if ($Mode -eq '0') {
Clear-Host Clear-Host
@@ -194,7 +194,7 @@ if ((-Not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
Write-Output "Press any key to go back..." Write-Output "Press any key to go back..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
} }
elseif ($Mode -eq '1') { elseif (-Not $Silent -and ($Mode -eq '1')) {
Clear-Host Clear-Host
# Get & print default settings info from file # Get & print default settings info from file
@@ -409,11 +409,14 @@ if ((-Not $PSBoundParameters.Count) -or $RunDefaults -or $RunWin11Defaults -or (
} }
} }
# Suppress prompt if Silent parameter was passed
if (-Not $Silent) {
Write-Output "" Write-Output ""
Write-Output "" Write-Output ""
Write-Output "" Write-Output ""
Write-Output "Press any key to confirm your choices and execute the script..." Write-Output "Press any key to confirm your choices and execute the script..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
Clear-Host Clear-Host
Write-Output "-------------------------------------------------------------------------------------------" Write-Output "-------------------------------------------------------------------------------------------"
@@ -430,8 +433,19 @@ else {
} }
# Execute all selected/provided parameters if ($SPParamCount -eq $PSBoundParameters.Keys.Count) {
switch ($PSBoundParameters.Keys) { Write-Output "The script completed without making any changes."
# Suppress prompt if Silent parameter was passed
if(-Not $Silent) {
Write-Output ""
Write-Output "Press any key to exit..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
}
else {
# Execute all selected/provided parameters
switch ($PSBoundParameters.Keys) {
'RemoveApps' { 'RemoveApps' {
RemoveApps "$PSScriptRoot/Appslist.txt" "> Removing pre-installed windows apps..." RemoveApps "$PSScriptRoot/Appslist.txt" "> Removing pre-installed windows apps..."
Write-Output "" Write-Output ""
@@ -552,18 +566,18 @@ switch ($PSBoundParameters.Keys) {
Write-Output "" Write-Output ""
continue continue
} }
} }
RestartExplorer RestartExplorer
Write-Output "" Write-Output ""
Write-Output "" Write-Output ""
Write-Output "Script completed successfully!" Write-Output "Script completed successfully!"
# Suppress prompt if Silent parameter was passed # Suppress prompt if Silent parameter was passed
if(-Not $Silent) { if(-Not $Silent) {
Write-Output "" Write-Output ""
Write-Output "Press any key to exit..." Write-Output "Press any key to exit..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
} }