Yes. I even tried to do a call to a separate bat file called kill.bat. If I run kill.bat (which is just taskkill /im wmplayer.exe) by itself it works perfectly. But if I try to call it from the other bat file it never happens. It's like the first bat file is waiting fro something to happen after it plays the playlist in order for the rest of the batch file to complete.
No quotes and don't forget you will need to run the batch file as an admin.
But why open up wmplayer and then kill it ?
What I am trying to accomplish is to run wmplayer, fullscreen and play a two video files. When it is over I want to go back to the desktop with nothing happening.
I killed the quotes and it still has no effect. When the playlist is through it dumps out of full screen mode and i am left with the windows media player open and the cmd window open waiting to complete its task
I just tested this on my machine and I think I found the problem, because the program is running a file, I don't think it closes properly with the taskkill command. You can add a /f to force it to close, but I think it will just shut it down while the vids are playing. You have to insert a delay that is longer than the videos, and then do the taskkill command.
OK it is fixed. I used the ping trick to create a delay slightly longer than the length of the video and then I added the /f to force the termination with taskkill. Note: the /f has to go before the /im
NP, it is helpful to use pause between your commands to see if it is giving you any response in the CMD prompt, same way you use dialog boxes to debug code. If you place the pause after the taskkill command you will see the error message I found (I believe).