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