In-Depth

Laying the Groundwork for Vista: Part II

The resources are there to help ease deployment, now here's the best way to use them.

You'll have several tools on your side as you prepare to deploy Windows Vista: Windows Pre-Installation Environment (WinPE), ImageX, Windows System Image Manager (WSIM) and Windows Deployment Service (WDS).

In "Laying the Groundwork for Vista," (February 2007), I introduced you to these deployment tools and promised step-by-step instructions on how to use them. Here, I'll take you through the steps for creating a custom WinPE and an answer file using WSIM.

Creating a WinPE
Creating a custom WinPE couldn't be easier. In the first article, I mentioned how the tools copype.cmd, peimg.exe, imagex.exe and oscdimg.exe can help you prepare to deploy Windows Vista. Now, I'll get down to the nitty-gritty and explain how you actually use them.

Type in the following commands at the "Windows PE Tools Command Prompt" that's installed with the Windows Automated Installation Kit (WAIK). The following steps will create a new bootable WinPE named winpe.iso. This WinPE will contain the imagex.exe utility:

Copype x86 C:\wpe
ImageX /mountrw winpe.wim 1 C:\wpe\mount
C:\>Copy C:\"Program Files"\WAIK\Tools\x86\imagex.exe C:\wpe\mount\windows
C:\>ImageX /Unmount C:\wpe\mount /commit
Copy winpe.wim C:\wpe\ISO\sources\boot.wim
oscdimg -n -bC:\wpe\etfsboot.com C:\wpe\ISO C:\wpe\winpe.iso

Here's a detailed explanation of what each of those lines is actually doing:

Copype x86 C:\wpe

This creates a 32-bit WinPE build environment in the C:\wpe folder (you can name this folder whatever you choose). You could also create an AMD 64-bit or Itanium 64-bit environment by replacing the x86 with either amd64 or ia64, respectively. After this command is successfully executed, you should be in the C:\wpe folder.

ImageX /mountrw winpe.wim 1 C:\wpe\mount

This command mounts the winpe.wim image to the C:\wpe\mount folder and saves it in a format you can modify. The number "1" specifies the image in the winpe.wim file that will mount. Image files may contain more than one image. When you're mounting an image to work with, you'll have to specify an image number even if there's only one.

C:\>Copy C:\"Program Files"\WAIK\Tools\x86 \imagex.exe C:\wpe\mount\windows

This copies the x86 version of imagex.exe to your mounted image.

C:\>ImageX /Unmount C:\wpe\mount /commit

This unmounts the image and saves your changes (the "/commit" syntax is the part of the command line that actually instructs the system to save your changes).

Copy winpe.wim C:\wpe\ISO\sources\boot.wim

This renames the winpe.wim and copies it to the folder that the next command will need. Answer "yes" when prompted to overwrite the existing C:\wpe\ISO\sources \boot.wim.

oscdimg -n -bC:\wpe\etfsboot.com C:\wpe\ISO C:\wpe\winpe.iso

This command converts the boot.wim to an .ISO. In doing so, it uses two switches -- the -n switch, which allows for long filename support, and the -b switch, which makes it a bootable .ISO. Then etfsboot.com looks in the C:\wpe\ISO folder for a \sources folder. It will convert whatever is in the \sources folder to winpe.iso and place it in the C:\wpe folder.

There you have it. In six relatively easy steps, you've created a custom bootable WinPE that contains the imagex.exe utility. Now you can burn that to CD/DVD, copy it to a USB/hard drive or use it to boot a virtual machine. WinPE could well serve as your right hand as you deploy Vista throughout your organization.

Creating the Answer Files
Next, you'll use Microsoft's new Windows System Image Manager (WSIM) to help you create .XML answer files. The WSIM and the answer files it creates replace the Setup Manager. There are a few steps you need to take before working with WSIM for the first time.

You need to provide WSIM with an image file that contains the operating systems for which you need to generate answer files. You can easily do this with a CD burned during the previous steps. The install.wim found on the Vista Product DVD is also a great source because it includes seven operating systems by default. The install.wim needs to be in a folder where you have read and write access, because the first thing WSIM is going to do is create a catalog file in the same folder as the install.wim.

The catalog file is a small (around 5MB) .CLG file containing all the components that are configurable in an answer file based on the operating system you choose. Once you've copied the install.wim to a local folder, it's time to open WSIM. Don't be overwhelmed by this new tool's unfriendly demeanor. I'll walk you though the step-by-step process of creating your first answer file.

Step one is to open an image file by right-clicking "Select a Windows image or catalog file." You'll find it in the bottom left corner. Choose "Select Windows Image" (see Figure 1). Browse to the folder where you earlier copied the install.wim, open install.wim and select an image that you want to work with from the Windows image file (see Figure 2).

Figure 1
[Click on image for larger view.]
Figure 1. The Windows System Image Manager (WSIM) helps you organize your system images and answer files.

Figure 2
Figure 2. You can select an image of Vista that corresponds to the version you plan to deploy.

The first time you choose to work with a new operating system, it will generate a new catalog file, which will take a minute or two. This is a good time to grab a cup of coffee.

The next step is to go to the Answer File pane and right-click "Create or open an answer file." Choose "New Answer File." You should see your seven configuration passes listed in the answer file (see Figure 3). Configuration passes represent the various stages of action performed during an installation (see "Laying the Groundwork for Vista," February 2007).

Figure 3
Figure 3. The answer file will list the seven passes taken during configuration.

Now it's time to add your components to the answer file and configure the settings (see Figure 4). To add the first component, look under Windows Image, expand "Components" and right-click "x86_Microsoft-Windows-International-Core-WinPE_6.0.5744.16384_neutral." Then choose "Add Setting to Pass 1 windowsPE" (see Figure 5).

Figure 4
[Click on image for larger view.]
Figure 4. You have quite a selection of components from which to choose to include with your system image.

Figure 5
[Click on image for larger view.]
Figure 5. As you choose components, you specify the pass during which they will be added to your system image.

You'll see the newly added component in the Answer File pane under 1 windowsPE. Once you highlight the component in the Answer File pane, you can configure it in the Properties pane (see Figure 6). As you can see, I've specified English as "en-us" for this example in the InputLocale, SystemLocale, UILanguage and UserLocale. There's also a subcomponent of "x86_Microsoft-Windows-International-Core-WinPE_6.0.5744.16384 _neutral" named "SetupUILanguage" that you'll need to set as English (en-us).

Figure 6
[Click on image for larger view.]
Figure 6. The Properties pane in your answer file will list settings for each individual configuration pass, such as language.

Before you move on to the next component, let's take a closer look at a shorthand of sorts for these components and their settings. Did you notice in Figure 4 that every component starts with x86_Microsoft-Windows and ends with a version number? So, x86_Microsoft-Windows-International-Core-WinPE_6.0.5744.16384_neutral could be shortened to International-Core-WinPE. That would be enough to differentiate it from the other components. So, for example, the following is shorthand for the first component we've already added and configured:

International-Core_WinPE
Pass 1
InputLocale = en-us
SystemLocale = en-us
UserLocale = en-us
UILanguage = en-us
Subcomponent - SetupUILanguage
UILanguage = en-us
WillShowUI = on error

I can't really take credit for this shorthand idea. My good friend (and fellow TechMentor Conference presenter) Mark Minasi developed this. I'll use this shorthand format for the rest of the settings.

WAIK Puts on Some Weight

Some of you may have noticed that the WAIK was gone from the Microsoft download site for a while. Apparently, the WAIK went on vacation around the beginning of February and put on a little weight. When it was taken down from the Microsoft download site it weighed in at 850MB. When it came back from its vacation, it tipped the scales at a hefty 992MB. Rumor has it that Microsoft added several new languages. --R.L.

Choose the disk upon which you'll install the new operating system, and whether or not to wipe the disk clean of all current partitions:

Setup_6.0.6000.../DiskConfiguration/Disk
Pass 1
DiskID = 0
WillWipeDisk = true

Now create a primary partition that extends to the entire drive:

Setup_6.0.6000.../DiskConfiguration/Disk/
CreatePartitions/CreatePartition
Pass 1
Extend = true
Order = 1
Type = Primary

Modify the new primary partition by setting it as active, format using NTFS and assign the C: drive as its first partition:

Setup_6.0.6000.../DiskConfiguration/Disk/
ModifyPartitions/ModifyPartition
Pass 1
Active = true
Format = NTFS
Order = 1
PartitionID = 1
Letter = C

Next, you'll need to configure the answer file to install the operating system to the first partition on Disk 0:

Setup_6.0.6000.../ImageInstall / OSImage/ InstallTo
Pass 1
DiskID = 0
PartitionID = 1

To keep your system from prompting you for the End User License Agreement (EULA), full name, organization name or product key, enter the following:

Component: ...Setup_6.0.6000.../UserData
Pass 1
AcceptEula = true
FullName = <enter your name>
Organization = <enter your organization>
Subcomponent: ProductKey
Key = <enter your product key>

You must specify a name for the new computer and time zone (check the help file for additional time-zone settings):

Shell-Setup
Pass 4
ComputerName = <name or * for random>
TimeZone = Eastern Standard Time

Now create a local user account. This must be a member of the local administrators group. You can add multiple groups by separating them with a semi-colon. For example: <group1>;<group2>;<group3>:

Shell-Setup.../UserAccounts/LocalAccounts/LocalAccount
Pass 7
Description = <whatever description you want>
DisplayName = <user account display name>
Group = administrators
Subcomponent: Password
Value = <user's password>

Your local user account passwords will be obscured in the completed .XML file. If yours is not, make sure you've selected "Hide Sensitive Data" in the WSIM TOOLS menu.

Configuring the out-of-box experience ensures that once you've completely and successfully installed Vista, there won't be many questions from your users. Once again, hide the EULA, choose "Work" for the network location and 1 for ProtectYourPC. This will set the Windows Update client to Automatic. The SkipUserOOBE = true setting won't show the Windows Welcome Center when your users log on:

Shell-Setup.../OOBE
Pass 7
HideEulaPage = true
NetworkLocation = Work
ProtectYourPC = 1
SkipUserOOBE = true

The following setting comes in handy for testing purposes. You wouldn't want the product key you're using for testing to be activated repeatedly, so this setting specifies to skip the auto activation:

Security-Licensing-SLC-UX...
Pass 4
SkipAutoActivation = true

This should give you a good starting point for creating your own WinPEs and answer files using WSIM. As I'm sure you'll realize, there are many more configuration settings than the ones I've talked about here. Have fun exploring them.

Featured

comments powered by Disqus

Subscribe on YouTube