From 55d14f82b9f61cece79aa95cd875cedd3ddc9c8f Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Sun, 6 Oct 2024 22:00:04 +0100 Subject: [PATCH] fix(notifs): add /f flag, explorer check --- src/playbook/Executables/DISABLENOTIFS.cmd | 2 +- src/playbook/Executables/ENABLENOTIFS.cmd | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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