Skip to content

Commit

Permalink
fix(notifs): add /f flag, explorer check
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Oct 6, 2024
1 parent 08331fa commit 55d14f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/playbook/Executables/DISABLENOTIFS.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions src/playbook/Executables/ENABLENOTIFS.cmd
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.

0 comments on commit 55d14f8

Please sign in to comment.