Customizing Unattended Setup
Depending on the scope and needs of your business, Windows XP can be deployed in a variety of ways including CD-based installs, unattended installs from a network distribution point, image-based installs using Sysprep, using Remote Installation Services (RIS), and using Microsoft Systems Management Server (SMS). Of these different approaches the simplest and most flexible is unattended installs from a network distribution point. Unattended installs have an easy learning curve compared to other approaches, and there is no need for you to purchase an additional product such as third-party disk imaging software (needed for Sysprep installs) or an expensive and complex product like SMS. In fact, you don’t even need Windows 2000 Server or Windows Server 2003 (needed for RIS installs) since unattended installs can be performed in a workgroup scenario. And the unattended method can be used for both upgrades and clean installs, compared to RIS and Sysprep which can only be used for clean installs and SMS which can only be used for upgrades.
Windows Corporate Deployment Tools
In the \Support\Tools folder on the Windows 2000/XP/2003 product CDs is a compressed folder named Deploy.cab. This file contains various tools that can be used for deploying Windows using unattended and Sysprep installs. To install these tools, insert a product CD, open My Computer, and double-click on \Support\Tools\Deploy.cab to display its contents:
Figure 1: Contents of Deploy.cab.
Now press CTRL+A to select all, select Copy To Folder from the Edit menu, select an existing folder or create a new one, and click Copy to extract the deployment tools to the target folder. The tools we’ll focus on for this article include:
- Setup Manager (Setupmgr.exe) Used for creating answer files and distribution folders for unattended installs.
- Deploy.chm A help file explaining how to use deployment tools like Setup Manager and Sysprep.
- Ref.chm A help file summarizing the syntax of answer files and the possible keys and allowed values for each section of these files.
Before we look at using Setup Manage however, note that there are different versions of this tool depending on which product CD you use:
Version of Setupmgr.exe
Windows 2000 Server
Windows 2000 Server CD
Windows XP Professional CD
Windows XP SP1
Windows XP SP2
Windows Server 2003
Windows Server 2003 CD
Table 1: Versions of Setup Manager
From this table we can see that the version of Setup Manager on the Windows Server 2003 CD is the most recent one, though the XP SP2 deployment tools can be downloaded and used for workgroup environments. We’ll use the Windows Server 2003 version (5.2.3790.0) for the remainder of this article.
Using Setup Manager
To start Setup Manager, simply double-click on Setupmgr.exe. Once the Welcome to Setup Manager screen appears, click Next and select “Create new” to create a new answer file from scratch (an answer file is a text file that answers the prompts that occur during Setup, which allows Setup to proceed without user intervention):
Figure 2: Creating a new answer file for unattended installs.
Click Next and choose “Unattended setup” to create an answer file named unattend.txt:
Figure 3: Creating an unattend.txt file.
Click Next and select “Windows XP Professional” as the product you want to deploy:
Figure 4: Deploying Windows XP Professional.
Click Next and choose “Fully automated” to perform a completely unattended install of Windows XP Professional:
Figure 5: Choosing to perform a completely unattended install.
Click Next and select “Create a new distribution share” to prepare a network distribution point from which you can perform your unattended installs:
Figure 6: Setting up a network distribution point.
Choosing this option will lead you through the process of copying the Windows XP source files to a shared folder on your network. Click Next, select “On the CD” and insert your Windows XP Professional CD into your file server’s CD-ROM drive. Click Next and accept the default distribution folder and share name or change them as desired:
Figure 7: Specifying the location and share name for the distribution point.
Click Next and select the checkbox to accept the EULA. Click Next and the main Setup Manager screen appears:
Figure 8: The main Setup Manager screen.
As you step (using Next) through this screen, you can customize all aspects of how unattended Setup will run including specifying answers for prompts that appear during a manual installation and advanced Setup options like proxy settings for Internet Explorer, a name for the %Windir% folder on the target machine, automatically installing network printers during Setup, and running additional commands at the end of Setup and the first time a user logs on to the new machine. Once you get to the end of this screen you are prompted to accept or specify a name for your answer file:
Figure 9: Naming the answer file unattend.txt.
Click OK and the process of creating the distribution folder and copying the XP source files to it begins:
Figure 10: Source files are being copied to the distribution folder.
After a few minutes the files are copied and your distribution share and answer file are ready for use:
Figure 11: Shared distribution folder Windist on server TEST220 with XP source files (I386 folder) and answer file (unattend.txt).
When the “Completing Setup Manager” screen appears, click Cancel to finish:
Figure 12: Setup Manager is finished.
Customizing the Distribution Point
Before you perform your unattended install though, you may need to customize your distribution point further to meet your business needs. For example, let’s say your target systems have hardware that require special OEM-supplied device drivers to function properly. To install such drivers during unattended install, you can add them to your distribution point as follows:
- Browse to the I386 folder created by Setup Manager within your distribution folder.
- Create a subfolder under I386 named $OEM$ to contain all the supplemental files needed for your installation.
- Create a subfolder under $OEM$ named $1 to represent the system volume (%SystemDrive% which is usually C: drive) on the target system.
- Create a subfolder under $1 named Drivers to contain all the OEM drivers needed for your installation.
- If desired, create additional subfolders such as Video, NIC, and Modem under Drivers if you have multiple drivers to install and copy your OEM drivers to these subfolders.
- Open your unattend.txt file using Notepad and in the [Unattended] section add the following key:
OemPnPDriversPath = Drivers\Video;Drivers\NIC;Drivers\Modem
Another customization you can perform on your distribution folder is to add mass storage device drivers (such as SCSI drivers) if you need them for your hardware. To do this, create a subfolder under $OEM$ named Textmode and place your SCSI drivers there.
Still another customization you can do is to copy additional Help files to your target system. To do this, create a subfolder under $OEM$ named Help and place your additional Help files there to have them automatically copied to %Windir%\Help during installation.
Yet another customization is to copy additional system files to the %Windir%\System32 folder on your target machine. To do this, create a subfolder under $OEM$ named System32 and place these files there.
Finally, if you want to copy any files to any folder on any volume, create a subfolder under $OEM$ named <Drive_Letter> (for example D for D: drive) and beneath this any folder you like (such as Data or Stuff) and the files you place there will be copied to the volume and folder specified on the target system.
Performing the Install
Once you’ve customized your distribution folder and answer file as desired, you can customize the sample unattend.bat batch file created by Setup Manager to begin your install. If you’re performing an upgrade to XP, go to the target machine, connect to the distribution folder (for example Start-->Run-->\\TEST220\Windist) and run the batch file, which runs the Winnt32.exe command with the /s switch to perform an unattended install using your answer file. If you want to perform a clean install instead of an upgrade, use a network boot disk to boot your target machine, connect to the share, and run Winnt32.exe as required. Tip: to create a network boot disk, see BootDisk.com.
In this article we’ve seen how to use Setup Manager to create a network distribution point and answer file to perform an unattended install of Windows XP. Setup Manager is one of several deployment tools Microsoft provides for mass deployment of Windows. It’s also the easiest such tool to use and has the flexibility of being able to perform both clean installs and upgrades. Taking the time to learn how to use this tool will speed the job of deploying Windows in small- and mid-sized networking environments.