+ Post New Thread
Results 1 to 7 of 7
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 ...
  1. #1
    NickHoughton's Avatar
    Join Date
    May 2008
    Location
    Accrington
    Posts
    79
    Thank Post
    16
    Thanked 4 Times in 3 Posts
    Rep Power
    15

    Forcing WMP to exit once playback over

    Hi All

    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:

    @echo off
    REM open WMP folder
    c:

    cd\progra~1

    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
    ~~~~~~~~
    end
    ~~~~~~~~


    any suggestions?
    Any

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,701
    Thank Post
    352
    Thanked 805 Times in 720 Posts
    Rep Power
    348
    "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.

  3. Thanks to kmount from:

    NickHoughton (24th May 2008)

  4. #3
    NickHoughton's Avatar
    Join Date
    May 2008
    Location
    Accrington
    Posts
    79
    Thank Post
    16
    Thanked 4 Times in 3 Posts
    Rep Power
    15
    works a treat

    Many thanks
    I had googled the wmplayer CLI arguments but didn't see that

    not sure how to get around the security settings, though...

  5. #4


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,701
    Thank Post
    352
    Thanked 805 Times in 720 Posts
    Rep Power
    348
    What security settings?

  6. #5
    NickHoughton's Avatar
    Join Date
    May 2008
    Location
    Accrington
    Posts
    79
    Thank Post
    16
    Thanked 4 Times in 3 Posts
    Rep Power
    15
    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

  7. #6


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,701
    Thank Post
    352
    Thanked 805 Times in 720 Posts
    Rep Power
    348
    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.

  8. #7
    NickHoughton's Avatar
    Join Date
    May 2008
    Location
    Accrington
    Posts
    79
    Thank Post
    16
    Thanked 4 Times in 3 Posts
    Rep Power
    15
    appears to be any .exe, .bat. .com files



SHARE:
+ Post New Thread

Similar Threads

  1. DVD playback - what programs are you using?
    By Halfmad in forum Windows
    Replies: 34
    Last Post: 19th July 2010, 08:05 PM
  2. [Joke] Work Exit Interview
    By Elky in forum Jokes/Interweb Things
    Replies: 16
    Last Post: 24th May 2008, 03:52 PM
  3. Forcing the issue
    By Bestbett in forum Windows
    Replies: 7
    Last Post: 14th January 2008, 05:19 PM
  4. .avi Playback problems
    By richard in forum Windows
    Replies: 14
    Last Post: 12th November 2007, 03:04 PM
  5. DBATTACH exit code
    By ajbritton in forum MIS Systems
    Replies: 0
    Last Post: 24th November 2006, 12:31 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •