This repository was archived by the owner on May 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -221,10 +221,15 @@ Function EnableActivityHistory {
221
221
}
222
222
223
223
# 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
225
225
Function DisableBackgroundApps {
226
226
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 {
228
233
Set-ItemProperty - Path $_.PsPath - Name " Disabled" - Type DWord - Value 1
229
234
Set-ItemProperty - Path $_.PsPath - Name " DisabledByUser" - Type DWord - Value 1
230
235
}
You can’t perform that action at this time.
0 commit comments