Solved

Turn of Windows 7 desktop sounds programmatically?

Posted on 2013-02-06
4
2,169 Views
Last Modified: 2013-02-12
Hello,

Is there an easy way to programmatically (through PowerShell or other means) to turn of the desktop sounds on Windows 7??

Why

Currently, all Windows 7 workstations come with the Sound Scheme "Windows Default" enabled, which doesn't work for us here. Our contact centres will soon be undergoing a transition to VOIP for our agents, so we need to eliminate all extraneous sounds from our agent workstations and we want to not have sounds on our kiosk solutions.

I am looking for a way to turn this off that does not involve the GUI, for example - a powershell script that could run on the workstation.

Things I have tried already are...

1. Theme

Changed the theme file under - "C:\Users\<user>\AppData\Local\Microsoft\Windows\Themes" - under [Sounds] you could change SchemeName=No Sounds, however this did not work and this custom.theme file does not exist in the directory unless you open themes at least once

2. Registry

Modifying the registry value under HKCU\AppEvents\Schemes  (Default)=.None - this however only changes the GUI, sounds still play

3. Procmon

Started up Procmon and captured changing the setting in the GUI from "Windows Default" to "No Sounds", seems he goes through and changes a ton of things on the system... especially in the registry under HKCU\AppEvents\Schemes\Apps
Anyone tried doing this before?

Regards,
Matt
0
Comment
Question by:Kandium
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 21

Expert Comment

by:jvuz
ID: 38862932
http://www.techdreams.org/tips-tricks/how-to-disable-sound-themes-in-windows-7/3095-20090719

There's someone doing it with group policies:

run policy editor (gpedit.msc...must have admin permissions)
user configuration
administrative templates
control panel
personalization
Enable the 'prevent changing sounds' policy.
WARNING: be sure to set your sound scheme to what you want BEFORE implementing this policy, as it will preserve the current settings.

jvuz
0
 

Author Comment

by:Kandium
ID: 38863253
We would prefer not having to touch group policy...

In our management console (home grown application), we setup parameters on the clients like " DisableDesktopSounds = true ", then when the computer starts up or logs on (depending on what context the script needs to run in), the powershell script would have a condition to check that parameter. Then turns off or on the sounds.

Makes it very dynamic for us... so yes, GP would work but not what we are looking for.
0
 
LVL 47

Accepted Solution

by:
Jackie Man earned 500 total points
ID: 38863315
What an interesting question!

Just browse the net and see a solution in the link below.

http://www.faqforge.com/windows/windows-powershell-script-to-export-and-import-sound-schemes/

In short, you can create a new sound profile with media files of no sound at all and import the new sound profile using the Powershell Script in the link above.
0
 

Author Comment

by:Kandium
ID: 38880330
Hmmm, never thought of just doing a import/export!

Here's my plan... going to change the test machines sound theme to "No Sounds", do an export of the [HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default], then change it back to "Windows Default" and do the same thing.

Open up BeyondCompare and do a text comparison on the two files to make sure that the changes are reflected and no "crap" seeks in.

Then create a PowerShell script that does an import and deliver both .reg files with it (that way the user can flip back and forth when changing the parameter). The script you linked would work, but I do not want a UI or any user interaction.

I guess I will also need to modify the [HKEY_CURRENT_USER\AppEvents\Schemes].(Default) key so that it reflects in the UI that it was changed.

Thank for your help with this!!
/Matt
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A brief introduction to what I consider to be the best editor for PowerShell.
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question