QUIET! Simple powershell code to set current_user / default_user reg keys to "NONE"

I think for every PC i've used /worked on over the past 20 years, the first thing I do after logging on is set the "system sounds" to NONE. I don't need beeps for every time I fat-finger windows + R or whatnot.

I recently re-installed Win 10 on my personal laptop, and wanted to a build a nice default user profile for any new users logging in (my domain account, my wife's domain account) on our home AD setup

After some searching, I found a few posts on MS tech net with some suggestions that didn't work, here's what I ended up with to set the value for all 50+ sounds to 'none'

This covers the currently logged in user

$RegSoundCU = GCI -Path HKCU:\AppEvents\Schemes\Apps\.Default -Recurse | Select-object -ExpandProperty name | ForEach {$_ -replace "HKEY_CURRENT_USER" , 'HKCU:'}

ForEach ($i in $RegSoundCU) {

    Set-itemproperty -Path $i -Name "(Default)" -Value ""

}

And this covers the default user, so any new users will get the same settings of NO SOUNDS!

reg load HKLM\DEFAULT c:\users\default\ntuser.dat

$RegSoundDU = GCI -Path "HKLM:\DEFAULT\AppEvents\Schemes\Apps\.Default" -Recurse | Select-object -ExpandProperty name | ForEach {$_ -replace "HKEY_LOCAL_MACHINE" , 'HKLM:'}

ForEach ($i in $RegSoundDU) {

    Set-itemproperty -Path $i -Name "(Default)" -Value ""

}

reg unload HKLM\DEFAULT

outside of the GPO method that doesn't allow any changes, If you know of another method to achieve the same, let me know in the comments :-)

Owen

Comments