For Windows 8 & 10. Let's the system make a startup and shutdown sound.
It calculates the .wav file's audio length, plays the audio file, then pauses for audio length so it can fully play that file.
Open the Control Panel go to Administrative Tools and Task Scheduler (or just search for Task Scheduler with Cortana)
On the far right panel click on "Create Basic Task...". Type in something for the name and press the "Next >" button.
Select the "When I log on" radio button and press the "Next >" button.
Select the "Start a program" radio button and press the "Next >" button.
Click the "Browse..." button and select the "Shutdown Sound.exe" program and press the "Next >" button.
Click the Finish button.