mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-10-08 22:46:50 +00:00
fix: remove the DisableSearchHistory and DisableSearchHighlights switches (#800)
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -27,7 +27,6 @@ param (
|
||||
[switch]$EnableWindowsSandbox,
|
||||
[switch]$EnableWindowsSubsystemForLinux,
|
||||
[switch]$DisableTelemetry,
|
||||
[switch]$DisableSearchHistory,
|
||||
[switch]$DisableFastStartup,
|
||||
[switch]$DisableBitlockerAutoEncryption,
|
||||
[switch]$DisableModernStandbyNetworking,
|
||||
@@ -73,7 +72,6 @@ param (
|
||||
[switch]$DisableNotepadAI,
|
||||
[switch]$DisableEdgeAI,
|
||||
[switch]$DisableChromeAI,
|
||||
[switch]$DisableSearchHighlights,
|
||||
[switch]$DisableWidgets,
|
||||
[switch]$HideChat,
|
||||
[switch]$EnableEndTask,
|
||||
|
||||
@@ -104,4 +104,28 @@ Describe 'FeatureId parameter contracts' {
|
||||
|
||||
$missing | Should -HaveCount 0 -Because ($missing -join ', ')
|
||||
}
|
||||
|
||||
It 'accounts for every Win11Debloat.ps1 parameter as a FeatureId or a control parameter' {
|
||||
$tokens = $null
|
||||
$parseErrors = $null
|
||||
$ast = [System.Management.Automation.Language.Parser]::ParseFile($script:Win11DebloatPath, [ref]$tokens, [ref]$parseErrors)
|
||||
$parseErrors | Should -BeNullOrEmpty
|
||||
|
||||
$assignment = $ast.Find({
|
||||
param($node)
|
||||
$node -is [System.Management.Automation.Language.AssignmentStatementAst] -and $node.Left.Extent.Text -eq '$script:ControlParams'
|
||||
}, $true)
|
||||
$assignment | Should -Not -BeNullOrEmpty
|
||||
|
||||
$controlParameters = @(
|
||||
$assignment.Right.FindAll({ param($node) $node -is [System.Management.Automation.Language.StringConstantExpressionAst] }, $true) |
|
||||
ForEach-Object { $_.Value }
|
||||
)
|
||||
$unaccounted = @(
|
||||
Get-ScriptParameterNames -Path $script:Win11DebloatPath |
|
||||
Where-Object { $script:Features.FeatureId -notcontains $_ -and $controlParameters -notcontains $_ }
|
||||
)
|
||||
|
||||
$unaccounted | Should -HaveCount 0 -Because ($unaccounted -join ', ')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ param (
|
||||
[switch]$EnableWindowsSandbox,
|
||||
[switch]$EnableWindowsSubsystemForLinux,
|
||||
[switch]$DisableTelemetry,
|
||||
[switch]$DisableSearchHistory,
|
||||
[switch]$DisableFastStartup,
|
||||
[switch]$DisableBitlockerAutoEncryption,
|
||||
[switch]$DisableModernStandbyNetworking,
|
||||
@@ -37,7 +36,6 @@ param (
|
||||
[switch]$DisableBing,
|
||||
[switch]$DisableNotifications,
|
||||
[switch]$DisableStoreSearchSuggestions,
|
||||
[switch]$DisableSearchHighlights,
|
||||
[switch]$DisableDesktopSpotlight,
|
||||
[switch]$HideDesktopSpotlightIcon,
|
||||
[switch]$EnableDesktopSpotlight,
|
||||
|
||||
Reference in New Issue
Block a user