diff --git a/scripts/main.ps1 b/scripts/main.ps1 index d0fb1b3fed..61f6845fd0 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -452,8 +452,8 @@ $sync["SearchBar"].Add_TextChanged({ $textToSearch = $sync.SearchBar.Text.ToLower() foreach ($CheckBox in $CheckBoxes) { - # Check if the checkbox is null or if it doesn't have content - if ($CheckBox -eq $null -or $CheckBox.Value -eq $null -or $CheckBox.Value.Content -eq $null) { + # Skip if the checkbox is null, it doesn't have content or it is the prefer Choco checkbox + if ($CheckBox -eq $null -or $CheckBox.Value -eq $null -or $CheckBox.Value.Content -eq $null -or $CheckBox.Name -eq "WPFpreferChocolatey") { continue }