Change sound scheme in windows via Windows Registry
Changing the scheme is relatively easy. However, you then have to apply the new scheme, which is a bit more involved.
The "No Sounds" scheme has the name .None
; you can see this by exploring HKEY_CURRENT_USER\AppEvents\Schemes\Names
.
The selected scheme is at HKEY_CURRENT_USER\AppEvents\Schemes
, which defaults to .Default
. So you can set the selected scheme by changing this to .None
:
New-ItemProperty -Path HKCU:\AppEvents\Schemes -Name "(Default)" -Value ".None" -Force | Out-Null
This will (technically) set the selected scheme, which you can verify by going to your Sounds settings and see that the No Sounds
scheme is selected. However, the event sounds will still play, and that is because the selected scheme has not been applied.
To apply a sounds scheme, the appropriate action is:
- For each app event matching
HKEY_CURRENT_USER\AppEvents\Schemes\Apps\*\*
, copy the subkey for the new scheme name over the subkey called.Current
.
As an example, to apply the No Sounds scheme to the System Exclamation event, you would copy HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemExclamation\.None
over HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemExclamation\.Current
.
However, in your case, you can just clear out all the values, since you're applying a "no sounds" theme. This can be accomplished by an one-liner:
Get-ChildItem -Path "HKCU:\AppEvents\Schemes\Apps" | Get-ChildItem | Get-ChildItem | Where-Object {$_.PSChildName -eq ".Current"} | Set-ItemProperty -Name "(Default)" -Value ""
Step by step:
Get-ChildItem -Path "HKCU:\AppEvents\Schemes\Apps"
gets all apps.Get-ChildItem
gets all app events.Get-ChildItem
gets all app event sound settings for each scheme.Where-Object {$_.PSChildName -eq ".Current"}
selects all the app event sound settings that are currently applied.Set-ItemProperty -Name "(Default)" -Value ""
clears those sound settings.
For a bit more detail:
It appears that the keys under HKEY_CURRENT_USER\AppEvents\Schemes\Apps
are the apps, with their default value being a display string. The ones on my system are .Default
("Windows"), Explorer
("File Explorer"), and sapisvr
("Speech Recognition").
The keys under each app key are the app events for that app.
The keys under each app event key are the sounds to play for each sound scheme. So HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemExclamation\.None
is the sound to play for Windows' System Exclamation when using the No Sounds scheme, and HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemExclamation\.Default
is the sound to play for Windows' System Exclamation when using the Windows Default scheme.
In addition, there's a .Current
key at this level that is the actual sound that is played. Presumably, when you select a new scheme in the UI, it copies each of the settings individually over the .Current
value.