# Solved: Internal PC speaker beep



## accountclosed3 (Dec 8, 2012)

Hi everyone!

I was just wondering if it's possible to make the internal PC speaker beep in Windows. I'm not talking about external speakers or headphones, I'm talking about the speaker inside a desktop computer. 

What I've been told is starting Windows Vista, the beep.sys file in C:\Windows\System32\drivers is replaced with a newer version that doesn't allow beeping through the internal speaker, and all beeps go through external speakers (if connected). I've also been told that in Windows XP, with no external speakers connected, Windows XP will use the internal speaker for console.beep in VB.NET, or with any error/warning message. 

A few articles online said you can replace your own beep.sys file with one from Windows XP, although this will only work on 32-bit installations. I haven't tried this yet, but I do have an installation of Windows XP available. It would be even better if someone could find a way to also do this on 64-bit installations. (Maybe use the beep.sys from Windows XP x64 Edition?)

Anyway, I want the end result to be able to use console.beep on Windows Vista or newer OS and have the sound come through the internal speaker. Any suggestions?


----------



## Ent (Apr 11, 2009)

Whatever your intention, you really don't want your program to go messing around with the Windows system files. Even if it works (and I imagine you want some sort of audible alert that can't be disabled by just turning off the sound), you'd then throw anything else that expects the beep to use the headphones or connected speakers.

As to the actual answer, you'd need to send a signal to the hardware directly and I don't know how to do that. Perhaps something here can help: http://www.vbforums.com/showthread....om-PC-Internal-Speaker-(not-from-sound-card)-!!


----------



## draceplace (Jun 8, 2001)

This used to be easy to Chr(7) was a beep and you could run that on the command line. Doesn't seem work on Win7. None of these work anymore in psuedo dos thats on machines now.
'beep = chr(007) 
'WshShell.Run "cmd /c @echo " & beep, 0

'WshShell.Run "%comspec% /c echo " & Chr(7), 0, False

'WScript.StdOut.Write(Chr(7))


----------



## accountclosed3 (Dec 8, 2012)

Thanks for all your replies, I managed to find a solution on my own. *I deleted the beep.sys file in Windows 7 and replaced it with one from Windows XP.* The file is located at *C:\WINDOWS\system32\drivers\beep.sys*. Now beeps will go through the internal PC speaker.

*Insert: Be sure to keep a backup of your original beep.sys, in case you want it back!*

This also has an added advantage - in VB.NET, multiple console.beep's don't have a pause inbetween them anymore. To re-add the pause, I used:

```
System.Threading.Thread.Sleep(500)
```
This will make the application pause for 500 milliseconds.

However, replacing beep.sys doesn't seem to make the internal speaker beep when an error or warning message pop up on the screen. When this happens, the regular sounds will play through external speakers or headphones. If none are connected, no sound will be played at all.


----------

