Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to deploy an unattended Setup image of Windows Server 2003 by using Automated Deployment Services 1.0


View products that this article applies to.

Summary

This article describes how to deploy an unattended Setup image of Windows Server 2003 by using Automated Deployment Services (ADS) 1.0. This article contains information about the steps that you have to perform to deploy an unattended Setup image of Windows Server 2003, including how to create the image, how to capture the image and copy the image to the ADS server, and how to deploy the capture of the image to the devices that you want.

↑ Back to the top


Introduction

This article contains information about how to deploy an unattended Setup image of Microsoft Windows Server 2003 by using Microsoft Automated Deployment Services (ADS) 1.0 for Windows Server 2003.

To deploy an unattended Setup image of Windows Server 2003, you have to create and capture the image, copy the image to the ADS server, and then deploy the capture of the image to the devices that you want. This article describes how to perform these operations.

Note The procedure that is discussed in this article currently only works with Windows Server 2003 images.

Create and capture the image

To create the image, to capture the image, and to add the image to the ADS server, follow these steps.

Note Do not copy the image after the text-mode part of the setup process is complete. Computer-specific information is collected during the text-mode part of the setup process, and copying the image after the text-mode part of the setup process is complete is not supported by Microsoft.
  1. On a different computer, create a 500 megabyte (MB) partition and format it with the NTFS file system.

    Make sure that the partition that you create is assigned a drive letter. For example, on another server that is running Windows Server 2003, create an NTFS partition and assign it the E drive letter.
  2. Create an unattended Setup answer file either by using Setup Manager or by using a text editor such as Notepad.

    When you create an unattended Setup answer file, you make a base image available that you can create Sysprep images with.
  3. Optionally, if you want to customize the Setup program, do one or both of the following, depending on your situation:
    • If you want ADS to insert device variables to the answer file, customize the answer file.

      The most common option that you may want to configure is the computer name. However, you can substitute any other parameters that you want. To specify the computer name, modify the [GUIUnattended] section of your answer file with a placeholder for the computer name as follows:
      [GUIUnattended]
      Computername = ^ADS-COMPUTERNAME^
      Note In the "Deploy the image" section that is discussed later in this article, you substitute a value for the computer name placeholder on a per-device basis. For more information about how to use device variables, see the ADS Help documentation.
    • If you want to control the device after the Setup program is complete, install the Administration Agent while the Setup program is running. To automate this part of the Setup program, follow these steps:
      1. Start Notepad, and then open a blank, new document.
      2. Copy and then paste the following lines to the document:
        Copy %sourcepath%\adsroot.cer \adsroot.cer
        Copy %sourcepath%\AdsAgentSetup.msi \AdsAgentSetup.msi
        MSIEXE.exe /i \AdsAgentSetup.msi /qb CertPath=\adsroot.cer Userlogon=0
        Note The first two command lines copy the ADS certificate to the local computer and to the Administration Agent Setup package (AdsAgentSetup.msi). The third command-line runs the AdsAgentSetup.msi package by using the command-line options.
      3. On the File menu, click Save.
      4. In the Save As dialog box, specify a location on the partition that you created earlier in step 1, click All Files in the File name box, type Setagent.cmd in the File name box, and then click OK.
      5. In the unattended Setup answer file, create a [GUIRUNONCE] section to use to run the Setagent.cmd file.
      Note This procedure installs the Administration Agent on the server and runs it in the context of the LocalSystem account. This configuration is used to make the installation of the Administration Agent easier. Microsoft does not recommend that you use this configuration for devices that are in a production environment. For devices that are in a production environment, use the ChangeAgentLogon.exe command-line tool to change the logon to use a domain or local account.
  4. Open a command prompt, change to the folder or the network share that contains the Windows Server 2003 source files, type the following command, where PathOfAnswerFile is the path of the unattended Setup answer file, and then press ENTER:
    Winnt32.exe /noreboot /syspart: Drive /tempdrive: Drive /unattend: PathOfAnswerFile
  5. Locate the $Win_nt$.~bt folder, and then rename the Migrate.inf file to Omigrate.inf.

    When you rename the Migrate.inf file to Omigrate.inf, information that is contained in the partition that you created in step 1 is not carried over to the devices. The partition that you created in step 1 now contains the installation files that are needed to install Windows Server 2003.
  6. Use the Imgdeploy.exe tool to capture the image. For example, open a command prompt, type the following command, and then press ENTER:
    Imgdeploy /c %targetdrive% Drive:\w2k3_unattended.img ImageOf Windows2003ServerUsing500MBPartition
  7. When the capture of the image is complete, add the image to the ADS server either by using the ADS snap-in or by using the Adsimage.exe command-line tool.

Deploy the image

To deploy the image to devices, create a task sequence that performs the following operations:
  • Start the device to the Deployment Agent.
  • Create a 2000 megabyte (MB) partition, and then mark that partition active.
  • Deploy the image that you created.
  • Add the customizations that you want to the unattended Setup answer file (Winnt.sif).
  • Restart the device to the hard disk until the setup process is complete.
It is important to create a partition that is 2000 MB so that the device can start regardless of the physical size of the hard disk in the target device. If you want, you can customize the unattended answer file that you created in the "Create and capture the image" section of this article so that the image expands to fill the whole size of the drive. The following is an example of a task sequence that performs the operations in the list earlier in this section:
<?xml version="1.0" encoding="utf-16"?>
<sequence version="1" description="W2k3-unattend-setup" command="" xmlns="http://schemas.microsoft.com/ads/2003/sequence">
  <!-- Partition the disk -->
  <task description="Partition Disk" doesReboot="false">
    <command>/BMONITOR/bmpart.exe</command>
    <parameters>
      <parameter>\device\harddisk0\partition0</parameter>
      <parameter>-init</parameter>
      <parameter>-c:2000</parameter>
      <parameter>-a</parameter>
    </parameters>
  </task>
  <!-- Copy down the image -->
  <task description="Imaging" doesReboot="false">
    <command>/IMAGING/imgbmdeploy.exe</command>
    <parameters>
      <parameter>"W2k3_unattended"</parameter>
      <parameter>\device\harddisk0\partition1</parameter>
      <parameter>-r</parameter>
      <parameter>-client</parameter>
    </parameters>
  </task>
  <!-- Customize the unattend.txt file  -->
  <!-- Note, file will be in partitionX\$win_nt$.~bt\winnt.sif -->
  <task description="Customize unattended answer file" doesReboot="false">
    <command>/BMONITOR/bmstrrep.exe</command>
    <parameters>
      <parameter>"\device\harddisk0\partition1\$$win_nt$$.~bt\winnt.sif"</parameter>
      <parameter>"^ADS_COMPUTERNAME^"</parameter>
      <parameter>"$device.user.machinename$"</parameter>
    </parameters>
  </task>
    <!-- Change the default Job template to boot-to-hd -->
  <task description="Script command" doesReboot="false">
    <command target="controller">C:\Program Files\Microsoft ADS\tools\adsdevice.wsf</command>
    <parameters>
      <parameter>-e</parameter>
      <parameter>$Device.System.Name$</parameter>
      <parameter>-jobtemplate</parameter>
      <parameter>boot-to-hd</parameter>
    </parameters>
  </task>
  <!-- Restart the computer to enter textMode setup  -->
  <task description="Reboot Computer" doesReboot="true">
    <command>/BMONITOR/reboot</command>
  </task>
  <!-- Start to hard drive to enter Textmode setup  -->
  <task description="Boot Harddisk" doesReboot="true">
    <command>/PXE/boot-hd</command>
  </task>
  <!-- Start to the hard drive to enter GUI-mode setup  -->
  <task description="Boot Harddisk" doesReboot="true">
    <command>/PXE/boot-hd</command>
  </task>
</sequence>
After you follow the steps in the "Create and capture the image" section of this article, you have an image that you can use to automate the setup of Windows Server 2003. You can use Sysprep to prepare the images for deployment by using ADS.

↑ Back to the top


References

To obtain Automated Deployment Services (ADS) 1.0, visit the following Microsoft Web site: For more information about ADS, visit the following Microsoft Web site:

↑ Back to the top


Keywords: KB820758, kbprb, kberrmsg, kbadsv1, kbhowtomaster

↑ Back to the top

Article Info
Article ID : 820758
Revision : 6
Created on : 10/26/2007
Published on : 10/26/2007
Exists online : False
Views : 263