Disassembler0 / Win10-Initial-Setup-Script

PowerShell script for automation of routine tasks done after fresh installations of Windows 10 / Server 2016 / Server 2019
MIT License
4.69k stars 1.08k forks source link

Version 3.8 breaks searching apps on Windows 10 2004 (build 19041) #298

Closed mariobesen closed 4 years ago

mariobesen commented 4 years ago

I clean installed build 19041 that is RTM build for Windows 10 version 2004. I have enabled function "DisableBackgroundApps" which broke search functionality for applications in Start Menu.

After sniffing around registry I noticed that removing "Disabled" and "DisabledByUser" DWORDs from Microsoft.Windows.Search key fixed the issue.

Location in registry hive: Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.Windows.Search_cw5n1h2txyewy

Suggestion for a fix - adding exclusion for Microsoft.Windows.Search

# Disable Background application access - ie. if apps can download or update when they aren't used
# Cortana is excluded as its inclusion breaks start menu search, ShellExperience host breaks toasts and notifications
Function DisableBackgroundApps {
    Write-Output "Disabling Background application access..."
    Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*","Microsoft.Windows.ShellExperienceHost*", "Microsoft.Windows.Search*" | ForEach-Object {
        Set-ItemProperty -Path $_.PsPath -Name "Disabled" -Type DWord -Value 1
        Set-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -Type DWord -Value 1
    }
}