Search notes:

Registry: HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default

Removing all sounds

This is a PowerShell script that attempts to remove all sounds.
#
#  # The following commented code was supposed to create a subkey .None under
#  # HKCU\AppEvents\Schemes\Names\.None
#  # However, the .None subkey seems to be existent anyway.
#  # So it's commented now.
#
#  if (-not (test-path 'HKCU:\AppEvents\Schemes\Names\.None')) {
#      new-item         -path 'HKCU:\AppEvents\Schemes\Names' -Name '.None'
#      new-itemProperty -path 'HKCU:\AppEvents\Schemes\Names\.None' -Name '(Default)' -Type 'String' -Value 'No Sounds'
#  }
#

$defaultSounds = get-childItem hkcu:\AppEvents\Schemes\Apps\.Default -recurse | get-itemProperty

forEach ($regkey in $defaultSounds) {

    if ( $regKey.psChildName -eq '.Current') {

       $strVal = [string]$regkey.'(default)'
       if ($strVal.endsWith('.wav') ) {

       #  echo "$regKey.psPath $strVal"
          set-itemProperty -path $regkey.psPath -name '(default)' -value ''
       }

    }
}
Github repository about-Windows-Registry, path: /HKEY_CURRENT_USER/AppEvents/Schemes/Apps/.Default/removeSounds.ps1
Compare with this batch file to remove some sounds.
Compare also with the following one liner that was found at in this superuser answer:
get-childItem -path 'HKCU:\AppEvents\Schemes\Apps' | get-childItem | get-childItem | where-object {$_.psChildName -eq ".Current"} | set-itemProperty -name "(Default)" -value ""
TODO: Script was changed at 2020-09-03. Does it now work?

Index