Skip to content

Commit 4b989ab

Browse files
Improve Do Not Disturb disabling in CI workflow
Replaces the reg add command with Set-ItemProperty for disabling Do Not Disturb, adds setting the Profile to Unrestricted, and restarts notification services to ensure changes take effect.
1 parent ac9cea9 commit 4b989ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,13 @@ jobs:
147147
.\Enable-AllTrayIcons.ps1 -Action Enable -Force # Enable with comprehensive method (resets ALL icon settings)
148148
149149
# Disable Do Not Disturb
150-
reg add “HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\QuietHours” /v “Enabled” /t REG_DWORD /d 0 /f
150+
$quietHoursPath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\QuietHours"
151+
New-Item -Path $quietHoursPath -Force | Out-Null
152+
Set-ItemProperty -Path $quietHoursPath -Name "Enabled" -Value 0
153+
Set-ItemProperty -Path $quietHoursPath -Name "Profile" -Value "Unrestricted"
154+
155+
# Restart notification services
156+
Get-Service -Name "WpnUserService_*" | Restart-Service -Force
151157
152158
- name: Run tests
153159
id: test

0 commit comments

Comments
 (0)