Deploying Vista – Part 13: Performing Image-Based Deployment

by [Published on 15 Oct. 2008 / Last Updated on 15 Oct. 2008]

This series of articles on automating Windows Vista deployment continues by examining how to perform an image-based install using ImageX and Windows PE.

If you missed the previous articles in this series, please read:

In the previous article we examined how image-based deployment works. In this article, we’ll walk through the steps of performing a simple, basic image-based deployment of Windows Vista with Service Pack 1, Enterprise Edition. To do this, we’ll follow the seven-step process outlined in the previous article in this series.

Prerequisites for Performing the Walkthrough

To perform this walkthrough yourself, you’ll need two desktop computers:

  • One to use as your reference computer on which you’ll install Vista, customize, sysprep, and capture your base image from.
  • One to use as your destination computer - this one should have no operating system installed on it. Note that the disk drive on your destination computer should be the same size or larger than the one on your reference computer.

You’ll also need a DHCP server and a file server, which can both be the same computer if desired. And, of course, a network connecting your two desktop computers and server(s) together.

Finally, you’ll need the custom, bootable Windows PE CD you created in Part 11 of this series.

Step 1: Install the Reference Computer

Begin by installing Vista on a reference computer. You can use either manual or unattended installation to do this - see Part 8 of this series for how to perform an unattended install using your Vista DVD together with an answer file.

Step 2: Customize the Reference Computer

Log on to your reference computer and customize it as desired. We’ll perform one absolutely essential customization—installing games! Well, maybe not every administrator will agree, but that’s OK. Anyways, to enable the Games feature on Vista, open Control Panel, click Programs, click Turn Windows Features On Or Off, and select the checkbox labeled Games (Figure 1):


Figure 1: Turning on the Games feature on Vista 

If desired, you could also install applications, customize the desktop, configure services, install device drivers, and perform other customizations your users will need on their computers. We’ll just stick with enabling Games to keep things simple at this point.

Step 3: Sysprep the Reference Computer

Open a command prompt on your reference computer, type cd sysprep to change the current directory to C:\Windows\System32\Sysprep, and type sysprep /oobe /generalize /shutdown to sysprep (or better, generalize) your reference computer by removing all machine-specific information from it such as security identifiers (SIDs), the contents of the event logs, system restore points, installed Plug and Play drivers, and so on. You can also do generalize your system by pressing WINDOWS KEY + R to open the Run box, typing sysprep and clicking OK which opens the C:\Windows\System32\Sysprep folder in Windows Explorer. Then double-click the Sysprep application in this folder to open the System Preparation Tool dialog and select the options shown in Figure 2:


Figure 2: Sysprepping your reference computer

Clicking OK starts the generalizing process, and when this is completed your system shuts down. For more information on using Sysprep, see Part 5 in this series.

Step 4: Boot the Reference Computer Using Windows PE

Now take the bootable Windows PE 2.1 CD you created in Part 11 of this series and boot your reference computer using it. After a short time, the Windows PE command prompt will be displayed.

Step 5: Capture a Base Image from the Reference Computer

When the Windows PE command prompt appears, type the following command:

D:\imagex /compress fast /capture C: C:\baseimage.wim “Base Image” /verify

This command capture an image of the entire C: drive of your reference computer and save this image as a WIM file named baseimage.wim in the root folder of C: drive. This captured image will be the base image you will deploy later onto your destination computers. Figure 3 shows the image capture process (which takes some time to complete) underway:


Figure 3: Capturing your base image from your reference computer’s boot/system volume

Step 6: Copy the Base Image to a Network Share

Once your base image has been captured - you’ll see a message saying “Successfully imaged C:\” when ImageX is done capturing the image - you now need to get your image file off of your reference computer and save it somewhere so that you can deploy it later onto your destination computers. The simplest way to do this is to use the net use command at the Windows PE command prompt to map a network drive to a shared folder on your file server.

For example, first create a shared folder named C:\Images on your file server and share this folder as IMAGES with Full Control permission for Everyone (both shared folder and NTFS permission). Then at the Windows PE command prompt on your reference computer, type net use Y: \\<name>\IMAGES where <name> is either the NetBIOS name or IP address of your file server. If a “password is invalid” message appears when you do this, type a username and password valid on your file server. Be sure to type the username in the form <computer_name>\<user_name> or <domain_name>\<user_name> depending on whether your file server belongs to a workgroup or a domain. If the net use command fails, it might be that your DHCP server isn’t working—check the leases in the scope and make sure Windows PE has leased an address from your server.

Once you’ve mapped the drive, type copy C:\baseimage.wim Y: to copy your captured base image file to the network share. Once this is completed (check the C:\Images folder on your file server to make sure the baseimage.wim file is actually there) you can now remove the Windows PE CD from your reference computer and power the computer off.

Step 7: Deploying the Base Image onto a Destination Computer

Now you’re finally ready to deploy your captured image onto one or more destination computers. Start by booting your destination computer using your Windows PE CD, and once the command prompt appears, use the following Diskpart commands to create a new primary partition, set the new partition as the active partition, and format the new partition as an NTFS volume:

diskpart
select disk 0
clean
create partition primary
select partition 1
active
format
assign letter=C:
exit

Figure 4 shows each of these commands at work:


Figure 4: Preparing the hard drive of the destination computer to receive the image

Tip: You could also create a batch file of Diskpart commands and save your file as part of your Windows PE build before you burn this onto a CD. Then you could simply run the batch file at the Windows PE command prompt in order to partition and format the disk of a destination computer in one step. We’ll look at this and other Windows PE customizations in a later article of this series, but for now we’re just covering the basics of how to perform image-based deployment

Once the disk drive of your destination computer has been suitably prepared, type the following command two commands at the Windows PE command prompt to connect to your network share and copy the base image from there onto the hard drive of your destination computer:

net use Y: \\<name>\IMAGES
copy Y:\baseimage.wim C:

Once again, <names> is either the NetBIOS name or IP address of your file server, and you may be prompted to supply credentials valid on your file server. And the copy operation may take some time to complete as the image file is typically couple of gigabytes in size. Once the copy operation is complete, you’ll see a message saying “1 file(s) copied.”

Now you’re ready to apply the captured image onto the hard drive of your destination computer. To do this, type the following command at your Windows PE command prompt:

D:\imagex /apply C:\baseimage.wim 1 C:

This will again take some time to complete (almost as long as capturing an image) and when it’s done you’ll see a message saying “Successfully applied image.”

You’re done. Remove the Windows PE CD from your destination computer, power the computer off, then power it on again. As the computer boots up, new SIDs will be generated for it and you’ll be presented with the machine out-of-box-experience (machine OOBE) as shown in Figure 5:


Figure 5: Machine OOBE on destination computer

This OOBE allows each user to customize their computer by giving it a name, creating a local user account, selecting a desktop background, and so on. For example, if you were an OEM and you were going to deliver the computers to customers, the customer would walk through OOBE the first time they turned the computer on. In an enterprise you would want to use an answer file to automate this portion of deployment—we’ll examine this issue in a future article in this series.

Finally, once you’ve completed the OOBE, you can log on and play FreeCell on your destination computer (Figure 6):


Figure 6: Productive use of time in the enterprise

If you missed the previous articles in this series, please read:

Featured Links