Automating Windows Installations with Ghost and Sysprep

As this blog has detailed, I have gone through a process of various automation systems for imaging PCs using Windows XP.  When I started working at the school, We had few XP workstations at that time, as most of our PCs were too old to do XP and Windows 98 using Ghost was the thing. You needed multiple images for 98 but they didn’t need SID changes so it was easy enough to do.

Then in May 2005 the school took delivery of its first cluster of PCs, 30 altogether, which would have XP Professional installed from scratch. Still there was no real issue. We prepared a reference machine at site and the manufacturer cloned it exactly (without using Sysprep). I had to hand prepare every one of those PCs unjoining them from the domain and running Ghost Walker to rename and generate new SIDs for them.

Still, there wasn’t a great need for loading images up to that point. In 2006 I learned how to automate a vanilla XP installation for the first time, taking information from MSFN on how to create an unattended XP setup CD. That was a great start in the automated installation learning curve. We changed to a Windows domain in 2007 and I started to learn about RIS. Here it seemed was a system that would replace Ghost and not require extra license costs. The vanilla RIS does have certain advantages like prestaging machine accounts and booting directly off the network with almost no user interaction. This was the point at which we first began testing the deployment of entire machine images in XP. I got a few set up, but that came to an end because of two factors:

  • Microsoft brought out Windows 2003 Service Pack 2 and replaced RIS with WDS
  • Office 2007 with its use of .NET introduced reparse points into the image, which RIS can’t handle.

It became clear I would have to start all over again with WDS and the new imaging technology which Vista includes. While this on the face of it is all great technology, I have to start learning again from scratch, and that is just too much work. I have looked into and played with the technologies such as ImageX, but there is a whole lot of new stuff I would have to learn. It is simply a fact that our network is not really big enough to justify that kind of resourcing at this time.

So where to now? Well, back to the tried and true, Ghost augmented with XP Sysprep. The System Preparation Tool is the same kind of system that RIS uses to prepare a PC (RIPREP), but it uses Ghost to create the image instead. This gives a few more choices on how to deploy images, including using a USB hard drive, as well as the familiar network deployment approach. We first started this approach with new laptops from the Ministry. Using Sysprep means you can automate SID regeneration (no more Ghostwalker) and also automate the inputting of certain parameters like the volume license key, regional settings, administrator password, joining the domain and so on. You set up your reference PC, run Sysprep on it, boot to an alternative OS and run Ghost to image it, then load the image and then Sysprep will automate the steps where information has to be put into Windows at startup. And then you can deploy.

Running Ghost is the fiddly part which I wanted to do away with when I went over to RIS. My remembrance was of having to create endless floppy disks that could boot in PC DOS. When we got Toshiba laptops, they simply refused to run PC DOS to start Ghost this way. But there are, as it turns out, a few elegant solutions to this. The first, available to licensed Vista users, is to make a bootable CD or USB flash drive using Windows PE and put the 32 bit version of Ghost on it. That works on those Toshies. The second is to use some means to deploy the Ghost UNDI image which has a network driver that works out of the box with all kinds of network cards. In this case I found I could actually use RIS to deploy the UNDI image, so on some of our PCs this is the way to go.

Creating the Sysprep.inf file for is easy enough, use the Setupmgr.exe application from the files provided with Windows XP. I have tweaked mine a little and finally got it to work the way I want it to, just asking me for a computer name and the username and password to join it to the domain. This is less information than is asked for if you don’t use the inf file, and you can keep that in your head, so I don’t need to carry around pieces of paper with the license key written on them. We are just about to deploy a new image across that same 30-PC suite. Actually, there will be two images. I expect now that Ghost supports Vista, I will continue to use it for the foreseeable future even though there is a license cost for each PC, when I last checked it was about $30 for OEM PCs.

Using Mini Setup also gets around a nasty little problem where MSOOBE will crash when your reference PC has Windows Media Player 11 installed on it. You can run Sysprep with all the relevant command line settings as follows:

sysprep –reseal –mini –reboot –quiet

This automatically starts Sysprep in Reseal, Mini setup, and reboots for you to start imaging immediately once it has completed its reseal tasks.