How to deploy an unattended Setup image of Windows Server 2003 by using Automated Deployment Services 1.0 (820758)
The information in this article applies to:
- Microsoft Windows Server 2003, Enterprise Edition
- Microsoft Windows Server 2003, Standard Edition
- Microsoft Windows Server 2003, Web Edition
SUMMARYThis 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. INTRODUCTIONThis 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 topCreate and capture the imageTo 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-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:
- 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. - On the File menu, click Save.
- 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.
- 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.
- 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.
back to the topDeploy the imageTo 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 topREFERENCESTo 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
Modification Type: | Major | Last Reviewed: | 6/21/2006 |
---|
Keywords: | kbHOWTOmaster kbADSv1 kberrmsg kbprb KB820758 kbAudITPRO |
---|
|
|
©2004 Microsoft Corporation. All rights reserved.
|
|