I\'m running into an issue when I boot my PC the .mp3 file stops once the system speech is completed. I\'d like it to run a little longer. Syntax below.
\'Add-Ty
Untested, but you probably could insert a wait loop after starting to play the mp3, to see if the music has finished or not. Something like:
$mediaPlayer = New-Object system.windows.media.mediaplayer
$mediaPlayer.open('C:\Users\avery\Videos\01 - Highway To Hell.mp3')
$mediaPlayer.Play()
while (!($mediaPlayer.MediaEnded)) {
Start-Sleep -Milliseconds 500
}
$mediaPlayer.Close()