Using Command Line Switches for ehShell.exe
The Windows Media Center process (ehShell.exe) contains the following command-line switches that can be useful when debugging layout issues:
ehshell.exe /entrypoint:{application_guid}\{entrypoint_guid}
This switch starts Windows Media Center and navigates directly to a registered entry point, where application_guid and entrypoint_guid are strings that contain the GUIDs of the application and entry point identifiers for the entry point to launch.
ehshell.exe /url:url
This switch starts Windows Media Center and navigates directly to a Hosted HTML application that is specified by url.
ehshell.exe /homepage:url
This switch starts Windows Media Center and navigates directly to a Windows Media Center web application that is specified by url.
ehshell.exe /addinfallbackpath:path
This switch starts Windows Media Center and uses the location specified in path to locate and load application assemblies. This location is only used after Windows Media Center attempts to load application assemblies from the global assembly cache (GAC) and \windows\ehome.
ehshell.exe /gdi
This switch starts Windows Media Center in Graphics Device Interface (GDI) graphics mode, which simulates a low-fidelity graphics environment that does not support DirectX graphics mode.
ehshell.exe /widescreen
This switch starts Windows Media Center with a 16:9 aspect ratio to enable testing widescreen display resolutions on systems that only have a 4:3 monitor installed. This switch works when Windows Media Center is started in windowed mode, but will not work in full-screen mode.
ehshell.exe /rtl
This switch starts Windows Media Center in right-to-left (RTL) display mode.
ehshell.exe /directmedia:general
This switch starts Windows Media Center in full-screen mode.
ehshell.exe /directmedia:music
This switch starts Windows Media Center in full-screen mode and navigates to the Music Library.
ehshell.exe /directmedia:video
This switch starts Windows Media Center in full-screen mode and navigates to the Video Library.
ehshell.exe /directmedia:tv
This switch starts Windows Media Center in full-screen mode and navigates to Recorded TV.
ehshell.exe /directmedia:pictures
This switch starts Windows Media Center in full-screen mode and navigates to the Picture Library.
ehshell.exe /directmedia:discplayback
This switch starts Windows Media Center in full-screen mode and begins playback of the disc in the drive according to AutoPlay registration.
ehshell.exe /nochrome
This switch starts Windows Media Center without the window frame (the border, caption, or toolbox) and does not display the Windows Media Center icon on the taskbar.
ehshell.exe /noshutdownui
This switch hides the Shut Down and Close tiles under Tasks on the Windows Media Center Start menu. Note that the Close tile is only available on Extenders.
ehshell.exe /controlbox:buttons
This switch lets you specify the buttons to display on the controlbox (the toolbar at the top right of the Windows Media Center window), where buttons is a comma-delimited list of buttons.
The following values can be used for buttons:
None: Displays no buttons.
All: Displays all buttons.
Minimize: Displays the Minimize button.
Window: Displays the Restore Down/Maximize button.
Close: Displays the Close button.
For example, use the following switch to display the Minimize and Close buttons:
ehshell.exe /controlbox:minimize,close
See Also