How to make the PC speaker beep from the Windows 7 command prompt?

In Windows 7, Beep was rewritten to pass the beep to the default sound device for the session. This is normally the sound card, except when run under Terminal Services, in which case the beep is rendered on the client.

(source) (An article on why) For those who can't be bothered to read: It was to reduce manufacturing cost

But if you are content with having the beep come out of your speakers a simple batch file can do it.

You can write a DOS batch file that beeps by doing the following: at the DOS prompt type:
echo @echo (Alt-7)>beep.bat

but instead of typing the characters: "(Alt-7)", you hold down the Alt key and press 7 on the numeric keypad. Don't use the 7 on the qwerty part of the keyboard, it has to be on the keypad, and Num Lock has to be on.

(source)


It would help to know whether your Windows 7 is 64-bit or 32-bit.

From Default Beep PC Speaker changed in windows 7 – How to get back to old style :

The default beep is controlled by a driver under, c:\windows\system32\drivers\beep.sys. Maybe if you switched it out with a driver from XP/Vista it would increase the volume.

To see this driver you have to open device manager then click on View > Show hidden devices. Then under Non-Plug and Play Drivers you’ll see “Beep.” This is the driver that runs your beep. Right click on it then choose properties and go to the driver tab, then click on Driver Details… This shows the file version which looks like it’s been change with Windows 7. So replace it with an older version and see what happens.

Procedure to follow :

  1. Boot from an UBCD4WIN disc (or BartPE if you don’t have an SATA hard drive)
  2. Take ownership of the “C:\Windows\System32\Drivers\Beep.sys” file and give the local “Administrators” Group “Full Control” permissions.
  3. Rename “Beep.sys” to “Beep.old” (just in case)
  4. Copy “Beep.sys” from an XP machine to this location.

If you have python 2.x installed this line in a bat-file works

python -c "print '\7'"