What are the command line options for Windows Media Player?
For most discs the simplest, most reliable choice is to autorun the video file itself (an MP4) and let Windows open it in the user's default player. See How do I autorun a video (MP4)? Use the switches below only when you need a specific player behavior such as full screen.
Windows Media Player (wmplayer.exe)
Windows Media Player still ships with Windows 10 and Windows 11, where it is named "Windows Media Player Legacy." It is not included in the "N" editions of Windows. Its program file is:
C:\Program Files\Windows Media Player\wmplayer.exe
| Command line | What it does |
|---|---|
"path\file.mp4" | Starts the player and plays the file. |
"path\file.mp4" /fullscreen | Plays the file in full screen. The path and file name are required. |
/Playlist PlaylistName | Plays a playlist from the user's library. |
/Device:AudioCD or /Device:DVD | Plays an audio CD, or a DVD on PCs that have a DVD decoder. |
There is no switch that closes the player when the video ends. The user closes it.
Setting it up in AutoRun Wizard
- File to Autorun:
C:\Program Files\Windows Media Player\wmplayer.exe - Check Allow file to exist outside of Base Folder, because the player is on the user's PC, not on your disc.
- Check Command Line and enter
"%BASE_FOLDER%movie.mp4" /fullscreen. %BASE_FOLDER% becomes the root of your disc, such asD:\. - Save and Test.
The step-by-step version with a screenshot is in How can I automatically play a movie in Windows Media Player?
What about mplayer2.exe?
Older answers recommended mplayer2.exe, the small Windows Media Player 6.4 shell, for its /play, /close and /fullscreen switches. It was removed from Windows years ago, so a disc that depends on it will not play on current PCs. Switch those discs to wmplayer.exe or to a plain MP4 autorun.
Microsoft's full list of Windows Media Player command line parameters is in the Windows Media Player SDK documentation.