Windows Media Player (wmplayer.exe) version 9/10 supports only a limited set of command line parameters. The most useful command line options, useful for including within AutoRun Wizard, are left for the MPLAYER2.EXE.
What is MPLAYER2.EXE? This is a
small utility that wraps the full player features (wmplayer.exe) within a small useful application. It it shipped with all version of media player, so you can be certain that it will be on the end users system when launched. By default this application is located in C:\Program Files\Windows Media Player\. If the user does not have mplayer2.exe...your autorun will not load. The mplayer2.exe application is great for opening, closing and playing movies and sounds. The nice thing about mplayer2.exe is that it supports these VERY useful command line options (the full wmplayer.exe does not):
/open: Open the file, don't automatically start playing.
/play: Start playing the file as soon the player is launched.
/close: Close the player after playback (only works when used with /play).
/fullscreen: Start the file in full-screen mode.
/new: Use a new instance of the player.
For example:
C:\Program Files\Windows Media Player\mplayer2.exe /play /close my_movie.wma
This example would launch the Windows Media Player shell to play my_movie.wma and close after the movie has been played. Adding the /fullscreen option would make sure your movie takes up the users entire screen.
The following set of command line parameters that specify how Windows Media Player version 9 and 10 behaves when it starts. As you can tell, there is no CLOSE option (very useful when autoruning cd's). The following table details some of the the parameters and their behaviors. The link at the bottom will show all of the options.
Syntax |
Behavior |
"path\filename"
(For example: wmplayer "c:\filename.wma")
|
Start the Player and play the file. |
"path\filename" /fullscreen
(For example: wmplayer "c:\filename.wmv" /fullscreen)
|
Play the specified file in full-screen mode.
You must specify the path and file name of the content to play.
|
/Device:{DVD|AudioCD}
(For example: wmplayer /device:audio CD )
|
Play a DVD or audio CD. |
"path\filename"?WMPSkin=skin name
For example: wmplayer "c:\filename.wma"?wmpskin=headspace
|
Open the Player, applying the specified skin. |
/Service:keyname |
Open the Player showing the online store specified by keyname.
Requires Windows Media Player 10.
|
/Task NowPlaying |
Open the Player in the Now Playing feature. |
/Task MediaGuide |
Open the Player in the Media Guide feature (current active online store in Windows Media Player 10). |
/Task CDAudio |
Open the Player in the Copy from CD feature (Rip feature in Windows Media Player 10). |
/Task CDWrite |
Open the Player in the Burn feature.
Requires Windows Media Player 10.
|
/Task MediaLibrary |
Open the Player in the Media Library feature (Library feature in Windows Media Player 10). |
/Task SkinViewer |
Open the Player in the Skin Chooser feature. |
/Playlist PlaylistName |
Open the Player and play the specified playlist. |