The Command Line: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Media Center can be controlled by command line parameters sent to the appropriate command launcher:
Media Center can be controlled by command line parameters sent to the appropriate command launcher:


* Media Center 14 - '''mc14.exe'''
* Media Center 13 - '''mc13.exe'''
* Media Center 13 - '''mc13.exe'''
* Media Center 12 - '''mc12.exe'''
* Media Center 12 - '''mc12.exe'''
Line 7: Line 8:
* Media Jukebox - '''mjextman.exe'''
* Media Jukebox - '''mjextman.exe'''


'''NOTE:''' replace all instances of '''mc12.exe''' in this document with the appropriate command launcher for your version. Also, note that the command launcher for the particular application version you are using is '''not''' located in the application installation directory (inside <tt>C:\Program Files\</tt> for example) but is instead found in your standard system directory. This is often found at <tt>C:\WINDOWS\system32\</tt> for most Windows installations. However, because the System directory would normally be found in your system's "path" it is not normally necessary to specify the full path when calling the command launcher.
'''NOTE:''' replace all instances of '''mc14.exe''' in this document with the appropriate command launcher for your version. Also, note that the command launcher for the particular application version you are using is '''not''' located in the application installation directory (inside <tt>C:\Program Files\</tt> for example) but is instead found in your standard system directory. This is often found at <tt>C:\WINDOWS\system32\</tt> for most Windows installations. However, because the System directory would normally be found in your system's "path" it is not normally necessary to specify the full path when calling the command launcher.


==Execute Parameters==
==Execute Parameters==
Executing mc12.exe with one of the following command line parameters first starts Media Center if it is not already running.
Executing mc14.exe with one of the following command line parameters first starts Media Center if it is not already running.


===Playback Execute Parameters===
===Playback Execute Parameters===
'''mc12.exe [''item'']|[''item'']...''' If playback is currently stopped, Playing Now is replaced with the item(s) and playback starts, otherwise the item(s) are appended to Playing Now and playback jumps to the first specified item.
'''mc14.exe [''item'']|[''item'']...''' If playback is currently stopped, Playing Now is replaced with the item(s) and playback starts, otherwise the item(s) are appended to Playing Now and playback jumps to the first specified item.


'''mc12.exe /Append [''item'']|[''item'']...''' Appends item(s) to Playing Now without changing the current playback state.
'''mc14.exe /Append [''item'']|[''item'']...''' Appends item(s) to Playing Now without changing the current playback state.


'''mc12.exe /AudioCD'''
'''mc14.exe /AudioCD'''


'''mc12.exe /Clear [mode]''' Removes all files from Playing Now and stops playback.
'''mc14.exe /Clear [mode]''' Removes all files from Playing Now and stops playback.


:The only available [mode] is:
:The only available [mode] is:
:* '''DontRemoveCurrent''' Does not remove the currently playing file and does not stop playback.
:* '''DontRemoveCurrent''' Does not remove the currently playing file and does not stop playback.


'''mc12.exe /Close''' Closes Media Center.
'''mc14.exe /Close''' Closes Media Center.


'''mc12.exe /Connect m01p://[ip address or host name]''' Establishes a connection to the specified remote Media Server.
'''mc14.exe /Connect m01p://[ip address or host name]''' Establishes a connection to the specified remote Media Server.


'''mc12.exe /DVDVideo'''
'''mc14.exe /DVDVideo'''


'''mc12.exe /ExportToXML'''
'''mc14.exe /ExportToXML'''


'''mc12.exe /Import [filename]''' Imports the specified file into the Media Center library and launches Media Center.
'''mc14.exe /Import [filename]''' Imports the specified file into the Media Center library and launches Media Center.


'''mc12.exe /ImportAndPlay'''
'''mc14.exe /ImportAndPlay'''


'''mc12.exe /Library [Library Name]''' Changes to the library specified by '''[Library Name]''' (Media Center 12.0.384 and later).
'''mc14.exe /Library [Library Name]''' Changes to the library specified by '''[Library Name]''' (Media Center 12.0.384 and later).


'''mc12.exe /LibraryReadOnly''' Starts Media Center with the library read only (Party Mode).
'''mc14.exe /LibraryReadOnly''' Starts Media Center with the library read only (Party Mode).


'''mc12.exe /MCC [command],[param]''' Sends the specified Media Center Core Command to Media Center.
'''mc14.exe /MCC [command],[param]''' Sends the specified Media Center Core Command to Media Center.


:[command] is one of the [[Media_Center_Core_Commands|Media Center Core Commands]].
:[command] is one of the [[Media_Center_Core_Commands|Media Center Core Commands]].
Line 48: Line 49:
:Note: These are only available in Media Center.
:Note: These are only available in Media Center.


'''mc12.exe /MediaServer''' Starts Media Center in Media Server mode (without a UI).
'''mc14.exe /MediaServer''' Starts Media Center in Media Server mode (without a UI).


'''mc12.exe /Mime'''
'''mc14.exe /Mime'''


'''mc12.exe /Mode [modename]''' If Media Center is not currently running, this starts Media Center in the specified mode, otherwise this switches Media Center to the specified mode.
'''mc14.exe /Mode [modename]''' If Media Center is not currently running, this starts Media Center in the specified mode, otherwise this switches Media Center to the specified mode.


:[modename] can be one of the following:
:[modename] can be one of the following:
Line 62: Line 63:
:Note: An empty [modename] is the same as the user's chosen startup mode if Media Center is not running, or Standard if it is already running.
:Note: An empty [modename] is the same as the user's chosen startup mode if Media Center is not running, or Standard if it is already running.


'''mc12.exe /Play [''item'']|[''item'']...''' If playback is currently stopped, Playing Now is replaced with the item(s) and playback starts, otherwise the item(s) are appended to Playing Now and playback jumps to the first specified item.
'''mc14.exe /Play [''item'']|[''item'']...''' If playback is currently stopped, Playing Now is replaced with the item(s) and playback starts, otherwise the item(s) are appended to Playing Now and playback jumps to the first specified item.


'''mc12.exe /PlayReplace [''item'']|[''item'']...''' Playing Now is replaced with the item(s) and playback starts.
'''mc14.exe /PlayReplace [''item'']|[''item'']...''' Playing Now is replaced with the item(s) and playback starts.


:Each [''item''] can be one of the following:
:Each [''item''] can be one of the following:
Line 74: Line 75:
:Note: The TREEPATH=''Location''\''Item'' specification is case-sensitive for ''Location'' and ''Item'' and the hierarchy separator is \.
:Note: The TREEPATH=''Location''\''Item'' specification is case-sensitive for ''Location'' and ''Item'' and the hierarchy separator is \.


:Note: For Media Center 10 or greater, the Playback Execute Parameters can be issued to a specific Zone by adding '''Zone=x''' as one of the items in the | delimited list. e.g. "mc12.exe /Append C:\1.mp3|C:\2.mp3|Zone=3".
:Note: For Media Center 10 or greater, the Playback Execute Parameters can be issued to a specific Zone by adding '''Zone=x''' as one of the items in the | delimited list. e.g. "mc14.exe /Append C:\1.mp3|C:\2.mp3|Zone=3".


'''mc12.exe /Power''' Starts Media Center if it's not running, or closes it if it is.
'''mc14.exe /Power''' Starts Media Center if it's not running, or closes it if it is.


'''mc12.exe /Protocol'''
'''mc14.exe /Protocol'''


'''mc12.exe /Replace'''
'''mc14.exe /Replace'''


'''mc12.exe /SilentImport [filename]''' Imports the specified file into Media Center library but does not launch Media Center.
'''mc14.exe /SilentImport [filename]''' Imports the specified file into Media Center library but does not launch Media Center.


'''mc12.exe /Start''' Starts Media Center or brings it to top.
'''mc14.exe /Start''' Starts Media Center or brings it to top.


'''mc12.exe /Subscribe''' subscribe to a podcast.
'''mc14.exe /Subscribe''' subscribe to a podcast.


==Command Parameters==
==Command Parameters==
Executing mc12.exe with one of the following command line parameters will only control an already running instance of Media Center. If Media Center is not already running, the following commands are ignored.
Executing mc14.exe with one of the following command line parameters will only control an already running instance of Media Center. If Media Center is not already running, the following commands are ignored.


'''mc12.exe /Command Play''' Starts playback of the selected track(s).
'''mc14.exe /Command Play''' Starts playback of the selected track(s).


'''mc12.exe /Command Pause''' Toggles between play and pause states.
'''mc14.exe /Command Pause''' Toggles between play and pause states.


'''mc12.exe /Command Stop''' Stops playback.
'''mc14.exe /Command Stop''' Stops playback.


'''mc12.exe /Command Next''' Skips to the next track.
'''mc14.exe /Command Next''' Skips to the next track.


'''mc12.exe /Command Previous''' Skips to the previous track.
'''mc14.exe /Command Previous''' Skips to the previous track.


'''mc12.exe /Command FastForward''' Jumps 5 seconds forward.
'''mc14.exe /Command FastForward''' Jumps 5 seconds forward.


'''mc12.exe /Command Rewind''' Jumps 5 seconds backward.
'''mc14.exe /Command Rewind''' Jumps 5 seconds backward.


'''mc12.exe /Command Mute''' Mutes the sound.
'''mc14.exe /Command Mute''' Mutes the sound.


'''mc12.exe /Command VolumeUp [value]''' Increases the sound volume by [value].
'''mc14.exe /Command VolumeUp [value]''' Increases the sound volume by [value].
:Note: [value] defaults to 5%.
:Note: [value] defaults to 5%.


'''mc12.exe /Command VolumeDown [value]''' Decreases the sound volume by [value].
'''mc14.exe /Command VolumeDown [value]''' Decreases the sound volume by [value].
:Note: [value] defaults to 5%.
:Note: [value] defaults to 5%.


'''mc12.exe /Command VolumeSet [value]''' Sets the sound volume directly to [value].
'''mc14.exe /Command VolumeSet [value]''' Sets the sound volume directly to [value].
:Note: [value] defaults to 50%.
:Note: [value] defaults to 50%.


'''mc12.exe /Command ToggleShuffle''' Toggles shuffle mode
'''mc14.exe /Command ToggleShuffle''' Toggles shuffle mode


'''mc12.exe /Command ToggleContinuous''' Toggles continuous mode
'''mc14.exe /Command ToggleContinuous''' Toggles continuous mode

Revision as of 17:54, 18 August 2009

Media Center can be controlled by command line parameters sent to the appropriate command launcher:

  • Media Center 14 - mc14.exe
  • Media Center 13 - mc13.exe
  • Media Center 12 - mc12.exe
  • Media Center 11 - mc11.exe
  • Media Jukebox 12 - mj12.exe
  • Media Jukebox - mjextman.exe

NOTE: replace all instances of mc14.exe in this document with the appropriate command launcher for your version. Also, note that the command launcher for the particular application version you are using is not located in the application installation directory (inside C:\Program Files\ for example) but is instead found in your standard system directory. This is often found at C:\WINDOWS\system32\ for most Windows installations. However, because the System directory would normally be found in your system's "path" it is not normally necessary to specify the full path when calling the command launcher.

Execute Parameters

Executing mc14.exe with one of the following command line parameters first starts Media Center if it is not already running.

Playback Execute Parameters

mc14.exe [item]|[item]... If playback is currently stopped, Playing Now is replaced with the item(s) and playback starts, otherwise the item(s) are appended to Playing Now and playback jumps to the first specified item.

mc14.exe /Append [item]|[item]... Appends item(s) to Playing Now without changing the current playback state.

mc14.exe /AudioCD

mc14.exe /Clear [mode] Removes all files from Playing Now and stops playback.

The only available [mode] is:
  • DontRemoveCurrent Does not remove the currently playing file and does not stop playback.

mc14.exe /Close Closes Media Center.

mc14.exe /Connect m01p://[ip address or host name] Establishes a connection to the specified remote Media Server.

mc14.exe /DVDVideo

mc14.exe /ExportToXML

mc14.exe /Import [filename] Imports the specified file into the Media Center library and launches Media Center.

mc14.exe /ImportAndPlay

mc14.exe /Library [Library Name] Changes to the library specified by [Library Name] (Media Center 12.0.384 and later).

mc14.exe /LibraryReadOnly Starts Media Center with the library read only (Party Mode).

mc14.exe /MCC [command],[param] Sends the specified Media Center Core Command to Media Center.

[command] is one of the Media Center Core Commands.
[param] is optional, and defaults to 0.
Note: These are only available in Media Center.

mc14.exe /MediaServer Starts Media Center in Media Server mode (without a UI).

mc14.exe /Mime

mc14.exe /Mode [modename] If Media Center is not currently running, this starts Media Center in the specified mode, otherwise this switches Media Center to the specified mode.

[modename] can be one of the following:
  • Standard, Megame, or Windowed Standard View
  • Minime Mini View
  • Fullscreen Display View
  • Theater Theater View
Note: An empty [modename] is the same as the user's chosen startup mode if Media Center is not running, or Standard if it is already running.

mc14.exe /Play [item]|[item]... If playback is currently stopped, Playing Now is replaced with the item(s) and playback starts, otherwise the item(s) are appended to Playing Now and playback jumps to the first specified item.

mc14.exe /PlayReplace [item]|[item]... Playing Now is replaced with the item(s) and playback starts.

Each [item] can be one of the following:
  • A filename: C:\song1.mp3
  • A URL: http:\\www.somewebsite.com\station.pls
  • A location within the Organization Tree: TREEPATH=Playlists\Playlist1
  • A device under CD & DVD and Handhelds: DEVICE=G:
Note: The TREEPATH=Location\Item specification is case-sensitive for Location and Item and the hierarchy separator is \.
Note: For Media Center 10 or greater, the Playback Execute Parameters can be issued to a specific Zone by adding Zone=x as one of the items in the | delimited list. e.g. "mc14.exe /Append C:\1.mp3|C:\2.mp3|Zone=3".

mc14.exe /Power Starts Media Center if it's not running, or closes it if it is.

mc14.exe /Protocol

mc14.exe /Replace

mc14.exe /SilentImport [filename] Imports the specified file into Media Center library but does not launch Media Center.

mc14.exe /Start Starts Media Center or brings it to top.

mc14.exe /Subscribe subscribe to a podcast.

Command Parameters

Executing mc14.exe with one of the following command line parameters will only control an already running instance of Media Center. If Media Center is not already running, the following commands are ignored.

mc14.exe /Command Play Starts playback of the selected track(s).

mc14.exe /Command Pause Toggles between play and pause states.

mc14.exe /Command Stop Stops playback.

mc14.exe /Command Next Skips to the next track.

mc14.exe /Command Previous Skips to the previous track.

mc14.exe /Command FastForward Jumps 5 seconds forward.

mc14.exe /Command Rewind Jumps 5 seconds backward.

mc14.exe /Command Mute Mutes the sound.

mc14.exe /Command VolumeUp [value] Increases the sound volume by [value].

Note: [value] defaults to 5%.

mc14.exe /Command VolumeDown [value] Decreases the sound volume by [value].

Note: [value] defaults to 5%.

mc14.exe /Command VolumeSet [value] Sets the sound volume directly to [value].

Note: [value] defaults to 50%.

mc14.exe /Command ToggleShuffle Toggles shuffle mode

mc14.exe /Command ToggleContinuous Toggles continuous mode