Hacking Windows 7 Media Center

Media Center Command-Line Switches

by Michael Healy @ 9:00 am on May 7th, 2009 in windows 7 with 13 Comments

ehshell command line If you’re looking for a way to setup a shortcut to launch Media Center to a specific section or even directly into a plug-in such as Media Browser you’ll need to use a command line switch. These values can even be used in other program launching applications or with universal remotes like the Logitech Harmony.

To setup a Windows shortcut to launch directly Media Browser for example you would create a shortcut to “C:\Windows\ehome\ehshell.exe” and then insert the following command-line switch afterwards: “/entrypoint:{CE32C570-4BEC-4aeb-AD1D-CF47B91DE0B2}\{FC9ABCCC-36CB-47ac-8BAB-03E8EF5F6F22}”.

ehshell.exe shortcut

The values placed after “/entrypoint:” are the application identifier and the gui identifier numbers for the plug-in you wish to launch. You can find these values in the registry by launching “regedit” (start –> regedit –> enter) and browsing to:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Extensibility\Entry Points]

appid/guid registry entries

Here you will find a listing of GUI IDs, selecting each one should give you a clue to the application displayed on the right side. Most applications will include at least a title and an AppID which is the first number after the command-line switch. Simply enter “/entrypoint:{AppID}\{GUIID}” after the target of your shortcut and you’ll be all set.

There are also a number of other command-line switches available which you can use to launch directly into the default functions of Media Center as well as to help with the debugging process for plug-in developers. Take from MSDN here’s a complete list of switches:

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 Presentation Layer 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.

13 Comments

Comment #810 from Andres [Reply]

Is there anyway to make this work with extenders? Can you make a registry setting change for the extender user so that when the extender connects and starts media center executes one of the switches?

Thanks for the great info!

Comment left May 7, 2009 at 2:43 pm Permanent Link

bud
Comment #833 from bud [Reply]

Thanks for the tip.
Do you know if one can add such a shortcut to the new “jump list” taskbar?

Comment left May 8, 2009 at 6:30 am Permanent Link
@Reply #837 from Michael Healy [Reply]

That’s an interesting idea. I’ll have to look into how the jump lists are stored to see if it’s possible to add new tasks to the list.

Comment left May 8, 2009 at 8:33 am Permanent Link
Comment #843 from ToMoFFeL [Reply]

If you add “/mcesuperbar://tv?live=true” then you can direct start liveTV :)

Comment left May 8, 2009 at 9:58 am Permanent Link

ThunderKatz
Comment #975 from ThunderKatz [Reply]

Any idea how to direct start a saved FM radio station?

Comment left May 11, 2009 at 1:21 pm Permanent Link

Luis
Comment #1025 from Luis [Reply]

Thanks, exelent post!

One question:
Can I remove all entry points except the one that represents my application? so when I launch MC it starts with my application ?

Comment left May 13, 2009 at 10:43 am Permanent Link
@Reply #1031 from Michael Healy [Reply]

I’m not sure I understand what you’re trying to do but you can find info on removing complete menu strips and menu strip items at those links.

The registry entries for entry points are just helpers for the Media Center program that tell it where to look for a specific app.

Comment left May 13, 2009 at 1:25 pm Permanent Link
Comment #1058 from luisvid [Reply]

Michael

What I’m trying to do is to remove all the MC menu strips, so that the only menu strip show at MC start is the one I created
But when I remove all MC nenu strips (modifig registry entries), MC crashes, how can I do to start MC with just my menu strip?

Thanks

Comment left May 14, 2009 at 7:52 am Permanent Link
@Reply #1064 from Michael Healy [Reply]

I believe that you have to have at least one strip enabled. I’m not sure if this means one of the default strips or just one strip. If 7MC is crashing on start up with just your custom strip I’m inclined to say one default strip has to be enabled. This is a limitation built into the Media Center program unfortunately.

Comment left May 14, 2009 at 8:40 am Permanent Link

Steve D.
Comment #2865 from Steve D. [Reply]

Just got the Harmony one and would love to assign MediaBrowser to a button. I was planning on changing the “Recorded TV” button to launch MB, however I can’t find this in the registry. In fact, I can’t find any of the default Media Center buttons under Entry Points. Am I looking in the wrong place?

Comment left August 23, 2009 at 11:57 am Permanent Link
Comment #4550 from gr4z [Reply]

Just tried this and it simply doesnt work for me. It simply starts 7MC and nothing else. I have checked my GUID and AppID. Shame

Comment left November 4, 2009 at 5:46 pm Permanent Link

Ben Iffland
Comment #11235 from Ben Iffland [Reply]

Anyone know the switch or keyboard shorcut to get to Internet TV?
thanks

Comment left May 19, 2010 at 5:08 pm Permanent Link

Dulus
Comment #11377 from Dulus [Reply]

Anyone knows how to play videos automatically on start of Media Center, beause i didnt find any switch for it

Comment left May 22, 2010 at 5:52 pm Permanent Link

Leave A Comment

Post Anonymously, Fill in your details or Use one of the Social Networks below to login and post a comment!