Home Office - Revisited

After having my home office featured on Lifehacker this morning, I’ve gotten a lot of great feedback about my set-up. I’ve been following the comments left on LH as well as Flickr and my own blog and wanted to post a quick entry to address some of the common questions:

  • In the city of San Diego you need a building permit for any structure that exceeds 120 square feet in area.  Not surprisingly, one of the best-selling sheds is the 8×15 foot model (that’s exactly 120 square feet).
  • The shed itself cost about $3800.  Included in that cost were 3 windows, a steel door and delivery/installation.  I spent another $2000 to have the shed insulated, dry-walled, painted and carpeted.  I was able to get a remnant piece of carpet that fit perfectly so I saved a lot of money there. 
  • With two powerful computers running in here 24/7 I really don’t have to worry about heating the office in the winter (this is San Diego after all).  However, it can get pretty warm in the summer.  I installed a through-the-wall air conditioner and it does a great job.  It doesn’t take much A/C to keep 120 square feet cool.  If I’d planned ahead better I could have instructed the shed company to cut-in the necessary hole for me ahead of time.  Since the idea for the A/C didn’t occur to me until after the shed had been installed, I ended-up cutting the hole myself prior to the dry-wall work.  I could have gone with a window A/C unit, but I didn’t want to give up any of my windows.
  • One area where I was able to save a lot of money was by doing all of the wiring myself.  After the shed was installed, I went in and ran all the necessary cables for AC power, telephone, cable TV and ethernet.  I made sure that there was power near the air conditioner and in the ceiling for my track lighting.  I think that I ended-up with two separate AC circuits — one just for the air conditioner and one for everything else.  Everything connects back to the house via a conduit that is running through the back yard (this part involved a long, 18 inch deep trench connecting the house to the office).
  • For the telephone, cable and ethernet I ran one line for each from the house and terminated them in a small media panel (see below) that I installed in the wall.  From there, I ran cables to all of the points in the office where I thought I might want to plug stuff in.
  • I knew I was going to install some sort of speaker system in the office, so I also ran speaker wire in the walls to the four corners of the office and terminated them with a nice banana-plug style wall plate in the corner of the office.

Update: One topic that I forgot to address was ’security’ — I’ve gotten a couple questions about this already.  Given that I’ve got a fair amount of computer equipment in the shed, security was something that I thought a lot about.  I suppose it wouldn’t be wise of me to go into too much detail, but I will say that our house already has a pretty nice alarm system so at the same time I was running the wire for the ethernet and telephone I ran the necessary wire to hook the shed up to the alarm system in the house.  Beyond that, I just did simple things like selecting the steel door option for the shed and installing a motion-sensing flood light above the door. I also installed a keypad-based deadbolt so I don’t have to carry any keys around (or worry about losing them).

BE365_CAM_716_HO

Written by Brian on June 27, 2008 12:06 pm | Permalink | Read Comments (11)
Filed under tech.

Backing It Up - Email

This is the second article in my series about backing up your system using web-based services. In my previous article, I discussed the use of Flickr as a photo archival/sharing service — this time my focus is going to be on email.

If you’re using a desktop email client like Outlook or Thunderbird you’ve likely got some pretty large email archives sitting on your hard drive somewhere. For the most part, your email archives are just like any other file on your system that you might want to back up — and the same tools/services you would use to do offsite backup of your other files would be equally applicable to your email archives. However, there are some backup strategies which are unique to email that you may want to consider — and that’s precisely what want to discuss here (Note, that I still have a post on general-purpose, off-site backup solutions in the works, but I want to get through some of these application-specific solutions first).

Web-based Email

For most people, I suspect that email back-up is a non-issue. Those of you out there who rely on web-based services like Gmail, HotMail or Yahoo! Mail as your primary e-mail interface certainly don’t need to worry about offsite-backup since your mail is never “onsite” to begin with. Of course, if you’re concerned about a catastrophic event at Google/Microsoft/Yahoo you may want to create a local back-up of your mail, but we’ll save that topic for another post.

So, if most people’s e-mail lives in the cloud to begin with, why are we even talking about email backup? Well, I suspect that there are still a fair number of people (such as myself) that are pretty attached to their desktop mail clients. I’ve been using Microsoft Outlook for my Exchange-based email at work for years now and have grown so accustomed to it that it is my preferred client for my personal email as well. Similarly, my wife prefers to use a desktop mail client over the web-based services and is using Thunderbird on her Mac.

IMAP

GMail IMAP So, if you’re using a desktop email client, there’s a good chance that you’re using the POP protocol to download your mail — this is the standard for retrieving email and will be supported by any service that allows remote retrieval. However, there is another, less common protocol called IMAP that is supported by some services.

If it’s offered by your email provider, you should give IMAP a try. With POP, the client typically downloads messages from the server to the local machine and then deletes the copy that is on the server (the POP protocol is pretty dumb, so if it didn’t delete the messages on the server it would end-up re-downloading them the next time that it went to check for messages). With IMAP, you can use your local mail client to browse/read/organize your messages but everything stays on the server. This gives you the best of both worlds: off-site storage but with access via your favorite desktop client.

Because IMAP leaves all your messages on the server, you have the ability to use desktop clients on multiple machines as well as your email provider’s web-based interface and still have access to all of your messages. This is a huge benefit for people that may need to have access to their email from more than one machine.

I should point out that, of the three big email providers, only Gmail offers IMAP access (the screenshot above shows where you go to enable IMAP support in the Gmail settings). In fact, Gmail is the only one of the three that offers POP access for free. Both Hotmail and Yahoo! Mail require that you upgrade to a paid account in order to get even POP access and neither offer IMAP at any level of service.

Server-side POP Archives

gmailarchive One of the downsides of IMAP is that performance can sometimes be a bit sluggish — especially for people who are used to downloading their messages via POP and working with them locally. Even if you decide not to use IMAP, Gmail will still allow you use a desktop client while keeping a server-side archive of your messages.

If you are using POP to download messages from your Gmail account there is an option in the settings that will cause Gmail to put a copy of every message that is downloaded in the “All Mail” folder (see screenshot to the left). Messages are still removed from the inbox (so you don’t have the issue of re-downloading the same messages) but you’re still left with a copy on the server.

Much like the IMAP solution, the server-side archive means that you can log into your Gmail account from any computer and still browse your messages — even after they’ve been downloaded by your mail client and removed from the inbox.

Obviously, any management of your email that you do with your desktop client (deleting messages, organizing messages into folders, etc) won’t be reflected back in the Gmail archives using this method. However, if you’re just looking for a simple way to ensure you’ve got an offsite archive of all your messages, this will do the trick.

Gmail: The Universal Inbox

It should be obvious by now that I’m a big fan of Gmail. As far as I’m concerned, the fact that they offer both POP and IMAP access with their free accounts puts them way ahead of any of the other email providers out there. Gmail also offers 6.5 gigabytes of free storage which is probably enough to hold a lifetime’s worth of email for most people (I’ve got 3 years worth of email in my Gmail account and am currently using 4% of my available space).

Even if you aren’t currently using Gmail as your email provider, Google makes it pretty easy to use Gmail as your universal inbox. In the Accounts tab of the settings you’ll find a “Get mail from other accounts” option which will allow Gmail to import messages from up to five additional email accounts (assuming they allow POP access). If your provider doesn’t support message retrieval via POP, you may be able to automatically forward messages to your Gmail account (See Using Gmail as your Universal Email Account [Google Tutor] for additional help).

Using this method you can maintain your existing email address while still taking advantage of Gmail features like IMAP or POP archiving.

For those of you that have your own domain name, you can still use Google to host your email even if your website is hosted elsewhere. By signing-up for a free Google Apps account and adding a few entries to your DNS record Google will manage your domain’s email while providing all of the features of a standard Gmail account. The screen shot below shows the MX records I added to the DNS entry for dehamer.com which allows my email to be handled by Google (if you sign up for a Google Apps account you’ll find that they have specific DNS configuration instructions for most of the major service providers).

DNS MX Records

I’ve used this approach to set-up dehamer.com email accounts for a number of family members. Some of them rely solely on the web-based, Gmail-like interface while others are using desktop clients.

In some ways, I guess this post is a bit of a love letter to Gmail, but I really do believe that it is the best service for managing your email. I wouldn’t consider any of the techniques listed above to be “back-up solutions” in the traditional sense, but if you’re simply looking for a brain-dead way to ensure that you never lose any of your email, Gmail has a lot to offer.

Written by Brian on April 26, 2008 9:29 pm | Permalink | Read Comments (0)
Filed under tech.

Site-Specific Browsers

If you look at the continuum of software application platforms you’ll find that there is a lot of interesting stuff happening at the moment between the extremes of pure web applications and pure desktop applications. You have things like AJAX, Flash and Silverlight which are trying to bring more of the desktop app experience to the browser and then you have things like Adobe AIR that are bringing some of the web-based development models to the desktop. Somewhere in between there is this concept called the site-specific browser (SSB).

The idea behind the site-specific browser is that you have a standalone application that is dedicated to running a single web application. You can think of it as freeing your favorite web application from the browser and allowing it to run directly alongside your other desktop applications. Site-specific browsers will typically provide a very minimal UI (none of the usual browser menus, navigation buttons or tabs that you’re used to) and some basic desktop integration through things like shortcuts, presence in the taskbar/dock and custom application icons.

I’ll admit that, when I was first introduced to the concept of the site-specific browser, I didn’t really get it. Isn’t this just a new browser window with all the chrome turned-off? For the most part, the answer is probably ‘yes’ — however, I came across a demo of a very cool site-specific browser this week that caused me to spend some more time looking into the idea.

If you haven’t seen it already, take a look at this demonstration of the Fluid SSB working with Muxtape (I also encourage you to spend some time playing with Muxtape — I’ve spent a lot of time browsing the seemingly endless supply of playlists and have discovered a lot of new music in the process). The example shown in this demo is particularly compelling because it shows how to add a feature to the web application that would be incredibly difficult to do in a traditional browser.

Fluid looks like it has some really cool features but it is Mac-only and I spend most of my day sitting in front of a Windows machine. I started to look around for a site-specific browser for Windows that I could play with and came across the Prism project out of the Mozilla Labs (you can find the latest Prism build on the Prism wiki page).

If you’re anything like me, you have a tab in your browser that is dedicated completely to Google Reader. Whenever I have some downtime in my work day or am transitioning between tasks I often flip over to my Google Reader tab to see how far behind I am on my news feeds (only 188 unread items at the moment). For me, there are three applications that I always have open during the work day: 1. Outlook, 2. Pidgin, and 3. Google Reader (running in Firefox).

With Prism, I can take Google Reader out of Firefox and make it a first-class citizen on my desktop alongside Outlook and Pidgin. The following screenshot shows what Google Reader looks like running inside of Prism.

Google Reader in Prism

The benefits of running Google Reader in this way are arguably small but, for me, still useful:

  • Eliminates all the unnecessary browser chrome. The browser’s address bar and navigation buttons really serve no purpose for Google Reader.
  • Simplifies task switching. When running Firefox, the taskbar always shows the Firefox icon and the title of whichever tab has the focus at the moment (which may or may not be Google Reader). Running Google Reader in a site-specific browser means that it will be easily locatable in the alt+tab task list and the taskbar.
    taskbar
  • Prevents accidental tab closure. When I’m in Firefox it seems that I’m constantly spawning and closing tabs and often find that I close things I didn’t intend to close. Splitting Google Reader out of the browser means that I won’t accidentally close it in the course of my browser tab management. This isn’t a huge deal for Google Reader, but if you’re using something like Muxtape where closing the tab will cause your playlist to abruptly end, it can be extremely annoying.

If you really want to customize your SSB, Prism allows you to attach a custom style sheet and javascript file to each application.  The ability to specify a local style sheet means that you can override any of the CSS used in the application and re-skin it however you see fit. Anything you can’t accomplish via CSS can certainly be handled with a little custom javascript. Attaching a local javascript file gives you a GreaseMonkey-like ability to completely manipulate the DOM of the web application.

To install your your local style sheet and javascript files you simply need to create files named webapp.css and webapp.js and copy them to the directory that Prism creates for each web application.  On Vista, this directory will be something like C:\User\<username>\AppData\Roaming\WebApps\<appname> (XP users will find their web application directory at C:\Documents and Settings\<username>\Application Data\WebApps\<appname>)

Having used Google Reader and GMail within Prism for a few days now, I’m definitely sold on the SSB concept and look forward to seeing what the Mozilla team does with it. If you’re a heavy user of the web-based applications like GMail, Google Reader, Twitter or Facebook you might want to give it a try and see if it works for you.

Written by Brian on April 18, 2008 1:35 pm | Permalink | Read Comments (3)
Filed under tech.

Mind Your Bit’ness - Codecs and Windows Vista x64

Over the weekend, I sat down to copy some videos off of my Flip Ultra camcorder and do a little video editing (if you’re not familiar with the Flip see my review over on The Full Catastrophe). Previously, I’d only used the Flip with our Mac Mini, but that machine is a bit underpowered for video editing so I decided to use my “game machine” which runs the 64-bit version of Windows Vista Ultimate Edition.

When you plug the Flip into a system for the first time it automatically installs a codec package which allows you to decode the video format used by the camera. The installation process completed successfully and I copied a number of video files from the Flip to my local drive. In order to verify that the codec was working properly, I opened one of the videos in Windows Media Player and found that it played without issue. Everything was looking pretty good.

Since I wasn’t trying to do anything particularly fancy, I decided that I’d just use Window Movie Maker software that ships as part of Vista. It’s not the best editing package out there, but is totally suitable when you need to do some basic trim/re-arrange work. So I imported my videos into Movie Maker . . . only to find that it couldn’t decode the videos (I was getting audio, but no video). To the best of knowledge, both Media Player and Movie Maker use the same set of DirectShow filters for audio/video decoding so it made no sense to me that Media Player was able to play the video while Movie Maker was not.

It wasn’t until after I’d tried un-installing/re-installing the codec and rebooting a couple of times that I thought to look at the Task Manager.

Task Manager

Looking at the entries for Media Player and Movie Maker in the Task Manager made it pretty obvious what was happening. Note the *32 that appears as part of the image name for Media Player in the task list. This indicates that Media Player is a 32-bit application that is being run on top of the operating system’s 32-bit emulation layer. In contrast, Movie Maker is a true 64-bit application.

I haven’t dug into this yet, but it wouldn’t surprise me at all to learn to that the Flip codec package is 32-bit only. This would explain why the 32-bit Media Player was able to decode the videos while the 64-bit Movie Maker was not.

I was a bit leery when I first installed 64-bit Vista — I was sure that I was going to run into all sorts of compatibility problems. However, I have to say that it has been working pretty smoothly for me for the past year. Every once in awhile though a subtle issue like this one will sneak up on me and leave me scratching my head for awhile. It’s because of things like this that I typically counsel friends/family against installing Vista x64 unless they really know what they’re doing. For someone that doesn’t know where to look, an issue like this can drive you mad.

In the end, I simply moved my videos over to another 32-bit machine that I have and did my editing there. In the long term I guess I need to figure out what codec the Flip is using and find a 64-bit version of it.

Written by Brian on April 14, 2008 10:31 am | Permalink | Read Comments (0)
Filed under tech.

Backing It Up - Digital Photos

When wildfires raged through San Diego county last fall, my wife and I found ourselves pondering the question of what to take with us if we were forced to evacuate our home. Luckily, we weren’t ever in any danger but it did force us to consider what things were important to take with us in the event that we did have to leave. Beyond the obvious family heirlooms and important documents, I found myself wondering how to best save the various artifacts of my digital life.

In the past year, I’ve been trying to put together a good backup strategy for the various computers in our household. Through the use of mirrored disks, external hard drives and DVD back-ups, I’m reasonably confident that I won’t be losing any data to system or disk failures. However, I realized that recovering from a failed hard disk and recovering from a burnt-down house are not exactly the same thing. If I have to leave my house with 5 minutes notice, do I want to be running around collecting hard drives and DVDs? Probably not — we’d be lucky to get our kids and dog loaded in the car in that amount of time.

Recognizing a pretty serious deficiency in our backup strategy, I spent some time investigating the various web-based backup options available. This sort of thing probably wouldn’t have been affordable to the average home user a few years back, but these days most people have pretty big internet pipes running to their house (I’m jealous of you Verizon FIOS users out there with your 5+ Mbps upload speeds) and the big web companies seem to have more storage space available than they know what to do with. With bandwidth to spare and the low cost of hosted storage there’s little reason not to be doing some sort of offsite backup.

This will be the first in a series of posts where I discuss the various back-up options that I’ve explored. I can’t promise that I’ve conducted an exhaustive investigation of all the services out there, but I have found a number of solutions that I’m very happy with.

Later in this series I’ll discuss some of the general-purpose backup solutions available, but first I want to cover some online applications that address very specific backup needs.

Photos

Baby Laurel There is nothing on my computer that would be more devastating to lose than my photo collection. With two young kids in the house we take a lot of pictures, so my photo collection probably consumes more space than anything else on my system. With the ability to view photos on my computer, phone, iPod and game console there is almost no reason for me to print photos anymore (sorry HP, I’m probably not running through that ink and photo paper quite as fast as you might like). This means that the digital versions of my pictures are often the only versions.

So when it comes to my back-up strategy, the top priority is always to make sure that my photos are secure. For the most part, photos can be treated just like any other file that you want to back up. However, in addition to storing my photos, I’d also like to be able to share them with friends/family. All of the general-purpose backup services that I’ll discuss later will allow you to upload your photos, but they’re not stored in a way that you (or anyone else) can browse online.

I’ve played with a lot of the photo sharing services out there but ultimately settled on Flickr as the one that I’m using. You can set-up an account for free on Flickr, though it does come with some limitations (100MB of photo uploads per month). That might work well for some people, but I upgraded to the Pro account ($24.95 per year) which gives me unlimited uploads and unlimited storage space.

I’ve gotten into the habit of simply uploading all my photos to Flickr (at least the ones that are worth saving) and those become the “master” copies. The grandparents know that they can always go to my Flickr page to find the latest pics of the grandkids and I never have to worry about backing-up my pictures. I do still have many of my pics on my local hard drive, but I’m not going to sweat-it if that disk ever crashes.

It seems that every major photo editor has an “Upload to Flickr” option now so the process of getting your pics uploaded could hardly be an easier. I’m using the Flickr Uploadr on both Windows and Mac and it makes it pretty simple to quickly organize, title, tag and upload images.

One of the great things about Flickr is that they don’t dumb-down your pics at all. If you have a nice camera that’s generating multi-megabyte JPGs, Flickr will happily store your huge photo files and let you retrieve the full-res images with all the associated metadata intact at any time (Note to the serious photographers out there, Flickr obviously isn’t an option for archiving RAW files — stay tuned for my post on general-purpose backup solutions).

I’ve looked at other photo services like Shutterfly and Snapfish (apologies again to my employer) but they come up short on one key feature: once you upload your pictures, you can never get at the original file again. They may have the original, full-resolution image stored somewhere, but you don’t have access to it. This is unacceptable if you’re thinking of using these services for archival purposes. Of course, the whole idea behind sites like Shutterlfy and Snapfish is to get people to print their photos so it isn’t surprising that they don’t meet my needs when it comes to backing-up and sharing pictures. However, I know plenty of people that try and use these services for this purpose and it drives me crazy.

I should point out that Google’s Picasa Web Albums offers many of the same benefits as Flickr, but it’s more expensive for comparable amounts of storage and I find the interface to be a lot clunkier than Flickr. Compare them for yourself though — I know plenty of people that prefer Picasa.

Whichever solution you settle on, make sure you back up those pictures!

Written by Brian on April 10, 2008 1:42 pm | Permalink | Read Comments (1)
Filed under tech.

Working At Home - The Office

One of the more important decisions related to working-at-home is deciding where to set-up your office. Beyond the obvious issues of avoiding interruption and distraction, where you set-up shop can have a big impact on your work-life balance as well.

When I first started working at home in 2002 I used one of our spare bedrooms as my office. At that point, my wife worked full-time and we had no kids so I really had the house to myself during the day. In that empty-house environment, there really wasn’t much to distract me from my work during the day so the issue of location didn’t seem all that important. However, after some time it became apparent that having such easy access to my office made it a little too easy to work.

Beyond my normal work day, I’d often find myself responding to an instant message, doing a “quick” email check or writing “just a few more” lines of code. When you added-up all of my brief office visits, my 8 hour work day would often become a 10+ hour work day. While this may be great for HP, it’s probably not so great for me.

Work-at-Home Tip: Those BEEPs and DINGs that Outlook and your IM client make to notify you of a new message are fine during the work day, but shut them off when you’re done for the day. There’s nothing worse than hearing the DING of Outlook during dinner and knowing that there’s something in your inbox that requires attention. Maybe it’s just me, but there’s something about the “psychic weight” of unfinished tasks that drives me crazy. Ignorance is bliss in this case.

Being so close to the office for much of the day definitely made it harder to stop working, but I suspect that most people would be able to overcome that with a little bit of discipline. For me, the issue that really got me thinking about my home office location was the birth of our son in 2004. I didn’t have the house to myself anymore — my wife and son were now home most of the day and things were suddenly a lot more distracting. It wasn’t too bad at first (those newborns tend to sleep a lot and don’t make too much noise), however, once Oscar started walking it became apparent that I was going to have to find a new place to work.

I certainly feel lucky that I was present for the first roll/word/crawl/step, but once the little guys are walking, talking and opening doors it can be a bit challenging to talk on the phone or just put your head down and get some work done. I definitely understand that working at home is a privilege and is something that I take pretty seriously. I didn’t want to be that guy whose kids you can always hear in the background during the teleconference — I always felt like that was a little disrespectful to one’s co-workers so I started looking at my options.

I should point out that we live in San Diego in a house that was built in the 1930’s so it’s a little on the ‘cozy’ side. Relocating my office to the back of the house wasn’t really gonna make any difference in a house that was only 1800 square feet to begin with. If I was going to continue working from home, it was looking like I was either going to need to add on to the house or move to the garage (neither of which were particularly attractive).

Office lot As it turns out there was another option that was immediately obvious: build a stand-alone office. Our house isn’t particularly big, but we do have a pretty good sized lot and it just so happens that there was a big chunk of it that we weren’t doing anything with. Behind our garage was a 10′ x 17′ area that one of the previous owners had gated-off and finished with a nice slab of concrete. We were using it to store junk, but it turned out to be the perfect place to put an office!

I toyed around with the idea of extending the garage or having something custom built, but after doing some research I discovered that the most cost effective way to get what I wanted was to purchase a pre-fab building. There are lots of companies that offer these sorts of things but I ended-up buying from a company called Tuff Shed that specializes in installing sheds and garages. A Tuff Shed rep came out to look at my space and give me an overview of their products. One of their most popular products apparently is the 8″ x 15″ Standard Ranch Storage Building (I’m sure it’s no coincidence that the largest structure you can put on your property in San Diego without requiring permits is 8″ by 15″). Luckily, this was the perfect size building for the space I had behind my garage.

Office ExteriorOnce I selected the basic building size and style, I was given the opportunity to select the size, style and placement of the door as well as the number, size, shape, and placement of any windows. I also got to pick the color for the building, trim and shingles. Four weeks after I placed my order, two guys showed-up with a big truck full of materials and they had my new office “installed” about 6 hours later. The four walls came pre-assembled but everything else was put together on site.

Office Interior (Unfinished)So, now I had a place to work but it wasn’t quite ready for me to move in. Since Tuff Sheds are typically used as sheds they aren’t really suitable for occupation (it would probably serve as a fine place to park your lawn mower, but isn’t someplace that I’d want to spend my days). However, after finishing the interior with insulation, drywall, carpet and paint things were starting to look downright homey.

I’ve been in my shed for over a year now and I absolutely love it. I’m just far enough away that I don’t get distracted by the daily adventures of the kids (we’ve got two now) but close enough that I don’t miss anything important. The other nice thing is that it has significantly reduced my temptation to engage in those evening/weekend work sessions. The “commute” through the back yard to the office is just enough of a barrier to keep a nice separation between work and life. If Outlook beeps and no one is around to hear it, did you really get an email?  Guess I won’t know till tomorrow.

Home Office

(You can see more pics of my office here)

Written by Brian on April 8, 2008 8:53 am | Permalink | Read Comments (27)
Filed under telework.

Custom Windows Vista Installation

If there is one thing that I’ve learned after working with Windows for 15 years is that sometimes you just need to reinstall and start over.  Whether due to hardware failure or the general software “gunk” that builds up over time, I seem to find myself re-installing Windows on a fairly regular basis.  As the deadline for my semi-annual Windows re-installation ritual draws near I’m considering a move from Windows XP to Windows Vista.

Flashy features aside, one of the things that interests me most about Vista is the ability to do an image-based installation of the OS.  This is dramatically different than Windows XP where the setup process acts more like an “installer program” that creates directories and copies files.  What you get on the Vista DVD is actually a pre-installed copy of Windows that simply gets decompressed onto your PC.  The difference may not seem important until you consider the fact that you can actually alter the Vista image in any way you want — this means that you could create a custom image that includes your favorite applications and use that as the starting point for all future installations.

For someone like me that seems to do OS installs on a regular basis, this has the potential to make the process a lot less painful.  The worst part of re-installing your system isn’t the OS itself, it’s all the other junk: MS Office, Adobe Reader, WinZip, Firefox, etc.  I would love to have all of those applications available as soon as I boot my freshly installed system the first time — and that’s exactly what I’m going to show you how to do here.

The Goal

The goal for my little demonstration is to create a new Windows Vista image that has all of my must-have applications pre-installed and then apply that image to a new machine.  For now I’m just going to leave my custom Vista image on my hard drive, but in part 2 of this guide, I’ll show how to create a bootable USB flash drive with the image on it.

The Tools

If you’re going to follow along at home, here are the tools that you’re going to need:

  • Microsoft Windows Vista - Feel free to use whichever flavor of Vista suits your needs. These instructions assume that you’ll be working from an ISO image of the Vista installation disc, but you can also use a physical Vista DVD if you have that handy.
  • Windows Automated Installation Kit (WAIK) - This is a set of utilities provided by Microsoft that, among other things, allow you to work with the Vista image files (WIM files) and create your own bootable disks.  You can download the WAIK itself here and the documentation here.
  • Microsoft Virtual PC 2007 - We’re going to need at least two PCs to build our image.  Instead of using two physical machines, it’s much simpler to use VPC and create a virtual machine instead.  By using Virtual PC, we’ll be able to create our Vista image and even do some test installs without impacting any of our actual PCs.  Once we’re confident that everything is set-up the way we want, we’ll be able to apply the image to as many actual PCs as we want.  Virtual PC is a free download and can be found here.

Before proceeding to the next section make sure that you have installed the WAIK and Virtual PC 2007.  Since we’re going to be working with some fairly big files, I’d also suggest that you have at least 10GB of free disk space to play with.

Phase 1 - Create the Image

The first thing we need to do is to create a custom Windows Vista image that contains the applications that we’d like to have as part of our default installation.  Using Virtual PC, we’ll create a new virtual machine, do a regular Vista install, and then install our applications.

  1. Start Virtual PC 2007 and click the “New…” button to launch the New Virtual Machine Wizard.  When prompted, select the option to “Create a virtual machine”.  Name your new virtual machine “Vista Install Image” and be sure to select “Windows Vista” as the operating system.  You can leave the default RAM allocation, but be sure to select the option to create “a new virtual hard disk”.  The default name, location and size for the virtual hard disk will be fine.
  2. Once you’ve created your new virtual machine, select it in the Virtual PC Console and click the “Start” button to boot the machine.
  3. As your virtual machine boots, you’ll likely see some BIOS messages flash briefly and then some cryptic info about MAC addresses and DHCP as the machine attempts to locate a network boot device.  You’ve basically got a machine with no operating system at this point so there isn’t much it can do.  Let’s actually give it something that it can boot from.  Go up to the “CD” menu in your virtual machine window and select “Capture ISO Image…”.  Select the Windows Vista ISO file and press the “Open” button.  This is the virtual machine equivalent of putting a DVD in the drive.
  4. Now that we’ve actually got a bootable disk in the “drive”, go to the “Action” menu and select “Reset”.  This time you should see the virtual machine boot into the Windows Vista setup program.  From here, you simply need to go through the standard Vista setup process: answer questions, watch hard disk light flash, reboot, repeat. You can proceed with step 5 after Vista is completely installed and you’re logged-in.
  5. At this point, you should have a fresh install of Vista ready to receive whatever applications you want to install.  This is probably a good time to run Windows Update and make sure that you have all of the latest system patches.  Whatever apps you install at this point will become part of your master image.  Everyone has what they consider their core set of applications, for me this is:
    • MS Office 2007
    • MS OneNote 2007
    • Visual Studio 2008
    • Pidgin
    • Firefox
    • Winzip
    • Notepad++
    • Xplorer2
    • Adobe Acrobat

    You don’t want to get too crazy here since we’d like to be able to copy our system image onto a USB flash drive (the one I have is 4GB) or a DVD (4.7 GB) — of course, if you’ve got a really big flash drive or a dual-layer DVD burner feel free to go wild.

    It can be a bit tricky to determine just how big your image file is going to end up being, since it does compress the files and certain files like the virtual memory paging file (which is typically quite big) are omitted by default from the image.  You may have to go through a couple of iterations of installing apps and capturing the image to get just the right size.  I was able to get the apps listed above into a image file that was 3.44 GB. 

    Go on to step 6 after you’ve got all your updates and apps installed.

  6. Now that you have all your applications installed, the final step is to run the sysprep tool.  The purpose of sysprep is to “generalize” the system settings before we capture the image.  Sysprep will clear out the computer name, the driver cache the the security identifier (SID) for our Vista installation — these things are unique to each system so we need to ensure that they are cleared before we capture the image.  Later, when we apply this image to a new machine and boot it for the first time, a unique SID will be generated, we’ll be prompted to enter a machine name, and the driver cache will be recreated based on the specific hardware of that machine.  To run sysprep, you simply need to open a command prompt and issue the following command:
    > c:\windows\system32\sysprep\sysprep.exe /quiet /oobe /generalize /shutdown

Sysprep will do its thing for awhile and then your virtual machine should automatically shutdown.  Once this happens, you are ready to move on to phase 2.

Phase 2 - Create a WinPE Boot Disk

Now that we’ve got our Vista install looking just the way we want, we need to create an image of our virtual disk drive.  We’ve got a bit of a problem though: we need access to the C: drive of the virtual machine, but we can’t boot into OS we have installed on that drive.  If we were to start our virtual machine at this point and allow Vista to boot, it would undo all the work that sysprep just did for us.  The trick is to boot the virtual machine from something other than the hard disk — we need a boot disk and this is where WinPE comes in handy.

Windows Preinstallation Environment (WinPE) is a stripped-down version of windows that will boot from a CD, DVD or USB Flash disk.  You can think of it as the DOS boot disk on steroids.  When you run WinPE you get a basic command line interface but you’re still running in the Windows environment so you can do things like access network resources and run Win32 applications.  I’ll probably do a whole post on WinPE at some point, so I won’t go into all the details here. For now, we simply need to create a WinPE boot disk that will allow us to boot our virtual machine and capture the contents of the C: drive.

  1. Be sure that you’ve got the WAIK installed, then open a command prompt and type the following:
    > cd C:\Program Files\Windows AIK\Tools\PETools\
    > copype.cmd x86 C:\WinPE_x86

    The copype command simply copies all of the WinPE files to the directory of your choice.  The “x86″ flag indicates that we want the 32 bit version of the WinPE environment.

  2. The WinPE environment comes with lots of useful utilities by default, but there is one critical program called ImageX that we’re going to need in order to capture our disk image.  We need to copy ImageX to our WinPE disk so that it is available when we boot into the WinPE environment.  From the same command prompt you opened in the previous step, do the following:
    > mkdir C:\WinPE_x86\iso\Tools
    > copy "C:\Program Files\Windows AIK\Tools\x86\imagex.exe" C:\WinPE_x86\iso\Tools
  3. In addition to the ImageX executable we also need to create an ImageX configuration file.  Copy and paste the following into a text file named wimscript.ini and save it in the C:\WinPE_x86\iso\Tools directory.
    [ExclusionList]
    ntfs.log
    hiberfil.sys
    pagefile.sys
    "System Volume Information"
    RECYCLER
    Windows\CSC
    MSOCache
    [CompressionExclusionList]
    *.zip
    *.cab
    \WINDOWS\inf\*.pnf

    The [ExclusionList] section identifies all of the files/folders that will be omitted from the image when it is captured. The [CompressionExclusionList] section identifies those files that should not be compressed.  Since ZIP and CAB files are already compressed, we can speed up the image capture process by preventing ImageX from attempting to compress them further.

  4. The final step in this phase is take all of the WinPE files (including the ImageX files we added) and create an ISO disk image that we can use to boot our virtual machine.  For this, we use the oscdimg tool that comes with the WAIK.  From the command prompt, do the following:
    > oscdimg -n -bC:\WinPE_x86\etfsboot.com C:\WinPE_x86\ISO C:\WinPE_x86\winpe_x86.iso

    The “-n” flag indicates that we like to enable support for long file names and the “-b” flag specifies the path to the boot sector file that should be written to the disk image.  The last two arguments identify the source location of the Windows PE files and the target ISO image file respectively.

If you navigate to the C:\WinPE_x86 directory now you should find that you have a file named winpe_x86.iso. This is the WinPE disk image that we’ll use to boot our virtual machine in the next phase.

Phase 3 - Capture the Image

The next step is to capture an image of our Vista install.  We’ll boot our virtual machine using our freshly minted WinPE disk and use the ImageX tool to capture the contents of the virtual hard disk in a WIM file.  Unlike the ISO image format which is sector-based, WIM is a hardware-independent, file-based format — that means that the smallest unit of information captured by the image is a file.  Among the benefits of a file-based image format is the ability to use aggressive file compression. 

  1. Be sure that you read all the instructions in this step before proceeding.  We’re going to boot our “Vista Install Image” virtual machine again, but we need to ensure that we boot from our WinPE disk and not from the virtual hard disk.  If we boot from the virtual hard disk and let Vista startup we’ll have to go back and do the sysprep step again.  Bring up the Virtual PC Console, select your “Vista Install Image” and click “Start”.  As quickly as you can, go to the “Action” menu in the virtual machine window and select “Pause”.  This will pause the boot process and give us a chance to mount our WinPE disk.  Now go to the “CD” menu and select “Capture ISO Image…”.  Select the WinPE image we created in the previous phase at C:\WinPE_x86\winpe_x86.iso and press “Open”.  Go back to the “Action” menu and select “Resume” to allow the boot process to continue.  Watch for the message that says “Press any key to boot from CD or DVD” and be sure that you “press any key”.
  2. It’ll probably take a minute or two for WinPE to boot, but when it’s done you should see command prompt window.  Note that the current directory for your command prompt is X:\windows\system32.  The X: drive is a RAM disk that was created by the WinPE bootstrapper and loaded with the WinPE runtime.  If you cd around the X: drive you’ll find that it looks a lot like a normal Windows installation with directories like “Windows” and “Program Files”.From the WinPE environment, you should find that you have access to two other drives:  the C: drive which is the where our Vista installation is located and the D: drive which is the virtual CD drive containing our WinPE boot disk.  We’ll be using each of these drives shortly so you might want to make sure that you can access them from the command prompt.

    In the next step we’re going to create our system image, but first we need to figure out where we’re going to put the image we create.  The WIM file will likely be many gigabytes in size so we need to pick a location that has plenty of space.  We can’t use the virtual C: drive cause that’s the disk we’re going to image.  We can’t use the D: drive cause it is read-only.  We can’t use the X: drive cause it’s just a RAM disk and disappears as soon as the machine shuts down.  What we need is to make a connection from the virtual machine back to the physical machine and store the WIM file there.

    To make a connection back to the physical machine, we’ll use the net command to map a new drive.  From the command prompt, issue the following command:

    > net use z: \\<insert machine name here>\c$

    Obviously, you’ll need to replace the <insert machine name> string with the actual host name of your physical machine.  Depending on how things are configured, you may get prompted to enter some credentials — you can simply enter the username and password that you use to log onto your physical machine (assuming, of course, that you are an administrator on that machine).  Once this is complete, the Z: drive in your virtual machine will map directly to the C: drive on your physical machine and provide a convenient mechanism for copying files between the two.

  3. Now that we have a place to copy our image to we can get down to actually capturing it.  Switch over to the D: drive and cd into the D:\Tools directory (remember this is where we placed our copy of ImageX and the corresponding configuration file).  Once you get to the Tools directory, issue the following command:
    > imagex /capture c: z:\myvista.wim myvistaimage

    This will cause ImageX to capture the contents of the C: drive (remember this is the C: drive of the virtual machine) and copy them to a file named “myvista.wim” on the Z: drive (which really maps to the C: drive of the physical machine).  The final argument is simply a name that gets associated with the image we’re creating (feel free to use anything you like).  It’s actually possible to store multiple system images in a single WIM file and each one needs a unique name.  If you think you might create multiple images, it’s probably best to use names that are somewhat descriptive.

  4. ImageX is going to do its thing for awhile so you might want to go grab a sandwich or something (for me, this part seems to take between 20 and 30 minutes depending on how many applications I have installed).  When it’s done you can shutdown the virtual machine by going to the “Action” menu and selecting “Close”.

Congratulations, you should now have your customized Vista WIM file!  If you go to the root of the C: drive on your physical machine you should find your myvista.wim file.  Take a look at the file size of your WIM.  If this file is bigger than the media that you ultimately want to copy it to, you’re going to need to go back, uninstall some apps and repeat the image capture process (note that you don’t need to repeat the steps in phase 2 — your WinPE disk is good for multiple boots).

If you find that you’re having trouble getting the WIM file down to a reasonable size, you can ask ImageX to use a more aggressive compression routine by substituting the following command in step 3 above

> imagex /compress maximum /capture c: z:\myvista.wim myvistaimage

Note that this will make the image capture take a lot longer (over an hour in my tests).  It will also make application of the image to future systems take more time

Phase 4 - Testing the Image

Now that we have our image, let’s try and apply it to a new machine to make sure everything works properly.  We’ll use Virtual PC 2007 again to create a new virtual system and then apply our image to that system.

  1. Go back to the instructions for phase 1, step 1 and create a new virtual machine — do everything the same except you’ll want to select a different name this time (maybe “Vista Test”).
  2. Go back to the instruction for phase 3, step 1 and boot your new test machine from the same WinPE boot disk we created in phase 2.
  3. Before we can apply our Vista image to the new system, we first need to partition and format the virtual hard disk.  WinPE comes with a utility called DiskPart that will help us here.  For those of you that have been working with DOS/Windows for awhile, DiskPart is the modern equivalent of the old fdisk utility.  You can start DiskPart from the command line by simply typing “diskpart” which will drop you into the DiskPart shell (recognizable by the DISKPART> command prompt).  Once in the DiskPart shell, issue the following commands:
    DISKPART> select disk 0
    DISKPART> create partition primary
    DISKPART> active
    DISKPART> select partition 1
    DISKPART> format fs=ntfs quick
    DISKPART> assign letter=c
    DISKPART> exit

    I won’t go into all the details of DiskPart here (again this could be an entire post unto itself), but in short what we did was select the virtual hard disk, partition it, mark the new partition as active, formatted the partition with NTFS and assigned it the drive letter C:.  Now our virtual disk is ready to accept our Vista image.

  4. We’re going to need access to our WIM file so go back to the instructions for phase 3, step 2 and map the Z: drive of your virtual machine to the C: drive of your physical machine.
  5. We use ImageX utility to apply the image so switch to the D: drive and cd into the D:\Tools directory just like we did in phase 3, step 3.  Once you’ve done that, issue the following command:
    > imagex /apply z:\myvista.wim 1 c:

    The first argument after the /apply flag is the path to the WIM file containing the image we want to apply.  The second argument is the number of the image within the WIM that we want (alternatively, you can also use the image name we specified during the capture step, but since we only have one image in our WIM this is just easier).  It should be fairly obvious that the final object represents the drive we’d like the image applied to.

    Again, ImageX is going to crank away for awhile as it decompresses our image and copies files to our virtual drive.  This step should go a little bit faster than the capture process.

  6. When ImageX finishes, we’re ready to reboot and test out our new Vista install.  Go to the “Action” menu and select “Reset”.  This time we don’t want to boot from the WinPE disk so just let the boot process proceed normally.  This initial boot will likely take a little longer then normal, but ultimately we should see the Vista OOBE (or “Out-of-box- Experience”) wizard.  The OOBE wizard is a set of dialogs that prompt you to select your country/language, create user accounts, select a computer name, etc (the responses to all of these prompts can be automated, but I’ll save that for another post).  At some point you should end up at the Vista login screen.  From here, all that’s left to do is to login and check to see that all the apps/updates you installed are there.

Woo hoo!  It was a lot of work, but hopefully it saves you some frustration in the long run.

Written by Brian on April 7, 2008 4:57 pm | Permalink | Read Comments (3)
Filed under tech.