mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-06-10 02:26:29 +00:00
Remove RemoveCommApps and RemoveW11Outlook presets
These are largely redundant. Use -RemoveApps parameter instead
This commit is contained in:
@@ -319,36 +319,12 @@
|
||||
"MinVersion": null,
|
||||
"MaxVersion": null
|
||||
},
|
||||
{
|
||||
"FeatureId": "RemoveCommApps",
|
||||
"Label": "Remove the Mail, Calendar, and People apps",
|
||||
"Category": null,
|
||||
"RegistryKey": null,
|
||||
"ApplyText": "Removing selected apps...",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
"MinVersion": null,
|
||||
"MaxVersion": null
|
||||
},
|
||||
{
|
||||
"FeatureId": "RemoveW11Outlook",
|
||||
"Label": "Remove the new Outlook for Windows app",
|
||||
"Category": null,
|
||||
"RegistryKey": null,
|
||||
"ApplyText": "Removing selected apps...",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
"MinVersion": null,
|
||||
"MaxVersion": null
|
||||
},
|
||||
{
|
||||
"FeatureId": "RemoveGamingApps",
|
||||
"Label": "Remove the Xbox App and Xbox Gamebar",
|
||||
"Category": null,
|
||||
"RegistryKey": null,
|
||||
"ApplyText": "Removing selected apps...",
|
||||
"ApplyText": "Removing gaming related apps...",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
@@ -360,7 +336,7 @@
|
||||
"Label": "Remove HP OEM applications",
|
||||
"Category": null,
|
||||
"RegistryKey": null,
|
||||
"ApplyText": "Removing selected apps...",
|
||||
"ApplyText": "Removing HP apps...",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
@@ -553,7 +529,7 @@
|
||||
"Label": "Remove all pinned apps from the start menu for this user only",
|
||||
"Category": "Start Menu & Search",
|
||||
"RegistryKey": null,
|
||||
"ApplyText": null,
|
||||
"ApplyText": "Removing all pinned apps from the start menu",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
@@ -565,7 +541,7 @@
|
||||
"Label": "Remove all pinned apps from the start menu for all existing and new users",
|
||||
"Category": "Start Menu & Search",
|
||||
"RegistryKey": null,
|
||||
"ApplyText": null,
|
||||
"ApplyText": "Removing all pinned apps from the start menu for all users",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
@@ -577,7 +553,7 @@
|
||||
"Label": "Replace the start menu layout for this user only with the provided template file",
|
||||
"Category": null,
|
||||
"RegistryKey": null,
|
||||
"ApplyText": null,
|
||||
"ApplyText": "Replacing the start menu",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
@@ -589,7 +565,7 @@
|
||||
"Label": "Replace the start menu layout for all existing and new users with the provided template file",
|
||||
"Category": null,
|
||||
"RegistryKey": null,
|
||||
"ApplyText": null,
|
||||
"ApplyText": "Replacing the start menu for all users",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
@@ -654,7 +630,7 @@
|
||||
"ToolTip": "This will disable the Microsoft Store app suggestions in Windows search.",
|
||||
"Category": "Start Menu & Search",
|
||||
"RegistryKey": null,
|
||||
"ApplyText": null,
|
||||
"ApplyText": "Disabling Microsoft Store app suggestions in search...",
|
||||
"UndoLabel": "Enable Microsoft Store app suggestions in search",
|
||||
"ApplyUndoText": "Enabling Microsoft Store app suggestions in search...",
|
||||
"RegistryUndoKey": null,
|
||||
@@ -966,7 +942,7 @@
|
||||
"Category": "Taskbar",
|
||||
"Priority": 4,
|
||||
"RegistryKey": null,
|
||||
"ApplyText": null,
|
||||
"ApplyText": "Disabling widgets on the taskbar & lock screen...",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
@@ -1365,7 +1341,7 @@
|
||||
"Label": "Forcefully uninstall Microsoft Edge. NOT RECOMMENDED!",
|
||||
"Category": null,
|
||||
"RegistryKey": null,
|
||||
"ApplyText": null,
|
||||
"ApplyText": "Forcefully uninstalling Microsoft Edge...",
|
||||
"UndoLabel": null,
|
||||
"ApplyUndoText": null,
|
||||
"RegistryUndoKey": null,
|
||||
|
||||
@@ -1,55 +1,3 @@
|
||||
# Resolves the path of an undo reg file relative to $script:RegfilesPath.
|
||||
# Checks the Undo/ subfolder first, then falls back to the root Regfiles/ folder.
|
||||
function Resolve-UndoRegFilePath {
|
||||
param ([string]$FileName)
|
||||
$undoSubPath = Join-Path 'Undo' $FileName
|
||||
if (Test-Path (Join-Path $script:RegfilesPath $undoSubPath)) {
|
||||
return $undoSubPath
|
||||
}
|
||||
return $FileName
|
||||
}
|
||||
|
||||
function Invoke-UndoFeatureAction {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$FeatureId
|
||||
)
|
||||
|
||||
switch ($FeatureId) {
|
||||
'DisableStoreSearchSuggestions' {
|
||||
if ($script:Params.ContainsKey('Sysprep')) {
|
||||
Write-Host "> Re-enabling Microsoft Store search suggestions in the start menu for all users..."
|
||||
EnableStoreSearchSuggestionsForAllUsers
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "> Re-enabling Microsoft Store search suggestions for user $(GetUserName)..."
|
||||
EnableStoreSearchSuggestions
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
'EnableWindowsSandbox' {
|
||||
Write-Host "> Disabling Windows Sandbox..."
|
||||
DisableWindowsFeature 'Containers-DisposableClientVM'
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
'EnableWindowsSubsystemForLinux' {
|
||||
Write-Host "> Disabling Windows Subsystem for Linux..."
|
||||
DisableWindowsFeature 'Microsoft-Windows-Subsystem-Linux'
|
||||
DisableWindowsFeature 'VirtualMachinePlatform'
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
default {
|
||||
Write-Host "> No undo action defined for $FeatureId, skipping..." -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Executes a single parameter/feature based on its key
|
||||
# Parameters:
|
||||
# $paramKey - The parameter name to execute
|
||||
@@ -85,7 +33,7 @@ function ExecuteParameter {
|
||||
# Handle features without RegistryKey or with special logic
|
||||
switch ($paramKey) {
|
||||
'RemoveApps' {
|
||||
Write-Host "> Removing selected apps for $(GetFriendlyTargetUserName)..."
|
||||
Write-Host "> $($feature.ApplyText) for $(GetFriendlyTargetUserName)..."
|
||||
$appsList = GenerateAppsList
|
||||
|
||||
if ($appsList.Count -eq 0) {
|
||||
@@ -98,7 +46,7 @@ function ExecuteParameter {
|
||||
RemoveApps $appsList
|
||||
}
|
||||
'RemoveAppsCustom' {
|
||||
Write-Host "> Removing selected apps..."
|
||||
Write-Host "> $($feature.ApplyText)..."
|
||||
$appsList = LoadAppsFromFile $script:CustomAppsListFilePath
|
||||
|
||||
if ($appsList.Count -eq 0) {
|
||||
@@ -110,58 +58,46 @@ function ExecuteParameter {
|
||||
Write-Host "$($appsList.Count) apps selected for removal"
|
||||
RemoveApps $appsList
|
||||
}
|
||||
'RemoveCommApps' {
|
||||
$appsList = @('Microsoft.windowscommunicationsapps', 'Microsoft.People')
|
||||
Write-Host "> Removing Mail, Calendar and People apps..."
|
||||
RemoveApps $appsList
|
||||
return
|
||||
}
|
||||
'RemoveW11Outlook' {
|
||||
$appsList = @('Microsoft.OutlookForWindows')
|
||||
Write-Host "> Removing new Outlook for Windows app..."
|
||||
RemoveApps $appsList
|
||||
return
|
||||
}
|
||||
'RemoveGamingApps' {
|
||||
$appsList = @('Microsoft.GamingApp', 'Microsoft.XboxGameOverlay', 'Microsoft.XboxGamingOverlay')
|
||||
Write-Host "> Removing gaming related apps..."
|
||||
Write-Host "> $($feature.ApplyText)..."
|
||||
RemoveApps $appsList
|
||||
return
|
||||
}
|
||||
'RemoveHPApps' {
|
||||
$appsList = @('AD2F1837.HPAIExperienceCenter', 'AD2F1837.HPJumpStarts', 'AD2F1837.HPPCHardwareDiagnosticsWindows', 'AD2F1837.HPPowerManager', 'AD2F1837.HPPrivacySettings', 'AD2F1837.HPSupportAssistant', 'AD2F1837.HPSureShieldAI', 'AD2F1837.HPSystemInformation', 'AD2F1837.HPQuickDrop', 'AD2F1837.HPWorkWell', 'AD2F1837.myHP', 'AD2F1837.HPDesktopSupportUtilities', 'AD2F1837.HPQuickTouch', 'AD2F1837.HPEasyClean', 'AD2F1837.HPConnectedMusic', 'AD2F1837.HPFileViewer', 'AD2F1837.HPRegistration', 'AD2F1837.HPWelcome', 'AD2F1837.HPConnectedPhotopoweredbySnapfish', 'AD2F1837.HPPrinterControl')
|
||||
Write-Host "> Removing HP apps..."
|
||||
Write-Host "> $($feature.ApplyText)..."
|
||||
RemoveApps $appsList
|
||||
return
|
||||
}
|
||||
'DisableWidgets' {
|
||||
Write-Host "> Disabling widgets on the taskbar & lock screen..."
|
||||
Write-Host "> $($feature.ApplyText)..."
|
||||
# Stop widgets related processes before removing the app packages to prevent potential issues
|
||||
Get-Process *Widget* -ErrorAction SilentlyContinue | Stop-Process
|
||||
|
||||
|
||||
RemoveApps @('Microsoft.StartExperiencesApp','MicrosoftWindows.Client.WebExperience','Microsoft.WidgetsPlatformRuntime')
|
||||
}
|
||||
"EnableWindowsSandbox" {
|
||||
Write-Host "> Enabling Windows Sandbox..."
|
||||
'EnableWindowsSandbox' {
|
||||
Write-Host "> $($feature.ApplyText)..."
|
||||
EnableWindowsFeature "Containers-DisposableClientVM"
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
"EnableWindowsSubsystemForLinux" {
|
||||
Write-Host "> Enabling Windows Subsystem for Linux..."
|
||||
'EnableWindowsSubsystemForLinux' {
|
||||
Write-Host "> $($feature.ApplyText)..."
|
||||
EnableWindowsFeature "VirtualMachinePlatform"
|
||||
EnableWindowsFeature "Microsoft-Windows-Subsystem-Linux"
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
'ClearStart' {
|
||||
Write-Host "> Removing all pinned apps from the start menu for user $(GetUserName)..."
|
||||
Write-Host "> $($feature.ApplyText) for user $(GetUserName)..."
|
||||
ReplaceStartMenu
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
'ReplaceStart' {
|
||||
Write-Host "> Replacing the start menu for user $(GetUserName)..."
|
||||
Write-Host "> $($feature.ApplyText) for user $(GetUserName)..."
|
||||
ReplaceStartMenu $script:Params.Item("ReplaceStart")
|
||||
Write-Host ""
|
||||
return
|
||||
@@ -309,4 +245,58 @@ function ExecuteAllChanges {
|
||||
Write-Host ""
|
||||
Write-Host "$($script:RegistryImportFailures) registry import change(s) failed. See output above for details." -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Resolves the path of an undo reg file relative to $script:RegfilesPath.
|
||||
# Checks the Undo/ subfolder first, then falls back to the root Regfiles/ folder.
|
||||
function Resolve-UndoRegFilePath {
|
||||
param ([string]$FileName)
|
||||
$undoSubPath = Join-Path 'Undo' $FileName
|
||||
if (Test-Path (Join-Path $script:RegfilesPath $undoSubPath)) {
|
||||
return $undoSubPath
|
||||
}
|
||||
return $FileName
|
||||
}
|
||||
|
||||
function Invoke-UndoFeatureAction {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$FeatureId
|
||||
)
|
||||
|
||||
$feature = if ($script:Features.ContainsKey($FeatureId)) { $script:Features[$FeatureId] } else { $null }
|
||||
|
||||
switch ($FeatureId) {
|
||||
'DisableStoreSearchSuggestions' {
|
||||
if ($script:Params.ContainsKey('Sysprep')) {
|
||||
Write-Host "> Re-enabling Microsoft Store search suggestions in the start menu for all users..."
|
||||
EnableStoreSearchSuggestionsForAllUsers
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "> Re-enabling Microsoft Store search suggestions for user $(GetUserName)..."
|
||||
EnableStoreSearchSuggestions
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
'EnableWindowsSandbox' {
|
||||
Write-Host "> $($feature.ApplyUndoText)..."
|
||||
DisableWindowsFeature 'Containers-DisposableClientVM'
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
'EnableWindowsSubsystemForLinux' {
|
||||
Write-Host "> $($feature.ApplyUndoText)..."
|
||||
DisableWindowsFeature 'Microsoft-Windows-Subsystem-Linux'
|
||||
DisableWindowsFeature 'VirtualMachinePlatform'
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
default {
|
||||
Write-Host "> No undo action defined for $FeatureId, skipping..." -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,7 @@ param (
|
||||
[switch]$RemoveApps,
|
||||
[switch]$RemoveAppsCustom,
|
||||
[switch]$RemoveGamingApps,
|
||||
[switch]$RemoveCommApps,
|
||||
[switch]$RemoveHPApps,
|
||||
[switch]$RemoveW11Outlook,
|
||||
[switch]$ForceRemoveEdge,
|
||||
[switch]$DisableDVR,
|
||||
[switch]$DisableGameBarIntegration,
|
||||
|
||||
@@ -17,9 +17,7 @@ param (
|
||||
[switch]$RemoveApps,
|
||||
[switch]$RemoveAppsCustom,
|
||||
[switch]$RemoveGamingApps,
|
||||
[switch]$RemoveCommApps,
|
||||
[switch]$RemoveHPApps,
|
||||
[switch]$RemoveW11Outlook,
|
||||
[switch]$ForceRemoveEdge,
|
||||
[switch]$DisableDVR,
|
||||
[switch]$DisableGameBarIntegration,
|
||||
|
||||
@@ -17,9 +17,7 @@ param (
|
||||
[switch]$RemoveApps,
|
||||
[switch]$RemoveAppsCustom,
|
||||
[switch]$RemoveGamingApps,
|
||||
[switch]$RemoveCommApps,
|
||||
[switch]$RemoveHPApps,
|
||||
[switch]$RemoveW11Outlook,
|
||||
[switch]$ForceRemoveEdge,
|
||||
[switch]$DisableDVR,
|
||||
[switch]$DisableGameBarIntegration,
|
||||
|
||||
Reference in New Issue
Block a user