HTPC Geek Project: Launching Netflix WMC and Hulu Desktop from XBMC

Published on

One of my nerdiest hobbies is tweaking the software on my HTPC, a custom Windows 7 box I built with a very good friend of mine after its predecessor fell short of my expectations.

My current remote-friendly front-end of choice is XBMC (version 11, “Eden”). I thought I’d share how I got it to launch the Netflix portion of Windows Media Center and Hulu Desktop from the home screen using AutoHotkey and a couple of add-ons.

Prerequisites

Before we begin, make sure everything here is installed and ready to go:

We’ll also need these XBMC add-ons, both available in the XBMC.org Add-ons repo in the Program Add-ons group. Refer to this how-to if you need help.

Getting the remote to play nice

Most Media Center remotes send these low-level commands that are interpreted by something called an “eHome” driver. This makes the customization of these commands pretty frustrating, and the software that’s available to help you through it is either over-reaching or completely unintuitive. Thankfully, the MCERemote add-on helps us deal with that pesky issue by remapping those commands to more agreeable keystrokes.

Navigate to the MCERemote add-on and follow the instructions therein to apply (and optionally customize) the changes. If you change your mind later, you can reverse these changes from this same add-on.

Launching XBMC from the start button

Sometimes referred to as the “Media Center,” “MCE” or “green” button, the start button is prominent on just about every HTPC remote and in the configuration options for the Harmony One. Normally this will launch Windows Media Center, but we want it to launch XBMC. Thankfully, the MCERemote add-on remaps this command to Control + Shift + Win, which we can listen for using an AutoHotkey script.

Create a new file called launch-xbmc.ahk (or something similar) with these contents:

^+W:: IfWinExist, Windows Media Center { WinClose, Windows Media Center } IfWinExist, Hulu Desktop { WinClose, Hulu Desktop } IfWinNotExist, XBMC { Run, “C:\Program Files (x86)\XBMC\XBMC.exe” “C:\Program Files (x86)\XBMC” } WinRestore, XBMC WinActivate, XBMC return

After you’ve saved the file, double-click it. You should see a little AutoHotkey icon in your taskbar indicating that a script is running. While running, the start button will tell your PC to do this:

  1. Close Windows Media Center if it’s open.
  2. Close Hulu Desktop if it’s open.
  3. Open XBMC if it isn’t open.
  4. Bring the XBMC window to the foreground.

To ensure this script is always running, I recommend placing a shortcut to it in your programs’ “startup” directory.

Launching Netflix and Hulu Desktop

Next, we need to create two more scripts that we can launch from within XBMC. Both scripts do essentially the same thing:

  1. Run the app.
  2. Make sure the app has focus.
  3. When the app closes, give XBMC the focus again.

Here are the contents of our launch-hulu.ahk file:

Run, %LOCALAPPDATA%\HuluDesktop\HuluDesktop.exe WinWait, Hulu Desktop WinActivate, Hulu Desktop Process, WaitClose, HuluDesktop.exe WinRestore, XBMC WinActivate, XBMC ExitApp

And of our launch-netflix.ahk file:

Run, windowsmediacenterapp:{e6f46126-f8a9-4a97-9159-b70b07890112}{982ea9d3-915c-4713-a3c8-99a4688b7c59}?EntryPointParameters= WinWait, Windows Media Center WinActivate, Windows Media Center WinWaitClose, Windows Media Center WinRestore, XBMC WinActivate, XBMC ExitApp

Make note of where you saved both files, and open XBMC again. Navigate to your add-ons and select either Advanced Launcher or Executor (depending on what you installed earlier).

Follow the in-app prompts to create launchers for both Netflix and Hulu Desktop. I recommend watching this walkthrough for assistance doing so using Advanced Launcher.

Adding the launchers to your home screen

For each of the launchers you create, highlight them in the add-on menu and hit C on your keyboard. This will bring up a context menu. Choose to add the launcher to your favorites.

Now, go to your XBMC system settings and find the “Skin” section. Every skin is different, but if yours supports custom home screen entries, there should be some sort of “home customization” section. Look for a way to add a custom “favorites” item.

I’m using the Aeon Nox skin. When customizing the homescreen, I set “FAV1” and “FAV2” to my Netflix and Hulu launchers. Aeon Nox also lets me set custom backdrops, which I created especially for Netflix and Hulu.

Hulu in the Aeon Nox home screen

Enjoy (with caveats)

Hooray! Now you should be able to enjoy XBMC, Netflix and Hulu in harmony from the comfort of your living room. That said, there are some drawbacks to this solution…

If you have any suggestions on how I can improve my setup, please let me know!

Updates

March 19, 2013

Since the release of XBMC 12 “Eden,” I’ve tweaked my setup ever so slightly. Here are the relevant updates: