Export (0) Print
Expand All

Building a Standard Image of Windows 7: Step-by-Step Guide

Updated: September 23, 2009

Applies To: Windows 7

 

966c07ca-c493-4fe1-820a-ff97426d01b5

 

Installing a custom image is similar to installing the Windows® 7 operating system from the Microsoft® Volume Licensing or retail media, but it uses an operating system image that includes your customizations and applications. This process takes a bit more time to set up but can save you time in the end.

The guidance in section is designed specifically for small and medium business that may not have prior experience with Windows deployment or do not have enterprise deployment infrastructure.

Watch the companion video tutorial for more information.

Also see the following related documents:

noteNote
For a complete view of Windows 7 resources, articles, demos, and guidance, please visit the Springboard Series for Windows 7 on the Windows Client TechCenter.

For a downloadable version of this document, see Building a Standard Image of Windows 7: Step-by-Step Guide in the Microsoft Download Center (http://go.microsoft.com/fwlink/?LinkId=162740).

Creating a custom image for the Standard Image method has seven major steps. You need two computers to build the custom image for this method: You configure your tools on the technician computer and customize your image on the reference computer. Table 1 has a column for each computer. You complete steps in the On the technician computer column on your own computer. You complete steps in the On the reference computer column on the computer that you are using to build the custom image.

Table 1. Steps for Creating a Custom Image

 

Step On the technician computer On the reference computer

1.

Install the Windows Automated Installation Kit (Windows AIK).

2.

Create a Windows Preinstallation Environment (Windows PE) startup disk.

3.

Install and customize Windows 7.

4.

Start the reference computer in Audit mode to clean the image.

5.

Generalize the reference computer to prepare the image for duplication.

6.

Capture the reference computer to an image file by using ImageX.

7.

Create new Windows 7 installation media for the custom image.

 

The following sections provide detailed instructions for each step. To use these instructions, you must have the Windows 7 Volume Licensing media, two USB flash disks (UFDs) that you can use to start computers (8 gigabytes [GB] or larger, depending on the size of the Windows 7 image you create), and a reference computer on which you can build and customize the standard image. You will be formatting the reference computer’s disk, so make sure you back up important files if you are using an existing computer for this purpose.

Install the Windows AIK

The Windows AIK provides the tools required to build custom Windows 7 images. In particular, it includes ImageX, which you use to capture an image of the reference computer, and the files necessary to build a Windows PE startup disk.

First, download the Windows Automated Installation Kit (AIK) for Windows 7 from the Microsoft Download Center (http://go.microsoft.com/fwlink/?LinkId=136976).

The file KB3AIK_EN.iso is an International Organization for Standardization (ISO) image that you must burn to a DVD or mount to a virtual machine. Windows 7 can burn ISO files to DVDs. For more information, see Tip: Burn a Disc Image from an ISO or IMG file in Windows 7 in TechNet Magazine.

To install the Windows AIK from the Windows AIK DVD

  1. Open the Windows AIK DVD in Windows Explorer.

  2. Perform one of the following tasks based on the computer on which you are installing the Windows AIK:

    • If your computer is a 32-bit computer, right-click wAIKX86.msi, and then click Install.

    • If your computer is a 64-bit computer, right-click wAIKAMD64.msi, and then click Install.

  3. Click Next.

  4. On the License Agreement page, click I Agree, and then click Next.

  5. On the Select Installation Folder page, click Next to install to the default installation folder for anyone who uses the computer.

  6. On the Confirm Installation page, click Next to begin installation.

  7. Click Close to finish installation.

Create a Bootable UFD

You use the bootable UFD that you create in this step to start the reference computer so you can capture an image of the hard disk after you install and customize Windows 7. Windows PE does not include ImageX, so these instructions include a step for copying ImageX.exe from the Windows AIK installation folder to the Windows PE source files before you create the Windows PE ISO file.

To create a bootable UFD with Windows PE

  1. Click Start, point to All Programs, and then click Microsoft Windows AIK.

  2. Right-click Deployment Tools Command Prompt, and then click Run as administrator.

  3. Click Yes to open the Deployment Tools Command Prompt window with elevated permissions.

    Tip   You can copy and paste commands from these instructions into the Deployment Tools Command Prompt window. Doing so saves time and helps ensure that you run the command correctly.

  4. In the Deployment Tools Command Prompt window, perform one of the following tasks, and then press ENTER:

    • If the reference computer is a 32-bit computer, type copype.cmd x86 C:\winpe_x86.

    • If the reference computer is a 64-bit computer, type copype.cmd amd64 C:\winpe_amd64.

  5. In the Deployment Tools Command Prompt window, perform one of the following tasks, and then press ENTER:

    • If the reference computer is a 32-bit computer, type copy C:\winpe_x86\winpe.wim C:\winpe_x86\ISO\sources\boot.wim.

    • If the reference computer is a 64-bit computer, type copy C:\winpe_amd64\winpe.wim C:\winpe_amd64\ISO\sources\boot.wim.

  6. In the Deployment Tools Command Prompt window, perform one of the following tasks, and then press ENTER:

    • If the reference computer is a 32-bit computer, type copy "C:\Program Files\Windows AIK\Tools\x86\ImageX.exe" C:\winpe_x86\ISO\.

    • If the reference computer is a 64-bit computer, type copy "C:\Program Files\Windows AIK\Tools\amd64\ImageX.exe" C:\winpe_amd64\ISO\.

  7. Insert a UFD into the computer.

  8. In the Deployment Tools Command Prompt window, type diskpart, and then press ENTER.

  9. Perform the following tasks to prepare the UFD to start the reference computer:

    1. Type list disk, and then press ENTER.

    2. From the list of disks, identify the number of the UFD. It is important that you identify the correct disk, as you will be formatting the disk. Make sure the size and free space match what you expect for the UFD.

    3. Type select disk number, where number is the disk number of the UFD, and then press ENTER.

    4. Type clean, and then press ENTER.

    5. Type create partition primary, and then press ENTER.

    6. Type select partition 1, and then press ENTER.

    7. Type format fs=fat32 quick, and then press ENTER.

    8. Type active, and then press ENTER.

    9. Type exit, and then press ENTER.

  10. In the Deployment Tools Command Prompt window, type xcopy /s C:\winpe_x86\iso\*.* D:\, where D is the drive letter of the UFD. Alternatively, you can copy all the files in C:\winpe_x86 to the UFD using Windows Explorer.

Install Windows 7

After completing the previous two steps—installing the Windows AIK and creating a bootable UFD—you have the tools necessary to capture a custom image. You will complete these steps on the reference computer. Now, you need your Windows 7 Volume Licensing media, which you will install on the reference computer.After installing Windows 7 on the reference computer, customize it by installing any applications, device drivers, and updates that you want to include in the custom image. Remember that anything you install in the custom image will be on each computer to which you install the image. Examples of applications and updates you might want to install in the image include:

  • Antivirus software

  • The 2007 Microsoft Office system

  • Windows Virtual PC

  • Virtual Windows XP

To install Windows 7 on the reference computer

  1. Turn on your computer, insert the Windows 7 Volume Licensing media into the computer’s DVD drive, and then perform one of the following tasks:

    • If you are asked to press a key to boot from the Windows 7 Volume Licensing media, press any key. If the Install Windows page appears, go to step 2.

    • If the Install Windows page does not appear and you are not asked to press a key to start from the Windows 7 Volume Licensing media, you might have to specify that your computer uses its DVD drive as the startup device.

      For more information, see the Windows Help and How-to article Start Windows from a CD or DVD. After you select your DVD drive as the startup device, restart your computer, and then start Windows 7 from the Volume Licensing media.

  2. On the Install Windows page, shown in Figure 1, perform the following tasks, and then click Next:

    1. In the Language to install list, click the language you want to install on your image.

    2. In the Time and currency format list, click the location you want in your image.

    3. In the Keyboard or input method list, click the keyboard layout you want in your image.

     

    Install Windows 7

    Figure 1. The Install Windows page

  3. On the Install Windows page, click Install now.

  4. On the Please read the license terms page, if you accept the license terms, select I accept the license terms. You must accept to continue the installation. Click Next.

  5. On the Which type of installation do you want? page, click Custom.

  6. On the Where do you want to install Windows? page, perform one of the following tasks:

    • If you do not want to specify a specific partition to install Windows 7 on or create partitions on your hard disk, click Next to begin the installation.

    • If you want to create, extend, delete, or format a partition, click Drive options (advanced), select the option you want, and then follow the instructions. Click Next to begin the installation.

    Windows 7 continues installing on the reference computer, as shown in Figure 2.

     

    Installing Windows 7 progress page

    Figure 2. The Installing Windows page

  7. On the Set Up Windows page, which you will see only after Windows 7 finishes installing on the reference computer, perform the following tasks, and then click Next:

    1. In the Type a user name box, type a temporary user name. You can use any user name, as you will remove this user account before capturing the image.

    2. In the Type a computer name box, type a temporary computer name. You can use any computer name, as you will change the computer name during deployment.

  8. On the Set a password for your user account page, perform the following tasks, and then click Next:

    1. In the Type a password box, type a password for the temporary user account.

    2. In the Retype your password box, type the password again to verify it.

    3. In the Type a password hint box, type a password reminder.

  9. On the Type your product key for activation page, type your Windows 7 Volume Licensing product key, and then click Next.

  10. On the Help protect your computer and improve Windows automatically page, click Use recommended settings to install important and recommended updates. You can choose a different setting after you install the image on each computer.

  11. On the Review your time and date settings page, set the time and date, and then click Next.

  12. Optionally, on the Join a wireless network page, click a wireless network, type the security key, and then click Next. You can also skip connecting to a wireless network by clicking Skip.

  13. On the Select your computer’s current location page, shown in Figure 3, click Work network.

 

Select your computer's current location

Figure 3. Select your computer’s current location

To customize Windows 7 on the reference computer

  1. Use Windows Update to install recommended updates as well as the optional updates that you choose to include in the image. To start Windows Update, click Start; in the Search box, type windows update, and then click Windows Update in the search results under Programs.

  2. Install any applications that you want to include in the custom image.

  3. Install any out-of-box device drivers (device drivers that do not come with Windows 7) that you want to include in the custom image.

  4. Configure any computer-specific settings that you want to include in the custom image.

noteNote
You can configure computer-specific settings like hardware settings in the custom image, but you cannot configure user-specific settings using this method without using an answer file or writing a script. For example, you cannot configure a Windows Internet Explorer® 8 home page in the custom image, and then deploy that to all users in the organization. For more information about creating a default user profile, see article 959753 in the Microsoft Knowledge Base.

Clean Up the Image

When you set up Windows 7, you created a temporary user account to log on to it. In this step, you start the computer in Audit mode to remove that temporary user account and its user profile. This is also your last chance to install any applications, device drivers, and updates in your image.

To start the computer in Audit mode using the System Preparation Tool (Sysprep)

  1. Click Start, type C:\Windows\System32\sysprep\sysprep.exe in the Search box, and then press ENTER to start Sysprep, shown in Figure 4.

     

    System Preparation Tool dialog box

    Figure 4. The System Preparation Tool

  2. In the System Cleanup Action list, select Enter System Audit Mode.

  3. Select the Generalize check box.

  4. In the Shutdown Options list, select Reboot.

  5. Click OK to restart the computer in Audit mode.

  6. After the computer restarts, Windows 7 automatically logs in as Administrator.

To remove the temporary user account’s profile

  1. Click Start, type user profile in the Search box, and then click Configure advanced user profile properties in the search results.

  2. In the User Profiles dialog box, click the name of the temporary user account you created when you installed Windows 7 on the reference computer, and then click Delete. Click Yes to confirm.

  3. Click OK to close the User Profiles dialog box.

To remove the temporary user account

  1. Click Start, right-click Computer, and then click Manage.

  2. In the console tree (left pane), click Local Users and Groups.

  3. In the details pane (middle pane), double-click Users.

  4. Right-click the name of the temporary account you created when you installed Windows 7 on the reference computer, and then click Delete.

  5. Click Yes to confirm that you want to delete the temporary user account.

  6. Click OK to acknowledge that you are deleting an administrator account.

  7. Close the Computer Management window.

Generalize the Image

In this step, you generalize the image and prepare it to start in Windows Welcome after you install it on each computer. Generalizing the image removes any hardware-dependent information from it, resets the activation timer, and cleans up Windows 7 so that you can duplicate the image on other computers.

To prepare the computer to start in Windows Welcome using Sysprep

  1. Open Sysprep. (Windows 7 automatically runs Sysprep when you start the operating system in Audit mode.)

  2. In the System Cleanup Action list, select Enter System Out-of-Box Experience (OOBE).

  3. Select the Generalize check box.

  4. In the Shutdown Options list, select Shutdown.

  5. Click OK to run Sysprep and shut down the computer.

Capture the Image

At this point in the process, you have installed Windows 7 on the reference computer, and you are ready to capture an image of it. You use the bootable UFD you created earlier to start the computer. Additionally, you will capture the image to this UFD. For this reason, you should use a UFD that has a capacity of 8 GB or more to ensure that there is room for both Windows PE and the image you capture.

To capture an image of Windows 7 on the bootable UFD

  1. Insert the bootable UFD into a USB port on the reference computer.

  2. Turn on the reference computer, and then perform the following tasks:

    1. When prompted, open the boot device list. (In most cases, pressing F12 during the basic input/output system [BIOS] splash screen opens the computer’s boot device list.)

    2. From the list of boot devices, select the bootable UFD that you inserted in step 1 to start the computer using the bootable UFD.

      noteNote
      If you do not see a prompt to display a boot device list, you must enable booting from UFD devices in the computer’s BIOS. For more information, see the computer’s documentation.

  3. At the command prompt, identify which drive contains Windows 7—typically drive D in Windows PE. To verify this, type dir d:, and then press ENTER.

    If you see the Program Files, Users, and Windows folders, drive D contains Windows 7. Otherwise, examine each drive to determine which drive contains Windows 7.

  4. At the command prompt, identify which drive is the bootable UFD.

    This drive contains Imagex.exe in the root of the drive. It will not be drive X. To determine the drive letter, run dir e:, dir f:, dir g:, and so on until you locate the drive that contains Image.exe in the root.

  5. At the command prompt, type one of the commands shown in Table 2, depending on the edition of Windows 7 you are using, and then press ENTER. Substitute the actual drive letter containing Windows 7 for D: and the drive letter containing Image.exe for E: in Table 2.

     

    Table 2. ImageX Commands

     

    Edition ImageX Commands

    Enterprise

    E:\imagex /compress fast /check /flags “Enterprise” /capture D:

    E:\install.wim “Windows 7 Enterprise” “Windows 7 Enterprise Custom”

    Professional

    E:\imagex /compress fast /check /flags “Professional” /capture D:

    E:\install.wim “Windows 7 Professional” “Windows 7 Professional Custom”

  6. Shut down the reference computer, and remove the UFD from its USB port.

Build Windows 7 Media

You have successfully captured a custom Windows 7 image that includes applications, device drivers, and updates. It is on the root of the bootable UFD that you used to start the reference computer and capture the image. In this step, you create new Windows 7 installation media that use your custom image instead of the image that Microsoft provides on the media.

To create the custom Windows 7 media, you create another bootable UFD. Then, you copy the installation files from the original Windows 7 Volume Licensing media to the bootable UFD. Finally, you replace the install.wim file on the bootable UFD with the custom install.wim file you captured in the previous step.

To copy the custom Windows 7 image to your computer

  1. Insert the UFD containing your custom Windows 7 image in to your computer.

  2. In Windows Explorer, copy the install.wim file from the UFD to C:\install.wim.

  3. Remove the UFD containing your custom Windows 7 image from your computer.

To create a bootable UFD containing your Windows 7 Volume Licensing media

  1. Click Start, point to All Programs, and then click Microsoft Windows AIK.

  2. Right-click Deployment Tools Command Prompt, and then click Run as administrator.

  3. Click Yes to open the Deployment Tools Command Prompt window with elevated permissions.

  4. Insert a UFD in to the computer. Do not insert the UFD to which you captured the custom Windows 7 image, however, as you will be formatting this UFD.

  5. In the Deployment Tools Command Prompt window, type diskpart, and then press ENTER.

  6. Perform the following tasks to prepare the UFD to start the reference computer:

    1. Type list disk, and then press ENTER.

    2. From the list of disks, identify the number of the UFD. It is important that you identify the correct disk, as you will be formatting the disk. Make sure the size and free space match what you expect for the UFD.

    3. Type select disknumber, where number is the disk number of the UFD, and then press ENTER.

    4. Type clean, and then press ENTER.

    5. Type create partition primary, and then press ENTER.

    6. Type select partition 1, and then press ENTER.

    7. Type format fs=fat32 quick, and then press ENTER.

    8. Type active, and then press ENTER.

    9. Type exit, and then press ENTER.

  7. Insert your Windows 7 Volume Licensing media into the DVD drive.

  8. In the Deployment Tools Command Prompt window, type xcopy /s D:\*.* E:\*.*, where D is the drive letter of the Windows 7 Volume Licensing media and E is the drive letter of the UFD you previously formatted.

    Alternatively, you can copy all the files on the Windows 7 Volume Licensing media to the UFD using Windows Explorer.

To copy your custom image to the UFD containing Windows 7

  1. In the Deployment Tools Command Prompt window, type xcopy /r C:\install.wim E:\sources\install.wim, where E is the drive letter of the UFD you created in the previous step. If prompted, type Y to confirm that you want to overwrite the file.

    Alternatively, you can copy C:\install.wim to E:\sources\install.wim using Windows Explorer. If prompted, click Yes to confirm that you want to overwrite install.wim on the UFD.

  2. Safely eject the UFD containing your custom Windows 7 image.

Install the Custom Image

Now that you have created a bootable UFD that contains your custom Windows image, you can use the UFD to install Windows 7 on other computers. Consider backing up the contents of the UFD. In addition, you can create multiple UFDs to help speed up the installation on multiple computers.

To install the custom image from the bootable UFD

  1. Insert the bootable UFD containing the custom Windows 7 image into a USB port on the destination computer.

  2. Turn on the destination computer, and then perform the following tasks:

    1. When prompted, open the boot device list. (In most cases, pressing F12 during the BIOS splash screen opens the computer’s boot device list.)

    2. From the list of boot devices, select the bootable UFD that you inserted in step 1 to start the computer using the bootable UFD.

    noteNote
    If you do not see a prompt to display a boot device list, you must enable booting from UFD devices in the computer’s BIOS. For more information, see the computer’s documentation.

  3. Follow the instructions you see on screen to finish installing Windows 7. The process is similar to the process described in the Install Windows 7 section earlier in this document.

  4. After installing the custom Windows 7 image on the destination computer, you must active the operating system with Microsoft. If your company does not use the Key Management Service (KMS), manually activate Windows 7 with Microsoft.

    For more information, see Windows Volume Activation on the Microsoft Web site.

noteNote
Installing the custom image for the Standard Image method is a manual process. You can automate much of this process. For more information, see Automated Installation of Windows 7: Overview.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft