WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Sound and Media

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Run Windows Media Player and Close It

Keywords:     run windows media player close

Question:

On a Win2k machine am just trying to automatically run a Windows Media Player movie...after movie ends I want Windows Media Player to close. Here's the code I have. What happens is movie plays fine...but then stops and even with EXIT at the end of my code WM stays up. Any way other than WinGetActive and going down the route of trying to close by stating the window name?

Answer:

As far as I know MediaPlayer does not automatically close. Takes user input or something.

Maybe you can write a script to watch the media player, and when it is done, then close it. Does the title change to anything?

OR... Use PlayMedia to show the movie:

Movie = FileNameShort("C:\confidentiality.mwv")
playmedia('play %Movie% FULLSCREEN WAIT')
message(Movie,'Completed')

Article ID:   W15298
File Created: 2002:09:05:13:51:10
Last Updated: 2002:09:05:13:51:10