Professional Documents
Culture Documents
Summary: This document provides instructions on deploying Windows 7 by using the latest Windows 7 OEM Preinstallation Kit (OPK). Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. These materials are confidential to and maintained as a trade secret by Microsoft Corporation. Information in these materials is restricted to Microsoft authorized recipients only. Any use, distribution, or public discussion of, and any feedback to, these materials are subject to the terms of the attached license. By providing any feedback on these materials to Microsoft, you agree to the terms of that license.
Contents
Introduction ............................................................................................................................... 1 Deployment Overview ............................................................................................................. 1 Hardware Requirements .......................................................................................................... 1 Optional Software ................................................................................................................... 2 Terminology ........................................................................................................................... 2 Additional Information ............................................................................................................. 3 Lab 1: Prepare your lab environment ............................................................................................ 4 Step 1.1: Install Windows OPK tools.......................................................................................... 4 Step 1.2: Create a distribution share ......................................................................................... 4 Step 1.3: Add drivers and applications to your distribution share .................................................. 5 Step 1.4: Create a bootable Windows PE media .......................................................................... 5 Lab 2.0: Design a Windows 7 installation ....................................................................................... 7 Disk configuration support ....................................................................................................... 7 Step 2.1: Create an answer file ................................................................................................ 7 Step 2.2: Open a distribution share ........................................................................................... 8 Step 2.3: Add and configure Windows settings ........................................................................... 8 Step 2.4: Add OEM customizations ............................................................................................ 9 Step 2.5: Customize Windows Welcome (OOBE) ......................................................................... 11 Step 2.6: Add a device driver to your answer file ........................................................................ 11 Step 2.7: Add an application .................................................................................................... 12 Step 2.8: Validate your answer file ........................................................................................... 12 Step 2.9: Create a configuration set .......................................................................................... 13 Lab 3.0: Build a reference computer ............................................................................................. 14 Why use Sysprep? .................................................................................................................. 14 Why use audit mode? .............................................................................................................. 14 Step 3.1: Build a reference installation ...................................................................................... 14 Step 3.2: Add additional customizations .................................................................................... 15 Step 3.3: Prepare the image by using Sysprep ........................................................................... 15 Step 3.4: Capture an image of the installation ............................................................................ 15 Lab 4.0: Deploy a Windows 7 image ............................................................................................. 16 Step 4.1: Prepare destination computer ..................................................................................... 16 Step 4.2: Apply image to hard drive .......................................................................................... 17 Step 4.3: Shutdown destination computer ................................................................................. 17 Lab 5.0: Test your Windows 7 installation ...................................................................................... 18 OEM Setup Analyzer (OSA.exe) ................................................................................................ 18 Step 5.1: Copy OSA to a removable media ................................................................................ 18 Step 5.2: Run OEM Setup Analyzer against an installation ........................................................... 18 Lab 6.0: Service your Windows 7 image by using DISM ................................................................... 20 Step 6.1: Mount your image ..................................................................................................... 20 Step 6.2: Add a Package.......................................................................................................... 20 Step 6.3: Unmount and commit changes ................................................................................... 21 Optional DISM tasks ................................................................................................................ 21 Enable a feature ................................................................................................................. 21 Apply changes to an offline image by using an answer file ........................................................ 21 Lab 7.0: Build a Windows Recovery environment ............................................................................ 23 Step 7.1: Setup-based recovery solution ................................................................................... 23 Step 7.1.1: Prepare destination computer .............................................................................. 23 Step 7.1.2: Configure recovery partition ................................................................................ 24 Step 7.1.3: Test your recovery solution ................................................................................. 24 Step 7.2 Custom recovery solution ............................................................................................ 25 Step 7.2.1: Extract the Windows RE image ............................................................................. 25
Step 7.2.2: (Optional) Add drivers ........................................................................................ 26 Step 7.2.3: Configure your custom recovery tool .................................................................... 26 Step 7.2.4: Save your customized Windows RE image ............................................................. 26 Step 7.2.5: Prepare destination computer .............................................................................. 27 Step 7.2.6: Configure recovery partition ................................................................................ 27 Step 7.2.7: Test your custom recovery solution ...................................................................... 27 Lab 8.0: Additional customizations (Optional) ................................................................................ 29 Step 8.1: Windows System Assessment Tool (WinSAT) ................................................................ 29 Step 8.1.1 Prepopulate WinSAT data to reduce Windows setup time .......................................... 29 Step 8.2: Enable Windows 7 BitLocker ....................................................................................... 29
Version 1.2
Introduction
The following labs demonstrates an image-based deployment scenario using the latest Windows 7 OEM Preinstallation Kit (OPK) tools. These labs provide a preview of key functions within each technology area of the OPK to ensure a broad understanding of Windows 7 deployment.
Deployment Overview
The labs take you through the typical installation lifecycle: setup, design, building, deployment, and servicing. Labs 1 to 6 are the core labs, and labs 7 to 8 are optional. The process for building and deploying a Windows 7 installation is mostly the same as for deploying Windows Vista. However, several Windows Vista command-line tools have been replaced by one tool called Deployment and Imaging Services Manager (DISM). The following illustration shows the deployment process, from creating an answer file to deploying an image onto a new computer.
Deployment Process Diagram First, you set up your lab environment by building a technician computer and creating Windows Preinstallation Environment (Windows PE) media. Then you use Windows System Information Manager (Windows SIM) to create an answer file and to build a Windows 7 image. Next, you configure the installation to boot into audit mode, so that you can further customize the image. Then you use the product DVD with your answer file to run Windows Setup and create a reference computer. Next, you generalize and capture an image of the installation on a USB flash drive. Finally, you deploy the image to a destination computer by using the ImageX tool and your Windows PE media. After the installation is complete, you run through the complete first-boot experience. You then use the OEM Setup Analyzer (OSA) tool to measure first-boot performance and to identify potential performance issues. To understand the impact of various customization options, you can run the tool again to gather additional metrics to compare with previous performances. Finally, you service your image by using the DISM tool.
Hardware Requirements
To complete the labs, you must have the following hardware:
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
Technician computer with CD or DVD burner o OS: Vista SP1 or Windows 7 o Processor: 1.5 GHZ or better o Memory: 2 GB or better o Video: DirectX 9.0 capable and WDDM 1.0 driver support, 128 MB graphics memory o Hard disk: At least 20 GB of free space o DVD reader (DVD writer is necessary if you wish to create Windows PE media) One or more computers for reference installation o Processor: 1.5 GHZ or better o Memory: 2 GB or better o Video: DirectX 9.0 capable and WDDM 1.0 driver support, 128 MB graphics memory o HDD: At least 20 GB of free space o DVD reader Blank media (DVD or CD) USB flash drive with 40 GB free space
Optional Software
To successfully complete the labs, you must have the following software and source files: Art Out-of-box experience (OOBE) branding, performance center branding, desktop images, and so on Applications OEM welcome application, add-ins, and so on Hardware drivers Out-of-box drivers for the hard disk, network, video or other hardware supported on your reference or destination computers Proprietary recovery application If you have developed your own recovery solution, you need the source or executable to integrate it in the Windows recovery environment
Terminology
Deployment Image Servicing and Management (DISM) Command-line tool that you can use to update a Windows image or a Windows PE image. DISM replaces Package Manager from Windows Vista and improves offline servicing. ImageX Command-line tool that captures, modifies, and applies installation images for deployment in a manufacturing environment. Reference computer Fully-assembled computer containing a reference installation.
Technician computer Computer on which you install Windows System Image Manager (Windows SIM). Typically, the configuration sets and the distribution share are also on this computer. Windows image (.wim) file images. File format that contains one or more compressed Windows
Windows Preinstallation Environment (Windows PE) Minimal Win32 installation environment that is built on the Windows kernel. You can use Windows PE to prepare a computer for Windows installation, copy disk images from a network file server, and start Windows setup.
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
Windows System Image Manager (Windows SIM) unattended answer files and configuration sets.
Windows Welcome A series of pages that takes end users through the steps of adding information that personalizes their settings.
Additional Information
You can find additional information about the steps in these labs in the OPK Help documentation. To access OPK.chm from your technician computer, click Start, click All Programs, click Microsoft Windows OPK, and then click Documentation.
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
Duration
This lab takes approximately 30 minutes.
Prerequisites
Technician computer Reference computer Windows 7 OPK media Blank CD or DVD USB flash drive with 40 GB free space Your custom art, drivers, and applications
1. On your technician computer, insert your Windows 7 OPK media. If the OPK setup does not start automatically, you can manually start the installation. In Windows Explorer, navigate to your Windows 7 OPK media, click the OPK folder, and then double-click StartCD.exe. 2. Follow the on-screen instructions to complete the installation. By default, Setup creates the following directory structure: C:\Program C:\Program C:\Program C:\Program C:\Program Files\Windows Files\Windows Files\Windows Files\Windows Files\Windows OPK\Docs\ OPK\Recovery\ OPK\Samples\ OPK\SDKs\ OPK\Tools\
3. Copy your packages (.cab, .msu), drivers (.inf), and language packs (lp.cab) into the appropriate subfolders. Important Windows SIM recognizes only these subfolder names. You must include at least one of the three folders in your distribution share. The subfolder names must match exactly so that Windows SIM can read the subfolder contents.
\winpe_x86\mount 3. Copy the base image (Winpe.wim) to the \Winpe_x86\ISO\sources folder and rename the file to Boot.wim. copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim 4. Mount the Windows PE image by using ImageX, and then add the ImageX tool to your Windows PE image: imagex /mountrw c:\winpe_x86\ISO\sources\boot.wim 1 c:\winpe_x86\mount copy "c:\program files\Windows OPK\Tools\<architecture>\imagex.exe" c:\winpe_x86\mount\Windows\System32 5. Commit your changes by using the ImageX /unmount /commit option: Imagex /unmount c:\winpe_x86\mount /commit 6. Create an .iso file. You can use a non-Microsoft tool or the Oscdimg tool provided: oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso 7. Burn the .iso file to media. You can use a non-Microsoft tool or follow these directions from a Windows 7 environment: a. Click Start, in the Search programs and files box, type c:\winpe_x86, and then select winpe_x86 from the list. b. c. d. e. Right-click winpe_x86.iso, and then select Burn Disc Image. Insert a blank CD or DVD. Select the appropriate drive letter. Click Burn.
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
Duration
This lab takes approximately 1 to 2 hours.
Prerequisites
Technician computer USB flash drive Your custom drivers, art, and applications
2. On the File menu, click Select Windows Image. 3. In the Select a Windows Image dialog box, select a catalog file (.clg) that corresponds to the Windows version you want build, and then click Open. Windows 7 catalog files are available from your Windows 7 media, in the \sources folder. 4. On the File menu, click New Answer File.
Component Microsoft-Windows-Deployment\Reseal Microsoft-Windows-International-Core-WinPE Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\ CreatePartition Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ ModifyPartition Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo Microsoft-Windows-Setup \UserData
3. The settings that you added appear in the Answer File pane. Select and configure each setting as specified below:
Component Microsoft-Windows-International-Core-WinPE
Microsoft-WindowsSetup\DiskConfiguration\Disk\CreatePartitions\CreatePartition
Microsoft-Windows-Setup \DiskConfiguration\Disk\ModifyPartitions\ModifyPartition
Microsoft-Windows-Setup\ImageInstall\OSImage\ Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo
Microsoft-Windows-Deployment\Reseal
1. In the Windows Image pane of Windows SIM, expand the Components node to display available settings. 2. On the expanded list of components, add the following components to your answer file by right-clicking the component and then selecting the appropriate configuration pass.
3. The settings that you added appear in the Answer File pane. Select and configure each setting as specified below.
Component Microsoft-Windows-IEInternetExplorer\FavoritesList\FavoriteItem
Microsoft-Windows-IEInternetExplorer\SearchScopes\Scope
StartPageKey = Home page 1 StartPageURL = http://www.fabrikam.com StartPageKey = Home page 2 StartPageURL = http://www.contoso.com HelpCustomized = false Logo = <PathtoYour100x100_96dpi.bmpFile> Manufacturer = <CompanyName> SupportHours = <SupportHours> SupportPhone = <SupportNumber> SupportURL = <SupportURL>
Microsoft-WindowsPerfCenterCPL\WindowsExperienceIndexOe mInfo
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
10
Note A sample Oobe.xml file is located at c:\Program Files\Windows OPK\Samples\OOBE\Info\Oobe.xml. 2. Save your Oobe.xml file and any supporting art files (.png, .bmp) to c:\MyDistributionShare\$OEM$ Folders\$1\Windows\System32\OOBE\info. For more information on other OEM customizations, see "Value Areas for OEMs" in the OPK.chm.
11
To add other driver paths to your answer file 1. On the Insert menu, click Driver Path, and then click Pass 5 auditSystem. 2. Select the path to your driver and then click OK.
c:\MyDistributionShare\TBD\Driver1
You can add only .inf files to the driver store during installation. To run an .exe or .msi driver package, you must add a custom command to install the driver package. For more information, see the "Add a Custom Command to an Answer File" topic in the OPK Help documentation.
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
12
1. In Windows SIM, click Tools, and then click Validate Answer File. If the answer file validates successfully, the Messages pane displays "No warnings or errors." Otherwise, error messages appear in the same location. Note If a warning occurs, you can skip the warning or double-click on the warning entry for more details. When adding drivers, Windows SIM automatically adds a credentials entry for each driver you add. The credentials entry is initially blank and causes a warning. 2. If an error occurs, double-click the error in the Messages pane to navigate to the incorrect setting. Change the setting to fix the error, and then validate the file again. 3. On the File menu, click Save Answer File. Save as Lab2_AnswerFile.xml.
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
13
Duration
This lab takes approximately 1 to 2 hours.
Prerequisites
Windows 7 Product DVD Reference computer USB flash drive Windows PE bootable media with ImageX
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
14
md e:\images
3. To capture an image of the installation and save it to your USB flash drive, type the following: imagex /capture c: e:\images\myWin7.wim "Windows 7" 4. After ImageX captures your image, shut down the computer. From the Windows PE command prompt, type the following: wpeutil shutdown
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
15
Duration
This lab takes approximately 2 hours.
Prerequisites
Windows 7 image from Lab 3.0 stored on a USB hard drive Destination computer Windows PE bootable media with ImageX
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
16
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
17
Duration
This lab takes approximately 5 minutes per test.
Prerequisites
USB flash drive Destination computer with your Windows 7 installation
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
18
6. Type a custom name and then press Enter. The tool scans the computer for event logs, creates a dataset, and then displays an HTMLbased report.
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
19
Duration
This lab takes approximately 30 minutes.
Prerequisites
Technician computer USB flash drive containing your preinstalled, generalized image of Windows 7, as described in Lab 3.0
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
20
2. Use the DISM /Get-Packages command to verify that the package was added to the image. This command shows the corresponding .cab packages instead of .msu packages. DISM /image:c:\Service\Mount /Get-packages
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
21
1. Connect your USB flash drive that contains your Windows 7 image (.wim) to your technician computer. 2. Make a backup copy of your Windows 7 image by using the following command: copy e:\images\MyWin7.wim e:\images\MyWin7_Lab6b.wim 3. Mount the copied Windows 7 image: DISM /Mount-Wim /WimFile:e:\images\MyWin7_Lab6b.wim /Index:1 /MountDir:c:\Service\Mount
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
22
Duration
This lab takes approximately 60 minutes.
Prerequisites
USB flash drive containing your Windows 7 image Destination computer Windows PE bootable media with ImageX
23
assign letter = c exit 3. Connect the USB flash drive that contains your custom Windows 7 image and then apply the image to the hard drive by using ImageX: D:\imagex.exe /apply e:\images\myWin7.wim 1 c: 4. Run BCDBoot to update the BCD store: c:\Windows\system32\bcdboot.exe c:\windows The BCDboot tool configures partition 1 as the system partition by copying boot-specific files to this partition
7. Verify that the computer starts in Windows RE. The system reinstalls Windows by using the
image that you placed in the recovery partition. When the installation is complete, you can restore backup files.
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
24
Duration
This lab takes approximately 60 minutes.
Prerequisites
Technician computer USB flash drive Custom recovery application USB flash drive containing your Windows 7 image Destination computer Windows PE bootable media with ImageX
25
8. Mount the copy of the Windows RE image for editing: ImageX /mountrw c:\winre\winre.wim 1 c:\winre\mount
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
26
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
27
c. Select Repair your computer on the Advanced Boot Options menu and then press Enter. d. Follow the on-screen instructions to select a keyboard layout and provide credentials.
e. Verify that a link to your custom factory recovery application appears on the Windows RE
menu. 3. Verify that your custom recovery application launches when you press the F1 key: a. Restart the computer. b. Immediately after POST, hold down the F1 key. c. Verify that your custom recovery application launches automatically.
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
28
Prerequisites
Technician machine Preinstalled image (.wim) of Windows 7 from Lab 2.0
29
partition and generates the necessary keys. Typically, the end user enables BitLocker, but you can enable the option to verify the installation. To enable BitLocker from a Windows 7 computer, you can use one of these methods:
Click the Start button, click Computer, right-click on the OS partition, and then click Turn on BitLocker. -orAt the command prompt, type the following to run Manage-bde.exe:
Manage-bde -on c: -rp -TPMAndPin 1234 SkipHardwareTest
Microsoft Confidential. 2009 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.
30