Over the past 20 years, I always had a Windows (or DOS!) PC as the main system I use at home. The primary purpose was for gaming, although building my own systems is also a hobby. In 2007, I wanted to build a new system to use as a home theater PC. Originally, I built it with Windows Vista – Windows Media Center was Vista’s killer app! I painstakingly installed software, tweaked system settings and tuned the registry. Then Windows 7 came along with further improvements. After almost 20 years of reinstalling from scratch for new versions of Windows, I treated this upgrade as no different.
Unfortunately, I didn’t capture all the system tweaks and settings. I didn’t get all the software reinstalled. I did what I remembered, and W7 did have some improvements that made extra software and tweaks unnecessary. The thing I was lacking in the rebuild, and up until recently, was configuration management for Windows.
Recently, my employer Opscode announced broader Windows support for Chef. The awesome Chef community, and our development team have added some key features to Chef in the form of core libraries and cookbooks. While I did get Chef running on my HTPC a few months ago, I had only used it to test out the powershell cookbook, and also wrote a silverlight cookbook as a proof of concept. In the mean time, the windows cookbook cookbook received some serious leveling up thanks to Seth Chisamore.
The Windows cookbook has a number of excellent “primitives” in the
form of libraries and resources. You can read all about that on
The Chef Wiki. For
now, I’ll talk about how I captured some of the configuration so I
don’t have to remember next time (Windows 8, coming soon…). Of
interest here are the
My HTPC’s cookbooks
I wrote two cookbooks this weekend. First, is a general “Windows Media
Center” cookbook called, aptly, “
wmc”. This will capture the
specific registry and other configuration related to Windows Media
Center itself. The idea with this one is it manages only Windows Media
Center. It’s not ready for release, but I’ll post some snippets
of code here as I go.
The second cookbook I created is specifically for the Home Theater PC
htpc. This is going to contain all my preferences and
biases of how I want my HTPC to look like in order to provide
entertainment in my house.
Windows Media Center (wmc)
First and foremost, I want to make sure that Windows Media Center is
running at boot time, and the
windows_auto_run resource fits the
bill. This resource modifies the registry to update the key
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, using the
windows_registry resource. It does operate at the machine level,
not just the current user, but I only have one user on my HTPC, so
it’s okay. Here’s the resource:
1 2 3 4 5
Next, I want to tweak a few other registry settings. Some of these I
discovered through an
MSDN blog post,
others are from setting up WMC itself and observing the “HKCU”
registry. Not the most sophisticated way, but I don’t see a great
“diff” tool for the registry. Because the name of the HKCU and HKLM keys for WMC are
long, I set them to a couple local variables, via
Then in the recipe, I simply assign local variables.
Now, for the registry changes. I use a 30 second skip forward and back with my remote during recorded TV shows, so I can avoid commercials.
1 2 3 4 5 6
I also optimize the display for LCD/Plasma (I have a RP DLP, but I digress).
1 2 3
For now, that’s all the
wmc cookbook has going for it. I do have
plans to enable additional features of WMC, install useful plugins,
and improve playback quality and performance. Mainly, I need to find
my old notes :–).
Home Theater PC (htpc)
htpc cookbook will contain additional tweaks and settings for
how I want my HTPC configured. I don’t know if I’ll release it
publicly, as it is pretty specific to me, but it might be useful as
examples for others, so stay tuned to my
GitHub account for updates.
First up are some local performance tweaks. These are done to Explorer(.exe), and I don’t remember the source.
1 2 3 4 5 6 7
Second, since this system is where all my music files live, I have
iTunes installed for
Home Sharing. It doesn’t do much
good if iTunes isn’t running, however, so I use
start it up.
1 2 3 4 5
It’s pretty simple so far, but I have some plans in store for my HTPC cookbook.
HTPC Cookbook Plans
I do plan to add some new features to the
htpc cookbook. First, I
want to make sure all the software I need is installed. While the
system mainly sits in WMC (with iTunes in the background), I do have
some additional software and utilities that I like to have for
managing my media library.
- iTunes – I already have the software installed, but it would be nice to not have to do that during system setup (Windows 8, I say…).
- Google Chrome – there’s no abc.com, nbc.com, etc plugins for WMC (yet?), so I need a browser to go to the respective web sites to catch up on older episodes.
- CDBurnerXP – decent CD/DVD burning software, rarely used but useful for backups.
- Logitech Harmony Remote Software – I have a Harmony 700 universal remote (and it’s awesome!). This one might be tricky, but really I just want to make sure the software is installed. Configuration profiles are stored in an online support account with Logitech as far as I’m aware.
- Netflix plugin for WMC – This will probably go into the
- Additional performance tweaks – There are a whole slew of tweaks
that I know I made, I just don’t remember them all. These will be
- Manage services – Everyone who has a gaming PC knows about Black Viper’s Windows Service Guide(s).
- Windows Features – With the
windows_featureresource, Chef can manage core features included in Windows installations.
- Logging, monitoring – What kind of system administrator would I be if I didn’t also monitor my system for performance? :–)
Some of the things I want to manage on my HTPC are covered by other cookbooks I have, or exist on the Chef Community Site.
- Steam – This system is still capable of running some games, like StarCraft II, TeamFortress 2 and Left 4 Dead (1 & 2). I have a Steam cookbook that works on OS X, it just isn’t released (yet).
- Teamspeak 3 – I already have a teamspeak3 cookbook, I’ll just need to add installation of the client for Windows there.
- A text editor – Since I have games, and games have configuration files, it makes sense to … wait, I should put those in Chef too! Or at least, in a Version Control System and check out the repository…
- Git – For the above. This will likely be a contribution to Opscode’s git cookbook. Though I’ll still install a text editor of some kind.