Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit 5a66227

Browse files
committed
Fix Start menu search on 2004, closes #298 (thx @mariobesen)
1 parent ffacb06 commit 5a66227

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Win10.psm1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,15 @@ Function EnableActivityHistory {
221221
}
222222

223223
# Disable Background application access - ie. if apps can download or update when they aren't used
224-
# Cortana is excluded as its inclusion breaks start menu search, ShellExperience host breaks toasts and notifications
224+
# Cortana (resp. Search since 2004) is excluded as its inclusion breaks start menu search, ShellExperienceHost breaks toasts and notifications
225225
Function DisableBackgroundApps {
226226
Write-Output "Disabling Background application access..."
227-
Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*","Microsoft.Windows.ShellExperienceHost*" | ForEach-Object {
227+
If ([System.Environment]::OSVersion.Version.Build -ge 19041) {
228+
$exclude = "Microsoft.Windows.Search*", "Microsoft.Windows.ShellExperienceHost*"
229+
} Else {
230+
$exclude = "Microsoft.Windows.Cortana*", "Microsoft.Windows.ShellExperienceHost*"
231+
}
232+
Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude $exclude | ForEach-Object {
228233
Set-ItemProperty -Path $_.PsPath -Name "Disabled" -Type DWord -Value 1
229234
Set-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -Type DWord -Value 1
230235
}

0 commit comments

Comments
 (0)