How do I play a sound at boot up: MP3 and WAV Files

With AppleScript...


How do I play an MP3 upon bootup? It would run just as I press the power button.


How do I play a WAV upon bootup? It would play just as I press the power button.

There is no way to play a sound “just as I press the power button”. At that point the Mac is running its firmware, meaning there’s no third-party code running.

It’s very easy to play a sound at the end of the boot sequence, as part of the login process. Specifically, System Events has a Login Items Suite that you can use to add a login item, and so you can create an app script that plays a sound and then add that as a login item.

It may be possible to play sounds earlier in the boot sequence — after macOS has loaded but before user login — but that’s not feasible to do from AppleScript.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

My 2017 MacBook Pro doesn't play that bootup sound like my 2010 one. It seemed like a nifty way to get around that no longer power on sound.


Of course, it plays at after I log in, via an App I've created; the App runs as a login item to play MP3 an MP3 file. That is how I get an MP3 file to run as a login sound.

The App runs as a login item: Hello.app


This is the code that I created using Apple script:


set volume output volume 60
say "Hello.  How are you today?"

My 2017 MacBook Pro doesn't play that bootup sound like my 2010 one.

Ah. It’s not possible to replicate the old boot beep experience as a third-party developer. That boot beep was implemented in the Mac’s firmware, and there’s no way to load third-party code that early.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
How do I play a sound at boot up: MP3 and WAV Files
 
 
Q