WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Sound and Media

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Disable Sounds

 Keywords: disable sound sounds  

Question:

Is there a way to surpress the default sound for Message, Pause, etc. in Winbatch? I have a script that I want to run sometimes in meetings, so I would like to have a YES/NO question for audio, and be able to run the entire script without any sound if NO is selected. I've tried Intcontrol 38 and Sounds, but neither seems to do the trick.

Answer:

In current versions, WinBatch sounds are disabled by default, so it is not WinBatch making the sounds.

However when WinBatch does a message box or other display, most modern versions of windows will make one of the standard system sounds.

You would have to figure out how to disable that. Control Panel - Sounds, etc...

ideas:

I wrote a quick script that does the trick on Windows XP.

Be careful, this script modifys the registry. Its always a good idea to back up the registry before making any changes.

b=RegQueryExpsz(@REGCURRENT, "AppEvents\Schemes\Apps\.Default\.Default\.Current")
Message("Current Question Wav", b)
Answer = AskYesNo (b, "Do You want to remove it?")
If Answer == @yes then
	NewWav = ""
	GoSub SetValue
End If

Answer = AskYesNo ("Wav", "Do you want to change it back?")
If Answer == @Yes Then
	NewWav = b
	GoSub SetValue
End If

Exit

:SetValue

RegSetExpSZ(@REGCURRENT, "AppEvents\Schemes\Apps\.Default\.Default\.Current", NewWav)
c = RegQueryExpsz(@REGCURRENT, "AppEvents\Schemes\Apps\.Default\.Default\.Current")
Message("New Question Wav", c)
Return


Article ID:   W15706
File Created: 2003:05:13:11:29:42
Last Updated: 2003:05:13:11:29:42