How do you do....it? Thread, Forcing WMP to exit once playback over in Technical; Hi All
Wondering if you can help. Doing a piece of BSc coursework. Have to produce an Expert SYstem in ...
24th May 2008, 03:48 PM #1
Forcing WMP to exit once playback over
Wondering if you can help. Doing a piece of BSc coursework. Have to produce an Expert SYstem in Powerpoint (Don't know why)
I have an AVI file I want to call in WMP in full screen and then close once playback is over. The videos are captured at 800*600 from VMWare so embedding them in the PPT file is not really feasible as the target machines are quite old.
I have managed a work around in a batch, file to get suppress the yes/no prompt for opening a batch file I have had to lower the security settings which I may not be able to do on the target system.
I think I need a less sloppy way to do this. I was wondering if a macro would help but I thought a similar thing may occur with the security warning. ALso, I have never worked with VBscript.
Here is my batch file:
REM open WMP folder
cd "windows media player"
REM call wmplayer and load specific file
start wmplayer "i:\filename.avi" /fullscreen
REM make the system wait until the video has finished
REM -n X where X is number of seconds of film
ping -n 15 localhost
REM kill wmp
taskkill /f /im wmplayer.exe
IDG Tech News
24th May 2008, 03:54 PM #2
"C:\Program Files\Windows Media Player\mplayer2.exe /play /fullscreen /close" I:\Filename.avi
Using /play and /close together means it plays and then closes.
/fullscreen as you know runs it in full screen.
The above should work but I'm not on a windows box to test it out on. - It may need the arguments taking outside of the quotes but I'm not certain.
Hope this helps.
Thanks to kmount from:
NickHoughton (24th May 2008)
24th May 2008, 04:01 PM #3
works a treat
I had googled the wmplayer CLI arguments but didn't see that
not sure how to get around the security settings, though...
24th May 2008, 04:03 PM #4
24th May 2008, 04:13 PM #5
In powerpoint 2003, tools > options > security > macro security
there are 4 settings. If you don't choose the "low" option powerpoint prompts with a potentially unsafe file type message and provides a yes no box
24th May 2008, 04:18 PM #6
Do 'all' filetypes have this warning I wonder ...
I mean, is it throwing its toys out of the pram by opening the mediaplayer executable, or the batchfile itself?
If its the batchfile, we could try using AutoIT to come up with an EXE that effectively embeds the batch file in it.
24th May 2008, 04:24 PM #7
appears to be any .exe, .bat. .com files
By Halfmad in forum Windows
Last Post: 19th July 2010, 08:05 PM
By Elky in forum Jokes/Interweb Things
Last Post: 24th May 2008, 03:52 PM
By Bestbett in forum Windows
Last Post: 14th January 2008, 05:19 PM
By richard in forum Windows
Last Post: 12th November 2007, 03:04 PM
By ajbritton in forum MIS Systems
Last Post: 24th November 2006, 12:31 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)