99

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 :)

1
  • 4
    thanks for this question. It wouldn't dawn on me to ask... but it sure as hell is annoying.
    – MasterPeter
    Apr 16, 2009 at 15:08

9 Answers 9

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.

5
  • 4
    nice, didn't realise it was that simple.
    – Ady
    Oct 31, 2008 at 7:57
  • 17
    When I attempt net stop beep, I get the error The Beep service could not be stopped. (Windows 10).
    – anishpatel
    Nov 1, 2016 at 21:39
  • 1
    Run your cmd as Admin, or go directly to the services.
    – Sandburg
    Oct 8, 2020 at 14:30
  • 1
    Launched cmd Admin. Same problem as @anishpatel says
    – Fake Fish
    Jul 29, 2022 at 9:54
  • net stop beep will work, but it will shutting down the system KERNEL_DRIVER, which is not a service, and it cannot be restarted without rebooting the system (it seems to get stuck in STOP_PENDING because it never tells the service manager that it is now STOPPED). So if you use this command, it may work, but probably not the way you want it to.
    – pbarney
    Dec 12, 2022 at 16:51
52

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
2
  • Could you add better formatting? The [SC] is part of the output, not the input, as it looks in your post.
    – mark
    Aug 16, 2009 at 5:49
  • This is the solution that actually works.
    – Akito
    Oct 7, 2020 at 12:24
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

2
  • 10
    I do not have "Non-Plug and Play Drivers" on Windows 10. Nov 29, 2017 at 22:48
  • See 'How to Get a "My Computer" Icon on the Desktop on Windows 10 and Windows 11' if you don't have it. It will then be called "This PC"'. But they have changed the other menus as well.
    – Scooter
    Oct 15, 2023 at 5:26
15

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

1
  • 2
    Settings > Sound > Sound Control Panel > Sounds (Tab) > Search and se to "None" boths the events pointed by @sReall because "Default Beep" is the fallback setting of "Critical Beep"
    – Codemix
    Jun 1, 2023 at 9:57
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.

1
  • 1
    This is actually a solution for almost all (my) cases and users which do not have high or administrative rights. Even restricted users can just disable to beep sound and it preserve a reboot. No configuration changes are necessary, etc...
    – U880D
    Sep 11, 2022 at 18:11
4
Set-PSReadlineOption -BellStyle Visual

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

2
  • This does not seem to work for me; it still makes the notification sound when I gc a file that includes a bell character. The page you linked says that option "specifies how PSReadLine responds to various error conditions or user prompts," which I believe is distinct from the handling of the bell character.
    – Ben N
    Jan 15, 2017 at 21:22
  • Yes, this only effects the keyboard input on Powershell itself not any other programs. Additionally this setting is per session and is not saved. Jan 17, 2017 at 6:49
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
  • 1
    Thank you! I did not want to get rid of it but make it a much more subtle sound. This helped me find which sound it was :)
    – ormuriauga
    May 13, 2019 at 10:59
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

1

Setting

HKEY_CURRENT_USER\Control Panel\Sound\Beep

to no in the Registry has worked for me.

(reference)

2
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 28, 2022 at 9:58
  • This worked for me on Windows 11 to stop hearing a "beep" sound when using command "git config --list" in the Windows Command Prompt window (and paging down to the bottom of the list). I had previously set Critical Beep and Default Beep to "(none)" in the system sounds control panel, but that had no effect on the command prompt. The registry fix silenced the command prompt. Dec 6, 2022 at 3:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .