I have been working on a project idea today, and I encountered this issue while attempting to kill an audio task. Here's my code (Problem is after the code block):
:two
ECHO Reading...
start C:\Users\Gigabyte\Documents\Audacity\FDD.wav
timeout /t 24 >nul /nobreak
taskkill FDD.wav
GOTO continue
:three
ECHO Reading
start C:\Users\Gigabyte\Documents\Audacity\HDD.wav
Timeout /t 44 >nul /nobreak
taskkill HDD.wav
:continue
It gave me an error that something was invalid then shut the window. I usually am able to read it word by word but time has taken it's toll on me. All I know is that something in quotes is invalid as of right now. However, I have suspicion that the audio file name is invalid and no such task exists. And this goes back to the main question. 'If an Audio File is Not Playing is it Considered a Task?'.
(If it's a matter of task or process ID's then how do I find them?) (If you need some more code to find out the context of the situation I'll gladly add some)
Audio files are data files, not executables. You need to find the program that is actually playing the audio file and kill it instead. So if you were using Windows Media Player then kill that. (Groove Music not included)
-SomethingDark