Every release of Windows since as far back as I can remember (Windows 3.1) has played a welcome sound at startup. In Windows NT-based systems, there is a startup sound as well as separate logon sound. A sound can also play when Windows logs off or when it shuts down. You can assign all these sounds from Control Panel -> Sound. But in Windows 8, sounds for these events have been eliminated almost entirely. Let's see how to revive them.
In Windows 8, Microsoft focused on making Windows boot and shut down faster and so they completely removed the sounds which play at logon, log off and shutdown. Even if you assign sounds to the events for 'Exit Windows', 'Windows Logon' and 'Windows Logoff' or try to restore these events using the Registry, they will not play. I contacted Microsoft for a clarification and here is what they replied:
"We removed these sound events for performance reasons. We pay a lot of attention to how quickly the machine powers on, powers off, goes to sleep, resumes from sleep, etc. As part of speeding this up, we experiment a lot with what process is in control of the startup and shutdown sounds. In an interim build of Windows 8 while it was under development, we were able to speed things up considerably by moving the shutdown sound from Explorer.exe (which is running while you’re still logged on) to Logonui.exe (which is the process that shows the "Shutting down" circle.)
However moving the shutdown sound this late started running into other problems. The code we use to play the sound (the PlaySound API) needs to read from the registry (to see what the preferences for this sound were) and from the disk (to read the .wav file), and we ran into issues where the sound was unable to play (or got cutoff halfway) because we had shut down the registry or the disk already! We could have spent time rewriting the API but we decided the safest and most performant thing to do was to eliminate the sound altogether."
The startup sound remained in Windows 8 but it is disabled by default. You need to go to the Sound Control Panel -> Sounds tab and check the option "Play Windows Startup sound".
Additionally, Microsoft introduced fast startup/hybrid boot in Windows 8. Due to this feature, when you click Shut down, it logs you out and hibernates the kernel and powers off; it doesn't really exit Windows. When you turn on your Windows 8 PC again, it resumes from hibernate and logs in again. This is different from booting after a full shut down.
Even if you turn on the Windows startup sound, it will only play if you did a full shut down. It never plays when fast startup is on. So what is the solution? The trick is to simply use the Windows event log system to play the sounds now.
Before you proceed
I decided to create Startup Sound Enabler for Windows 8. This app will allow you to assign a startup sound with just one click! It does the job of creating the script with the sound you pick and setting it up in Task Scheduler automatically.
The application has a very simple UI: click the Set Startup Sound button to set the startup sound, click Disable Startup Sound to disable it.
Here are step-by-step instructions to revive the Logon sound: (You can use the same method to assign sounds for log off and shutdown events)
- Open Notepad and paste the following lines into it. (This is a simple VBScript for Windows to play any sound using the Speech API. I prefer this method because it doesn't depend on loading some bloated and slow program such as Windows Media Player just to quickly play one sound and close it):
Set oVoice = CreateObject("SAPI.SpVoice") set oSpFileStream = CreateObject("SAPI.SpFileStream") oSpFileStream.Open "C:\Windows\Media\Windows Logon.wav" oVoice.SpeakStream oSpFileStream oSpFileStream.Close
Tip: Note the sound I used in this script. It is a lovely new sound included in Windows 8 located at C:\Windows\Media. You can change it to any other .WAV sound you want.
Tip: If you are wondering, where you can find some quality sounds, look no further than this article.
- Save this file anywhere with a .VBS extension. For example, "Logon Sound.vbs"
Tip: You can add the filename and extension inside quotes, so that Notepad does not add ".txt" to the filename that you have typed. Adding it inside quotes will save it as "Logon Sound.vbs" and not, "Logon Sound.vbs.txt".
- Now we need to find some appropriate event to associate this sound. Open Event Viewer by typing: Eventvwr into the Run dialog, or on the Start screen.
- Open Event Viewer opens, expand the 'Windows Logs' category and click the 'System' log.
- Now click the Action menu and click Find...
- In the Find what: text box, type: 7001 and press Enter or "Find Next" button. The Winlogon event will be selected.
(7001 is the Event ID for one of the many events which gets logged into the Event Log when you log on to Windows)
- Now right click this event and click 'Attach Task to This Event...'
- The 'Create Basic Task Wizard' window will open.
- Type a descriptive name if you want such as "Logon sound" and click Next. Typing a name is optional, so it's easier to locate this task later if you need to delete it.
- Click Next again and then choose 'Start a program' and Next again.
- In the Program/script: field, type: WScript.exe. In the Arguments field, enter the path to the file you saved. For example, "C:\Windows\Logon Sound.vbs" (make sure you use double quotes if your path contains spaces or long file names)
- Check the box called "Open the Properties dialog for this task when I click Finish" Then click Finish to create the task.
- Optionally, go to the Conditions tab and uncheck "Start the task only if the computer is on AC power", if you want the logon sound to play even when your Windows 8 PC or tablet is running on batteries.
- Click OK and close Event Viewer.
- Now try shutting down Windows from the Settings Charm (Win+I), or by pressing Alt+F4 on the Desktop, or from your favorite Start Menu replacement such as Classic Shell.
- The next time you log in, the sound should play.That's it! You just revived your logon sound. The startup sound will still play when you do a full shut down and this newly assigned sound will play when you log on. You can use this same method to find some appropriate events in the Event Log for shutdown and log off and assign different sounds to them by creating another script.Be sure to check out WinSounds.com for a large collection of free, downloadable sounds.