使用ps修改以下Windows注册表项可能会成功(对于W10):
HKCU\Software\Policies\Microsoft\Windows\Explorer : DisableNotificationCenter
HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications : ToastEnabled
代码应如下所示:
Set-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0