3

Say for example I want to make windows 7 play a sound every time I open Firefox

This is what I do:

With regedit I create the following:

HKEY_CURRENT_USER->AppEvents->EventLabels->Firefox (default = Firefox) HKEY_CURRENT_USER->AppEvents->Schemes->Apps->Firefox->Launch (default = 0)

I then go to Control Panel - Sound - Sounds and give the newly created Firefox -> Launch program event a sound to play. I apply the changes and open firefox - no sound is played.

What am I missing? I guess I need to specify somewhere what this event is about?

user275343
  • 31
  • 2
  • I use simple batch methods now to replace what was once available built into the system, and worked with any progam. I use Cmd line wave sound player, Start /Wait, start and stop programs sounds, and another method to hide the batches window. It does not replace what the system used to be able to do at all, but it works. I would really like to know how to get the system to do what it used to do. (another lost Feature of windows) – Psycogeek Nov 22 '13 at 08:21
  • Where do you have that description from? Why do you believe it should work? – Werner Henze Nov 22 '13 at 08:36
  • 1
    This was last available in XP. In Windows 7 you will need to do this using a batch file. – harrymc Nov 22 '13 at 21:06

1 Answers1

4

What you did is partly correct, but it is only half of the thing that is necessary. The second question on this MSDN page describes how to add a Windows sound event and how to play it.

With your registry changes you created an application specific sound Event for the application Firefox. Then you set the sound file to play using Control Panel. Now if Firefox calls the Windows function PlaySound as PlaySound(_T("Launch"), NULL, SND_APPLICATION) then Windows will play the sound you configured. The problem is that Firefox does not call PlaySound, so the sound event is not triggered and the sound is not played.

Werner Henze
  • 4,847
  • 3
  • 19
  • 33