• No results found

Creating answer files in WS08 and Vista is completely different from previous versions of Windows. With Windows NT, you could configure a system and then just capture its settings into an answer file. With Windows 2000, XP, and 2003, you used the Setup Manager to walk through the different options in the file and, when complete, a file was generated for you.

Now, you need to use the Windows System Image Manager to generate the answer file. Windows SIM is part of the Windows AIK and should now be installed on your management system.

PA

RT

II

In order to work with an answer file, you will need three elements:

• An answer file, which is an XML file that automatically provides answers to setup requests during the installation process. This automates the installation process so that it can run in unattended mode.

• A Windows system image (.wim), which is a compressed file containing all of the information required to support an installation of Windows Vista or WS08. The .wim image format uses a single-instance store, which allows it to contain multiple images within the same .wim file without the need to duplicate files that are common to each image.

• A catalog file (.clg), which is a binary file containing the state of the settings and any particular packages that were included in the system image when it was captured. The .clg file is required to indicate to Windows Setup which installation inside the system image you want to work from.

Use the following instructions to build your answer file:

1. Log on to the management system with an administrative account.

2. Create a new folder on the data drive. Call it D:\System_Images. Share the folder as System_Images with Everyone Change permissions. You will rely on NTFS permissions, so it is all right to give share permissions to Everyone.

3. Link to the WS08 installation media. Either insert the DVD or link the CD/DVD drive of the virtual machine to the proper ISO file.

4. Open the DVD drive and go to the \SOURCES folder. Locate the INSTALL.WIM file and copy it to the D:\System_Images folder.

5. Click Start | All Programs | Microsoft Windows AIK to open Windows System Image Manager.

6. Go to the File menu and click Select Windows Image. Open D:\System_Images\ INSTALL.WIM.

7. In the Select An Image dialog box, choose the Server Enterprise image, and click OK. If you get an error message stating that you do not have a valid catalog file, click Yes to create it. The system will create it for you. Each version of Windows needs its own catalog file (.clg).

The image is open, and you are ready to proceed. You’ll note that Windows SIM includes five window panes (see Figure 4-12). They include:

Distribution Share, which is in the upper-left area and will include the network share you wish to use as a distribution point for your image.

Windows Image, which is in the lower-left area and includes the actual image you just opened. The image includes the image name and two sub-entries: Components

and Packages.

Answer File, which is in the upper-middle area and will include the details of your answer file.

Properties, which is in the upper-right area and will detail the contents of the objects you select in the answer file.

Messages, which is at the bottom and includes information about the settings you modify.

Now create and modify the answer file.

1. Move to the File menu, and choose New Answer File. This populates the Answer File pane with an untitled file.

2. Move to the File menu again, and choose Save Answer File. Name it appropriately. Since this is a file for the Enterprise edition, call it Enterprise. Click Save.

The Windows Image includes each of the activities that will be performed during setup. In order to automate these steps, you need to insert custom commands to the answer file. You do so by locating the appropriate command in the appropriate pass under the Windows Image pane and then modifying the setting under the answer file. For example, if you wanted to create a new disk partition and format it, then you need to tell Windows PE to perform these tasks before Windows Setup begins.

As you can see, there are hundreds of settings and features you can modify during setup. Ideally, you will keep these to a minimum and capture information from your reference

PA

RT

II

computer as much as possible. More information is available in the Windows AIK Help file. Take the time to look it over and ensure that you understand its feature set before you deploy your systems. The best option is trial and error. Test each automated setting as much as possible to make sure you understand exactly what it does before you deploy the image.

The following example walks you through the changes you need to make in an answer file in order to create a basic server setup. This setup will perform the following:

• Create a setup for a 32-bit server

• Create a 40-GB partition for the OS and format it in NTFS • Install WS08 on the partition

• Automatically provide the product key during installation Use the following instructions to do so.

1. Go to the Windows Image pane, and expand the Component node. 2. In the Component node, locate the x86_Microsoft-International-Core node.

(Note: The node name will be followed by numbers identifying the version of the OS.) Right-click the node name, and select the available Add command for Pass 4. All other components will only offer one Pass command. Select the one presented by default.

3. Repeat for the x86_Microsoft-International-Core-WinPE node.

The Structure of an Answer File

Note that the answer file was automatically listed as a tree form including the

Components and Packages items found in the Windows Image pane. The Components section is expanded, but the Packages section is empty. That is because you have not personalized anything yet.

The Components section is divided into the setup passes Windows performs as it installs. They include:

• WindowsPE • OfflineServicing • Generalize • Specialize • AuditSystem • AuditUser • OOBESystem

4. Next, under the x86_Microsoft-Windows-Setup node, add the following items. Once again, expand each of the following items and right-click them to choose the

available Add command. Each item will be added to the answer file. • DiskConfiguration | Disk | CreatePartitions | CreatePartition • DiskConfiguration | Disk | ModifyPartitions | ModifyPartition • ImageInstall | OSImage | InstallTo

• UserData

5. Next, under x86_Microsoft-Windows-Shell-Setup add OOBE.

6. Now move to the Answer File pane, and add the following settings to each listed component. Unlisted components do not need settings, as they will use the default. To do so, click the component name in the Answer File pane, then move to the Properties pane, click the setting, and select the appropriate value from the drop- down arrow or write the value out.

• Pass 1 — International Core WinPE • InputLocale: 0409:00000409 • LayeredDriver: none • SystemLocale: en-US • UILanguage: en-US • UILanguageFallback: none • UserLocale: en-US

• Pass 1 — International Core WinPE | SetupUILanguage • UILanguage: en-US

• WillShowUI: OnError • Pass 1 — DiskConfiguration

• WillShowUI: OnError

• Pass 1 — DiskConfiguration | Disk • DiskID: 0

• WillWipeDisk: True

• Pass 1 — DiskConfiguration | Disk | CreatePartitions | CreatePartition • Order: 1

• Size: 40000 • Type: Primary

• Pass 1 — DiskConfiguration | Disk | ModifyPartitions | ModifyPartition • Active: True

• Extend: False • Format: NTFS • Label: SystemDisk

PA

RT

II

• Letter: C • Order: 1 • PartitionID: 1

• Pass 1 — ImageInstall | OSImage • WillShowUI: OnError

• Pass 1 — ImageInstall | OSImage | InstallTo • DiskID: 0

• PartitionID: 1 • Pass 1 — UserData

• AcceptEULA: True

• FullName: your organization’s selected name (e.g., Server Installer) • Organization: your organization’s name

• Pass 1 — UserData | ProductKey • Key: your product key

• WillShowUI: OnError • Pass 4 — International Core

• InputLocale: 0409:00000409 • SystemLocale: en-US • UILanguage: en-US • UILanguageFallback: none • UserLocale: en-US

TIP

TIP

This installs WS08 in U.S. English using an English setup interface. WS08 supports quite a few languages. If English is not your language of preference, then change the values in the International Core settings. Search for “Supported Language Packs” on the Microsoft web site to locate the appropriate values for each supported language.

• Pass 7 — OOBE

• HideEULAPage: True • NetworkLocation: Work • ProtectYourPC: 3

• SkipMachineOOBE: blank (the server setup does not have a machine out of box experience)

• SkipUserOOBE: True 7. Save the answer file when done.

8. Now, validate the answer file to make sure it works. Go to the Tools menu, and select Validate Answer File. If your entries are correct, you should have no warnings or errors. If not, review the settings listed here and compare them to yours. If there are discrepancies, modify your settings. If you cannot modify your settings, delete

the component from the answer file by right-clicking it, and then add it again and reapply the settings.

9. Save the file again.

TIP

TIP

You first save the file with the name of the edition you are configuring so that you can go back to that particular edition to make specific changes.

10. Now, save a new copy of the file. Name it AUTOUNATTEND.XML. This file will be used to automate your installation. Windows Setup automatically searches removable drives, such as floppy and USB drives, for a file named AUTOUNATTEND.XML during setup. If it locates it, it will use it to apply settings during installation. Close Windows SIM.

11. Complete the process by saving the file to a floppy or USB thumb drive.

Now you’re ready to test your setup automation. Insert the installation media into the DVD drive (or attach the appropriate ISO file to a virtual machine), and insert the floppy or USB thumb drive. Boot or reboot the computer. Setup should perform the installation without any input from you.

TIP

TIP

Using Floppy Disks:If you decide to use floppy disks to store the AUTOUNATTEND.XML file, then you should make sure that the boot order for the server lists floppy drives last. Otherwise, the server will try to boot from the floppy and your automated setup will fail. You want to make sure the server boots from the DVD-ROM drive so that setup will launch automatically.

TIP

TIP

Creating More Complex Setups:Microsoft provides extensive documentation on the Windows SIM. If you want to learn more through example, go to the Microsoft web site and search for “Windows AIK Customization Walkthroughs.” These will take you step by step through a series of different customization scenarios for both servers and workstation installations. You can also look up more information in the Windows AIK Help file. In addition, if you want to install WinRE on your systems, search for “Build a Windows Recovery Solution” on the Microsoft web site. This provides you with extensive step-by-step instructions on how to create the WinRE image and automatically apply it to your servers during setup.