104

Is there a way to essentially mute the Beeping function of the Windows command shell?

I'm working on a PowerShell script right now which ends up printing several lines of text to the screen. I'm working out a bug in the encoding logic. But every time I'm wrong my script will spew a bunch of random binary characters to the screen and eventually cause many annoying beeps.

The failure is quite obvious without the beeps :)

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
JaredPar
  • 1,331

9 Answers9

80

The Windows command line command net stop beep will turn off the beeping, and net start beep will turn on the beeping. Source

It should be noted that the instruction stops the beep globally on windows and not on just for within the windows command shell. Also, the service will run again when you reboot your computer.

@Ady's answer will suffice. But if you want to just disable it per instance, you can always put this method into a batch file (but it's so short you can just type it) and run it.

wasif
  • 9,176
blizpasta
  • 901
55

To control the Beep service startup from the command line, disable the service across reboots with:

C:\Windows\system32>sc config beep start= disabled
[SC] ChangeServiceConfig SUCCESS

Re-enable with

C:\Windows\system32>sc config beep start= auto
[SC] ChangeServiceConfig SUCCESS

Note the spacing on the sc config in the above examples, as it has specific requirements.

To do this from Powershell:

PS C:\Windows\System32> set-service beep -startuptype automatic
PS C:\Windows\System32> set-service beep -startuptype disabled
31

Perform the following steps to disable your machine's system beep:

  1. Right-click My Computer and select Manage.
  2. Expand System Tools and select Device Manager.
  3. From the View menu, select Show hidden devices.
  4. Expand Non-Plug and Play Drivers.
  5. Right-click Beep, and select Properties.
  6. Select the Drivers tab.
  7. Click Stop. You can also change the start-up type to Disabled so the beep service never starts.

Ref: http://windowsitpro.com/article/articleid/15508/how-do-i-stop-windows-2000-from-beeping.html

17

There are two sounds you can adjust from Sound settings in Windows 10:

  1. Critical Stop
  2. Default Beep

I set both to none and I'm blessed with silence

sReall
  • 171
7

In my opinion you can achieve this without disabling your pc's system beep on new systems.

  1. Right click the Speaker icon on the system tray
  2. Click Open Volume Mixer
  3. Mute Console Window Host (or the app you want to mute)

I've done this for WSL for Windows 10 and it worked well.

Emre D.
  • 81
  • 1
  • 2
4
Set-PSReadlineOption -BellStyle Visual

See https://msdn.microsoft.com/powershell/reference/5.1/PSReadline/Set-PSReadlineOption

3

Since the other solutions didn't work for me (for example, net stop beep got stuck like this forever: The service is starting or stopping. Please try again later.), the way I disabled the beep/ding in Cmder/ConEmu was by setting the sound for Critical Stop to none in system Sound settings.

No more dings!

1

Windows 10 answer:

  1. Navigate: Sound settings -> Related Settings (Sound Control Panel) -> Sounds

  2. Then click on the sound (critical beep/default beep)

  3. In "Sounds" dropdown scroll up to select "(None)" option.

  4. Apply

alex
  • 111
1

Setting

HKEY_CURRENT_USER\Control Panel\Sound\Beep

to no in the Registry has worked for me.

(reference)

Jeronimo
  • 111