For some reason my batch script beeps when pressing Space at a PAUSE event.
I currently have both:
start /wait %comspec% /Q /C "net stop beep" >nul 2>&1
start /wait %comspec% /Q /C "sc stop beep" >nul 2>&1
…at the start of my script, which has successfully disabled the system beep, but now it has been replaced by a Windows “themed” beep.
Also this happens when I get to a CHOICE event and the user presses Space.
Any ideas on how to make a batch script completely silent, even during input “errors”?
Thanks,
D
Try replacing your
choicecommands with something like this.It’ll require the user to hit enter but at least it won’t beep.
If you really want to do it the hard way and turn off the default sound, I think you’ll find it either in
HKCU\AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current\(Default)or inHKCU\AppEvents\Schemes\Apps\.Default\AppGPFault\.Current\(Default).Here’s a brief proof of concept.
If that doesn’t work, try replacing
SystemAsteriskwithAppGPFault. To be honest, I’m unable to recreate your symptom. I hear silence after stopping the beep service. So I’m not entirely sure which event is getting triggered when a user hits the space bar and the beep service is stopped.