Answer the question
In order to leave comments, you need to log in
How to play mp3 from command line in Windows 7?
I want to add a task to the "Task Scheduler": play a small mp3 file (like a cuckoo) every hour.
With the scheduler, everything is clear, but I can not find how to play an mp3 file once and safely.
Safe in the sense that I don't need to launch the default system player and shove this mp3 into it - most often it is already running and it already has a playlist.
How do the right script programmers do it under Windows 7?
Thank you.
Answer the question
In order to leave comments, you need to log in
A little shocked by the previous answers, they boil down to 'download and install additional software' ... and so the system already has 20GB of some kind of shit called the operating system ... sorry, it broke out.
Examples of one-line vbs scripts for windows scripting host can be found on the Internet, here is the simplest example:
Create and run the a.vbs file:
Set oVoice = CreateObject("SAPI.SpVoice")
set oSpFileStream = CreateObject("SAPI.SpFileStream")
oSpFileStream.Open "c:\Windows\Media\tada.wav"
oVoice.SpeakStream oSpFileStream
oSpFileStream.Close
mpg123 is a lightweight console player.
path_to_mpg123/mpg123.exe path_to_mp3
For fun, you can use powershell, it is built into the seven.
$sound = new-Object System.Media.SoundPlayer;
$sound.SoundLocation="file path";
$sound.Play();
Something like this.
I put it in the MPC scheduler as an alarm clock. A playlist in Fubar.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question