XBMC as an HTPC Part II – Windows 7

[7:30PM]

With the recent update to the XBMC bits related to Windows and support for GPU rendering I decided to take the plunge and convert my XBMC Home Theatre PC (HTPC) to use Windows 7 as its foundation, and XBMC on top of it. This post is intended to outline the experience I had with the migration.

My previous build included using the Live USB Linux (Ubuntu) based version, booting from a USB Stick with a local file store on the USB drive. I still love this idea but I think the advantages of moving to a Windows platform outweigh need to keep with the Live USB boot.

The biggest motivation, for me, is the fact that it will play nice with my Windows Home Server (WHS). WHS has the ability to remotely wake up and backup target machines in your network. Another motivation is, based on those backups, you can roll back changes made to any back up. And finally the fact that I’m ultimately a windows guy using Windows 7 is just an added plus for me (.NET Development, the wider range of Applications available, etc.).

For this installation I will be using a Mouse and Keyboard.  Windows loves the dependency on both, but the expectation that once setup both should go back into the closet.

Hardware Upgrade

So, let’s get started.

My hardware platform, documented here, is slightly upgraded to include a 500GB SATA 7200RPM Drive. Absolutely no special reason for choosing this drive other than it fits within my enclosure and I had it sitting, unused, in my basement. Bonus!

Installation of the drive is a snap, just plug it into one of the 3 available SATA Ports on the motherboard and your done.

Post-Figure1

Preparing the Install Media

Since there is no DVD drive in my unit I will need to install the Windows 7 Boot to USB.  For this you will first need to download the “Windows 7 USB/DVD Download Tool” [direct download] [source, etc.]. 

Install it, and execute…

image

Follow the tool’s wizard interface to build your USB Drive with your valid Windows 7 installation. 

image 

If you are having issues with your drive, it may be useful to dump to DOS and use the DiskPart command to manage the partitions and set the disk up as you see fit.  For example, I’m using a drive which had 3x950MB Partitions.  I had to first remove them all, create a new partition, full size and set it as primary.  Once that was all done I was able to format it and use it.

Please Note: I’m using a SanDisk Titanium Cruzer, 4.0GB in size.  The ISO itself for Windows 7 is 2.32GB, so I would recommend using at least a 4.0GB drive to work with.

Now that you have your USB Drive loaded with Windows 7, pop it into your USB Port on your XBMC Device.  Be sure to set the boot loader sequence in your BIOS to choose the USB as the first boot option and then boot into the Installation Process.  Wait for the Windows setup to kick in and you should see the familiar “Windows is loading files…” screen.

image

Continue your way through the Windows 7 installation process until your OS is setup.  If your running WHS, skip down to the the “WHS Setup” section below.  I personally would add the Windows 7 installation to my WHS prior to installing anything, and make incremental backups as we move along.  (I will indicated this by using: [backup now]).  Again, if your not using WHS, just ignore and move on.

Please Note:I chose “Automatic Updates” (For Windows Updates) during the installation process.  I want this thing to –just do its thing- and not have to worry about maintaining it along with the rest of the machines on my network. 

Disable Windows 7 Security

In order to have a straight boot to HTPC experience you will want to disable the login screen entirely.  In order to do this follow these steps:

1. Win+R, to get the Run dialog

2. Enter in: “control userpasswords2” (no quotes), hit enter

3. Near the top of that dialog you will see a checkbox labeled:

Users must enter a user name and password to use this computer

Be sure that this is NOT CHECKED.

You will also need to disable User Account Control entirely, here’s how:

1. Win+R, to get the Run Dialog

2. Enter in: “UserAccountControlSettings”, (no quotes), hit enter

3. Use the Slider, and slide it all the way down to “Never notify”, and hit OK.

[8:30 PM]

[backup now]

(make sure you yank out your USB boot disk)

[reboot]

 

Installing XBMC

You can download the latest Stable Release via their download page, or try your luck with one of the Nightly Builds.  I plan on using the latest nightly build, which is:

[   ] xbmc-r28256-trunk.exe 01-Mar-2010 09:47   45M   Mirrors Metalink

I chose one of the mirrors at random and was able to get about 1MB/s download.  You may want to find which Mirror is best for you, given your location and ISP.

I chose all of the defaults for the actual installation of XBMC.  Just hit Next all the way through.  You should notice that the Visual C Runtime and the DirectX Installations do take a bit of time, so be patient. 

Please Note: On my connection the DirectX Runtime takes about 45 seconds to download.

Once the product installs, give it a test run.  Ensure it works.

[reboot]

[backup now]

 

Using your MCE Remote

The tool of choice for most installations on Windows, for IR remotes – Media Center Remote (MCE) is EventGhost (EG). From their Web Site…

What is EventGhost?

EventGhost is an advanced, easy to use and extensible automation tool for MS Windows. It can use different input devices like infrared or wireless remote controls to trigger macros, that on their part control a computer and its attached hardware. So it can be used to control a Media-PC with a normal consumer remote. But its possible uses go much beyond this.

The depth of support that it has around X10 is a huge bonus.  What you will need to do is first install EG on the machine, and then download the MCE/XBMC Plug-in and then connect the XBMC actions with the events from your remote.

Plug-in your USB IR Dongle and allow Windows 7 to install the appropriate driver.  Luckily my dongle was just found and installed with no issues at all.  (Don't you just love Windows 7?)

Once you have your IR receiver installed, lets grab the latest revision of EG and install it.  I chose:

EventGhost 0.3.7.r1436, 11.8 MB, Feb 11 2010

In the default install it created shortcut on my desktop, right click and choose properties, under the Compatibility Tab, be sure that “Run this program as an administrator” is Checked.

For me, in order to get XBMC working fine (it took much tinkering to get this right) I needed to first download the latest XBMC Plug-in for EG, here [direct link].

Replace the contents of “C:\Program Files\EventGhost\XBMC\” with the contents in that ZIP Package.

Launch EventGhost. 

The easiest way for you to get started is to download my XML Configuration file, loaded it should resemble something like:

image

XML Configuration:

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Name="Configuration Tree" Expanded="True" Version="1436" Guid="{64AFA530-ED43-42A4-AE5F-0BE6C6CF869E}" Time="1267587884.05">
<Autostart Name="Autostart" Expanded="True">
<Plugin File="Task" Identifier="Task">
gAIpLg==
</Plugin>
<Plugin File="MceRemote" Identifier="MceRemote">
gAJHP8MzMzMzMzOIhnEALg==
</Plugin>
<Action>
EventGhost.EnableItem(XmlIdLink(9))
</Action>
<Action>
System.Execute(u'C:\\Program Files\\XBMC\\XBMC.exe', u'', 2, False, 3, u'C:\\Program Files\\XBMC\\')
</Action>
<Action>
EventGhost.Wait(5.0)
</Action>
<Plugin File="XBMC" Identifier="XBMC">
gAIpLg==
</Plugin>
</Autostart>
<Folder Name="Keyboard Emulation" id="9" Expanded="True">
<Macro Name="Up">
<Event Name="Up" />
<Action>
Window.SendKeys(u'{Up}')
</Action>
<Action>
EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)
</Action>
</Macro>
<Macro Name="Down">
<Event Name="Down" />
<Action>
Window.SendKeys(u'{Down}')
</Action>
<Action>
EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)
</Action>
</Macro>
<Macro Name="Right">
<Event Name="Right" />
<Action>
Window.SendKeys(u'{Right}')
</Action>
<Action>
EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)
</Action>
</Macro>
<Macro Name="Left">
<Event Name="Left" />
<Action>
Window.SendKeys(u'{Left}')
</Action>
<Action>
EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)
</Action>
</Macro>
<Macro Name="Ok -&gt; Enter Key">
<Event Name="Ok" />
<Action>
Window.SendKeys(u'{Enter}')
</Action>
</Macro>
<Macro Name="Delete -&gt; Escape Key">
<Event Name="Delete" />
<Action>
Window.SendKeys(u'{Esc}')
</Action>
</Macro>
<Macro Name="Power -&gt; Alt+F4">
<Event Name="Power" />
<Action>
Window.SendKeys(u'{Alt+F4}')
</Action>
</Macro>
<Macro Name="Forward -&gt; Tabulator" Enabled="False">
<Event Name="Forward" />
<Action>
Window.SendKeys(u'{Tab}')
</Action>
</Macro>
<Macro Name="Rewind -&gt; Shift+Tabulator" Enabled="False">
<Event Name="Rewind" />
<Action>
Window.SendKeys(u'{Shift+Tab}')
</Action>
</Macro>
<Macro Name="ChannelUp -&gt; Plus" Enabled="False">
<Event Name="ChannelUp" />
<Action>
Window.SendKeys(u'+')
</Action>
</Macro>
<Macro Name="ChannelDown -&gt; Minus" Enabled="False">
<Event Name="ChannelDown" />
<Action>
Window.SendKeys(u'-')
</Action>
</Macro>
<Macro Name="Rename -&gt; Start Menu">
<Event Name="Rename" />
<Action>
Window.SendKeys(u'{Win}')
</Action>
</Macro>
<Macro Name="Play -&gt; Space" Enabled="False">
<Event Name="Play" />
<Action>
Window.SendKeys(u'{Space}')
</Action>
</Macro>
</Folder>
<Folder Name="XBMC" Expanded="True">
<Macro Name="Up">
<Action>
XBMC.Up()
</Action>
</Macro>
<Macro Name="Down">
<Action>
XBMC.Down()
</Action>
</Macro>
<Macro Name="Left">
<Action>
XBMC.Left()
</Action>
</Macro>
<Macro Name="Right">
<Action>
XBMC.Right()
</Action>
</Macro>
<Macro Name="Page Up">
<Event Name="MceRemote.ChannelUp" />
<Action>
XBMC.PageUp()
</Action>
</Macro>
<Macro Name="Page Down">
<Event Name="MceRemote.ChannelDown" />
<Action>
XBMC.Page Down()
</Action>
</Macro>
<Macro Name="Select">
<Action>
XBMC.Select()
</Action>
</Macro>
<Macro Name="Back">
<Event Name="MceRemote.Back" />
<Action>
XBMC.Back()
</Action>
</Macro>
<Macro Name="Play" Expanded="True">
<Event Name="MceRemote.Play" />
<Action>
XBMC.Play()
</Action>
</Macro>
<Macro Name="Pause" Expanded="True">
<Event Name="MceRemote.Pause" />
<Action>
XBMC.Pause()
</Action>
</Macro>
<Macro Name="Stop" Expanded="True">
<Event Name="MceRemote.Stop" />
<Action>
XBMC.Stop()
</Action>
</Macro>
<Macro Name="Fast Forward" Expanded="True">
<Event Name="MceRemote.Forward" />
<Action>
XBMC.FastForward()
</Action>
</Macro>
<Macro Name="Rewind" Expanded="True">
<Event Name="MceRemote.Rewind" />
<Action>
XBMC.Rewind()
</Action>
</Macro>
<Macro Name="Skip Next" Expanded="True">
<Event Name="MceRemote.Skip" />
<Action>
XBMC.SkipNext()
</Action>
</Macro>
<Macro Name="Skip Previous" Expanded="True">
<Event Name="MceRemote.Replay" />
<Action>
XBMC.SkipPrevious()
</Action>
</Macro>
<Macro Name="Record">
<Action>
XBMC.Record()
</Action>
</Macro>
<Macro Name="Volume Up" Expanded="True">
<Action>
XBMC.VolumeUp()
</Action>
</Macro>
<Macro Name="Volume Down" Expanded="True">
<Action>
XBMC.VolumeDown()
</Action>
</Macro>
<Macro Name="Mute">
<Action>
XBMC.Mute()
</Action>
</Macro>
<Macro Name="Zero">
<Action>
XBMC.Zero()
</Action>
</Macro>
<Macro Name="One">
<Action>
XBMC.One()
</Action>
</Macro>
<Macro Name="Two">
<Action>
XBMC.Two()
</Action>
</Macro>
<Macro Name="Three">
<Action>
XBMC.Three()
</Action>
</Macro>
<Macro Name="Four">
<Action>
XBMC.Four()
</Action>
</Macro>
<Macro Name="Five">
<Action>
XBMC.Five()
</Action>
</Macro>
<Macro Name="Six">
<Action>
XBMC.Six()
</Action>
</Macro>
<Macro Name="Seven">
<Action>
XBMC.Seven()
</Action>
</Macro>
<Macro Name="Eight">
<Action>
XBMC.Eight()
</Action>
</Macro>
<Macro Name="Nine">
<Action>
XBMC.Nine()
</Action>
</Macro>
<Macro Name="Star">
<Action>
XBMC.Star()
</Action>
</Macro>
<Macro Name="Hash">
<Action>
XBMC.Hash()
</Action>
</Macro>
<Macro Name="Menu" Expanded="True">
<Event Name="MceRemote.DVDMenu" />
<Action>
XBMC.Menu()
</Action>
</Macro>
<Macro Name="Display" Expanded="True">
<Event Name="MceRemote.Guide" />
<Action>
XBMC.Display()
</Action>
</Macro>
<Macro Name="Start">
<Action>
XBMC.Start()
</Action>
</Macro>
<Macro Name="Title" Expanded="True">
<Event Name="MceRemote.Details" />
<Action>
XBMC.Title()
</Action>
</Macro>
<Macro Name="Info" Expanded="True">
<Event Name="MceRemote.Details" />
<Action>
XBMC.Info()
</Action>
</Macro>
<Macro Name="Clear">
<Action>
XBMC.Clear()
</Action>
</Macro>
<Macro Name="Power" Expanded="True">
<Action>
XBMC.Power()
</Action>
</Macro>
<Macro Name="Big Skip Backward">
<Action>
XBMC.BigSkipBackward()
</Action>
</Macro>
<Macro Name="Big Skip Forward">
<Action>
XBMC.BigSkipForward()
</Action>
</Macro>
<Macro Name="Small Skip Backward">
<Action>
XBMC.SmallSkipBackward()
</Action>
</Macro>
<Macro Name="Small Skip Forward">
<Action>
XBMC.SmallSkipForward()
</Action>
</Macro>
<Macro Name="Party Mode">
<Action>
XBMC.PartyMode()
</Action>
</Macro>
<Macro Name="Random">
<Action>
XBMC.Random()
</Action>
</Macro>
<Macro Name="Repeat">
<Action>
XBMC.Repeat()
</Action>
</Macro>
<Macro Name="Take Screen Shot">
<Action>
XBMC.TakeScreenShot()
</Action>
</Macro>
<Macro Name="Last FM Love">
<Action>
XBMC.LastFMLove()
</Action>
</Macro>
<Macro Name="Last FM Ban">
<Action>
XBMC.LastFMBan()
</Action>
</Macro>
<Macro Name="Eject Tray">
<Action>
XBMC.EjectTray()
</Action>
</Macro>
<Macro Name="Play DVD">
<Action>
XBMC.PlayDVD()
</Action>
</Macro>
<Macro Name="Update Video Library" Expanded="True">
<Event Name="MceRemote.Record" />
<Action>
XBMC.UpdateVideoLibrary()
</Action>
</Macro>
<Macro Name="Update Music Library">
<Action>
XBMC.UpdateMusicLibrary()
</Action>
</Macro>
<Macro Name="Show Home Screen" Expanded="True">
<Event Name="MceRemote.Start" />
<Action>
XBMC.Home()
</Action>
</Macro>
<Macro Name="Show Videos Screen" Expanded="True">
<Event Name="MceRemote.Videos" />
<Action>
XBMC.MyVideos()
</Action>
</Macro>
<Macro Name="Show Music Screen" Expanded="True">
<Event Name="MceRemote.Music" />
<Action>
XBMC.MyMusic()
</Action>
</Macro>
<Macro Name="Show Pictures Screen" Expanded="True">
<Event Name="MceRemote.Pictures" />
<Action>
XBMC.MyPictures()
</Action>
</Macro>
<Macro Name="Show Weather Screen">
<Action>
XBMC.Weather()
</Action>
</Macro>
<Macro Name="Show Settings Screen">
<Action>
XBMC.Settings()
</Action>
</Macro>
<Macro Name="Show Favorites Screen">
<Action>
XBMC.Favorites()
</Action>
</Macro>
<Macro Name="Show System Info Screen">
<Action>
XBMC.SystemInfo()
</Action>
</Macro>
<Macro Name="Show Shutdown Menu" Expanded="True">
<Action>
XBMC.ShutdownMenu()
</Action>
</Macro>
<Macro Name="Reset Computer">
<Action>
XBMC.Reset()
</Action>
</Macro>
</Folder>
</EventGhost>

Please Note: I tried numerous times to get the seemingly superior XBMCRepeat plugin to work with very little luck.  If you find a tutorial out there which nails it down, please let me know!

Take time now to tweak the EventGhost setup for your specific Remote and needs.  I personally had to disable a few of the Keyboard commands and remap a bunch of the XBMC Macros to the MCE Remote events.  Its a pretty trivial process. 

Navigate to the macro (for example under XBMC, Back), and then hit the button on the remote you want mapped to that command.  It should pop up on the left (Log) area.  Click and drag that under the XBMC/Back node.  That essentially will wire up that event to that action.  Its really as easy as that.

In order to test this out, right click the “Autostart” node, and choose “Execute”.  That should launch XBMC, and then connect EventGhost with it, enabling your remote.

Getting XBMC and EG to Launch on Startup

In EG, to go to File, Options, and ensure that “Autostart EventGhost on system startup” is Checked.

Please Note: I added an Action to the “Autostart” node, the first of which is “Start Program” and point it to the XBMC.exe (in the Program Files folder).  I also added a “Wait 5.0 sec” node as well.  This will ensure that XBMC is fully launched so that when EventGhost initiates its connection XBMC is ready and waiting for it.

[backup]

[reboot]

[9:30PM]

image

 

Final assembly and testing

Lets take the few minutes to assemble the HTPC back to once piece and since I used an old school LCD (analog) monitor I need to actually jack into my living room television, and give the full 1080p video experience a try. 

[10:00PM]

Optional : WHS Setup

This step is optional, and only recommended for those with a WHS rig in their home.  In order to connect your XBMC/Win7 machine to the WHS machine you need to install the “Home Server Connector Software”.  This should be available on your install media, or on the WHS itself, via a network share: \\WHS_IP_ADDRESS\software\Home Server Connector Software\.  [Download the ISO from Microsoft]

Optional : AntiVirus

Given that I will be doing very little with this set top machine, and not that subject to viral infection I plan on simply turning off all AV notifications.  If that causes an issue in the future I will probably install AVG Free.

More to come…

In future posts I plan on investigating integration other input and output devices such as…

  1. Bluetooth
    1. Be aware of who is in the room, could tweak the experience based on the audience?
  2. RFID (Phidgets)
    1. Launch pre-defined scripts/automation based on tags it reads.  Setup my profile, or login to the machine?
    2. I could lock the machine until the RFID tag is found, a physical lock
  3. LCD (Phidgets).
    1. Output microbits of data like a twitter feed, now playing information, weather data, etc..
  4. Skype Integration
    1. To be able to notify on screen or via an X10 controlled light whenever an incoming call is happening
    2. Be able to use my remote control to answer, dial, redial a contact
    3. Full screen video chatting in the living room
  5. Live Web Camera Feeds
    1. Natively in XBMC I cannot view my MJPG based Wifi Cameras that I have installed around the house.  I should be able to find a free monitoring solution based on Windows (via WHS) to handle this task with greater ease.
  6. Hot Keys for Application Switching
    1. I want to setup my remote to quickly and easily switch back and forth between XBMC, and other essential HTPC applications.  EventGhost will handle this quite well.

 

2 Comments

  • Nice :-)

    I am trying similiar thing (htpc). Thanks for the tip with EverGhost :-)

  • This is exactly what I was looking for, excellent tutorial!! I'm doing this on the weekend...just one question...do you use an external player on xbmc?? and if you do, have you been able to use the remote on xbmc and on the external player without problems with EG??

Comments have been disabled for this content.