diff --git a/src/playbook/Executables/DISABLENOTIFS.cmd b/src/playbook/Executables/DISABLENOTIFS.cmd index 6bf9f1f265..179d480522 100644 --- a/src/playbook/Executables/DISABLENOTIFS.cmd +++ b/src/playbook/Executables/DISABLENOTIFS.cmd @@ -30,6 +30,6 @@ for /f "tokens=5 delims=\" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Ser :: Apply changes taskkill /f /im explorer.exe > nul 2>&1 taskkill /f /im ShellExperienceHost.exe > nul 2>&1 -start explorer.exe +tasklist | find "explorer.exe" > nul || start explorer.exe echo Disabled notifications. \ No newline at end of file diff --git a/src/playbook/Executables/ENABLENOTIFS.cmd b/src/playbook/Executables/ENABLENOTIFS.cmd index fef6891d07..1e73550482 100644 --- a/src/playbook/Executables/ENABLENOTIFS.cmd +++ b/src/playbook/Executables/ENABLENOTIFS.cmd @@ -1,7 +1,7 @@ @echo off :: Revert Registry changes -reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" > nul +reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /f > nul reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener" /v "Value" /t REG_SZ /d "Allow" /f > nul reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_NOTIFICATION_SOUND" /t REG_DWORD /d "1" /f > nul reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d "1" /f > nul @@ -19,6 +19,6 @@ for %%a in ( :: Apply changes taskkill /f /im explorer.exe > nul 2>&1 taskkill /f /im ShellExperienceHost.exe > nul 2>&1 -start explorer.exe +tasklist | find "explorer.exe" > nul || start explorer.exe echo Enabled notifications. \ No newline at end of file