Microsoft KB Archive/820758

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

Article ID: 820758

Article Last Modified on 10/26/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Enterprise Edition
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Web Edition

-



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.''



IN THIS TASK

 * INTRODUCTION
 * Create and capture the image
 * Deploy the image
 * REFERENCES



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.

back to the top

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.  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. 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. 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- ^

Note In the &quot;Deploy the image&quot; 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:  Start Notepad, and then open a blank, new document. 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.</li> On the File menu, click Save.</li> 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.</li> In the unattended Setup answer file, create a [GUIRUNONCE] section to use to run the Setagent.cmd file.</li></ol>

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.</li></ul> </li> 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  is the path of the unattended Setup answer file, and then press ENTER:

Winnt32.exe /noreboot /syspart:  /tempdrive:   /unattend:

</li> 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.</li> 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% :\w2k3_unattended.img

</li> 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.</li></ol>

back to the top

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 &quot;Create and capture the image&quot; 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:

<pre class="fixed_text"><?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?> <sequence version=&quot;1&quot; description=&quot;W2k3-unattend-setup&quot; command=&quot;&quot; xmlns=&quot;http://schemas.microsoft.com/ads/2003/sequence&quot;> <task description=&quot;Partition Disk&quot; doesReboot=&quot;false&quot;> /BMONITOR/bmpart.exe \device\harddisk0\partition0 -init -c:2000 -a <task description=&quot;Imaging&quot; doesReboot=&quot;false&quot;> /IMAGING/imgbmdeploy.exe &quot;W2k3_unattended&quot; \device\harddisk0\partition1 -r -client <task description=&quot;Customize unattended answer file&quot; doesReboot=&quot;false&quot;> /BMONITOR/bmstrrep.exe &quot;\device\harddisk0\partition1\$$win_nt$$.~bt\winnt.sif&quot; &quot;^ADS_COMPUTERNAME^&quot; &quot;$device.user.machinename$&quot; <task description=&quot;Script command&quot; doesReboot=&quot;false&quot;> <command target=&quot;controller&quot;>C:\Program Files\Microsoft ADS\tools\adsdevice.wsf -e $Device.System.Name$ -jobtemplate boot-to-hd <task description=&quot;Reboot Computer&quot; doesReboot=&quot;true&quot;> /BMONITOR/reboot <task description=&quot;Boot Harddisk&quot; doesReboot=&quot;true&quot;> /PXE/boot-hd <task description=&quot;Boot Harddisk&quot; doesReboot=&quot;true&quot;> /PXE/boot-hd

After you follow the steps in the &quot;Create and capture the image&quot; 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

<div class="references_section">