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.7k stars 1.07k forks source link

Action center and Push notification broken #164

Closed giabit closed 6 years ago

giabit commented 6 years ago

I customized the script adding my preset, and I would like to preserve the action center and push notifications (with modern toast). If I run the script with the configuration reported below, toast notifications don't appear neither in the action center panel, anyway the counter on the action center icon increases.

Here is my configuration: custom.preset (one command each line...)

HideDefenderTrayIcon
DisableDefender
DisableDefenderCloud
DisableDownloadBlocking
DisableSmartScreen
DisableUpdateMSRT
!DisableUpdateRestart
DisableRestorePoints
DisableDefragmentation
DisableAutoRebootOnCrash
!DisableActionCenter
!HideNetworkFromLockScreen
!HideShutdownFromLockScreen
!DisableStickyKeys
!HideTaskbarSearch
ShowTaskbarSearchIcon
!ShowSmallTaskbarIcons
!SetTaskbarCombineWhenFull
!ShowTrayIcons
HideRecentlyAddedApps
!SetVisualFXPerformance
!EnableNavPaneExpand
!HideQuickAccess
!HideDesktopFromThisPC
!HideDocumentsFromThisPC
!HideDownloadsFromThisPC
!HideMusicFromThisPC
!HidePicturesFromThisPC
!Restart
!HideVideosFromThisPC

Default.cmd

@powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Win10.ps1" -include "%~dp0Win10.psm1" -preset "%~dpn0.preset" !Restart -preset "custom.preset" WaitForKey Restart

Running on Windows 10 Pro 1809 and 1803

Disassembler0 commented 6 years ago

Yup, can reproduce. The offending tweak is DisableBackgroundApps. Specifically disabling background access for Microsoft.Windows.ShellExperienceHost.

Run the snippet below, then log out and log back in and the problem should be fixed.

Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.Windows.ShellExperienceHost*" -Name "Disabled" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.Windows.ShellExperienceHost*" -Name "DisabledByUser" -ErrorAction SilentlyContinue

I will also fix the tweak itself. There is already one exclusion for Microsoft.Windows.Cortana which would otherwise break Start Menu search, so this is pretty much the same case.

giabit commented 6 years ago

Thank you!! It works!