Jump to content

MCE Controller - code to navigate directly to MBC?


gator99
Go to solution Solved by mellomade,

Recommended Posts

gator99

Not sure if anyone uses iRule as a remote control device in their system, in short is a IP control system and with the program MCE Controller on your HTPC you can design and control your HTPC from a phone and/or Tablet.

 

With that said I am trying to find the Virtual Keyboard (http://msdn.microsoft.com/en-us/library/dd375731(v=vs.85).aspx) function that would start MBC directly, much like the "Movies" or "RecordTV" button on a Windows Media Center Remote.

 

If there is not a direct code to MBC, maybe there is a way to change the registry and use the "Movies" command that goes to native Windows Media Center movies goto MBC instead?

 

As a side note I am also looking for the code for "Back" command that is on the MC remote as it is different than the "Back" command in the Virtual Keyboard list and iRule's settings for MCE Controller.

 

Thanks for you time.

Link to comment
Share on other sites

Redshirt

you could put the shortcut that the MBC install creates in your taskbar. Then just program your remote to send "win key + x" where x is the position of that icon from left to right. Starting at 1.

Link to comment
Share on other sites

gator99

Thank you Redshirt, that is a thought, after I posted I found this command to start Netflix in Windows Media Center:

 

<StartProcess Cmd="netflix" File="windowsmediacenterapp:{e6f46126-f8a9-4a97-9159-b70b07890112}\{982ea9d3-915c-4713-a3c8-99a4688b7c59}?EntryPointParameters="/>

 

 

If I can figure out the entry point for MBC then I have my solution - time to google entry point in Windows Media Center.

 

thank you for your reply - also great Android app.

Link to comment
Share on other sites

Redshirt

If you right click on the shortcut I mentioned above, you'll get the GUID you need for your entrypoint.

 

On my machine the shortcut resolves to

C:\Windows\ehome\ehshell.exe /nostartupanimation /entrypoint:{CE32C570-4BEC-4aeb-AD1D-CF47B91DE0B2}\{FC9ABCCC-36CB-47ac-8BAB-03E8EF5F6F22}
  • Like 1
Link to comment
Share on other sites

MBC does not support entry points any more as far as I know.  

 

You can direct enter the main program as Redshirt indicated above.

Link to comment
Share on other sites

gator99

I will have to keep trying as I am getting errors when using "C:\Windows\ehome\ehshell.exe /nostartupanimation /entrypoint:{CE32C570-4BEC-4aeb-AD1D-CF47B91DE0B2}\{FC9ABCCC-36CB-47ac-8BAB-03E8EF5F6F22}"

 

 Command: (MediaBrowserClassic) error: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at MCEControl.StartProcessCommand.Execute(Reply reply)
   at MCEControl.CommandTable.Execute(Reply reply, String cmd)
   at MCEControl.MainWindow.ReceivedData(Reply reply, String cmd)
Link to comment
Share on other sites

 

I will have to keep trying as I am getting errors when using "C:\Windows\ehome\ehshell.exe /nostartupanimation /entrypoint:{CE32C570-4BEC-4aeb-AD1D-CF47B91DE0B2}\{FC9ABCCC-36CB-47ac-8BAB-03E8EF5F6F22}"

 

 Command: (MediaBrowserClassic) error: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at MCEControl.StartProcessCommand.Execute(Reply reply)
   at MCEControl.CommandTable.Execute(Reply reply, String cmd)
   at MCEControl.MainWindow.ReceivedData(Reply reply, String cmd)

 

 

You should find your own GUID by right clicking the MBC shortcut instead of just copying Redshirt's link. It won't work for you to use the link he provided because that GUID is unique to his computer.

Link to comment
Share on other sites

Where did that error come from?  Is an MBC log generated?  If so, please post it.

Link to comment
Share on other sites

@@bigjohn that is mine

 

Sent from my Nexus 5 using Tapatalk

 

Oh, sorry. Guess it is not unique then.

Link to comment
Share on other sites

Okay, then it looks like it is having trouble finding media center...

Link to comment
Share on other sites

gator99

@@ebr windows media center also gives me an error that says it Connor open a window inside media center

 

Sent from my Nexus 5 using Tapatalk

Link to comment
Share on other sites

Sorry, I'm not familiar with the program you are using to do this...

Link to comment
Share on other sites

gator99

I have never completely understood what "Entry Points" were and now that MB3 doesn't support them I guess it doesn't matter.

 

What I know is the method that redshirt/ebr mention will not work when I already have Windows Media Center Open as it gives errors saying that "it can't open another window while WMC is already running" - paraphrasing

 

 

Currently the way "iRule" works to start Netflix app in WMC is the following command:
 

<StartProcess Cmd="netflix" File="windowsmediacenterapp:{e6f46126-f8a9-4a97-9159-b70b07890112}\{982ea9d3-915c-4713-a3c8-99a4688b7c59}?EntryPointParameters="/>

 

I assume netflix is an entry point?

 

Where I am confused on entry points is this, what exactly is the "MediaBrowser" button in Windows Media Center and is there no direct way to go directly to that button and select it?

 

As mentioned above the "directly entering the program" as redshirt/ebr mentioned is not working when I already have WMC open.

Link to comment
Share on other sites

The problem is however this program you are using is working.  The method we provided should work fine from the windows desktop - whether media center is running or not.

 

Apparently, this thing you are using is doing something other than just running the command you give it via the normal windows shell.  I don't know if it only understands certain commands or what but you could try creating a command just like that netflix one and change the name to "media browser 3" and change this bit:

{e6f46126-f8a9-4a97-9159-b70b07890112}\{982ea9d3-915c-4713-a3c8-99a4688b7c59}

To

{CE32C570-4BEC-4aeb-AD1D-CF47B91DE0B2}\{FC9ABCCC-36CB-47ac-8BAB-03E8EF5F6F22}
Link to comment
Share on other sites

  • Solution
mellomade

@@gator99

 

The problem specifically with MCEController is that you cannot just define a shortcut directly using StartProcess within MCEController.  The example always used is Netflix - which has its own switch built into WMC.  MBC does not have this.  It is an entry point - and entry points can only be called directly from shortcuts.  Netflix is somehow a special type of entry point in WMC that has its own command set.

 

What you have to do is create a shortcut (somewhere on your hard drive) that utilizes the specific entry point MBC generates.  When you install MBC - does it create a shortcut for you?  If so use that one.  Otherwise create a shortcut that uses Redshirt's example:

 

C:\Windows\ehome\ehshell.exe /nostartupanimation /entrypoint:{CE32C570-4BEC-4aeb-AD1D-CF47B91DE0B2}\{FC9ABCCC-36CB-47ac-8BAB-03E8EF5F6F22}

 

Test the shortcut first that when you double click it opens WMC into MBC.

 

In MCEController - create a line like:

 

<StartProcess Cmd="MBC" File="C:\temp\Shortcut_for_MBC.lnk"/>

 

In this example a shortcut named 'Shortcut_for_MBC.lnk' exists in C:\temp that opens WMC into MBC.

 

Now sending the command 'MBC' to MCEController should execute MBC.

 

Hope this helps.

  • Like 1
Link to comment
Share on other sites

gator99

@ - that is it. works perfectly inside of WMC but outside it opens WMC in a window so I will have to figure the following code from MCE Controller that opens WMC in "full Screen" and add it to the information you were so kind enough to share.

 

This is the code that starts WMC in full screen:

 

<StartProcess Cmd="mcestart" File="C:\windows\ehome\ehshell.exe">
  <nextCommand xsi:type="SendMessage" 
               ClassName="ehshell" 
               Msg="274" wParam="61488" lParam="0" />
</StartProcess>"
 
This is the line I added to MCE Controller per your advice:
 
<StartProcess Cmd="MB3" File="C:\Users\admin\Desktop\MediaBrowserClassic.lnk" />
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...