Unattended installation of Windows XP
This article is aimed at power users and not corporate administrators or OEM system builders.
Knowledge of this topic is required in the current MCSA/MCSE Exam 70-270.
Topics on this page:
 Setup Manager
This tutorial shows you how to use Windows XP's Setup Manager to create an answer file for unattended (automatic) installation. This is normally used in corporate environment for deployment on many computers but can also be very useful in advanced home users who have to reinstall Windows XP frequently. This method is available for both Windows XP Home and Professional editions and is similar in Windows 2000 and Windows Server 2003. Windows Vista unattended installation uses quite different technologies and replaces winnt.sif with an autounattend.xml file.
An answer file is a text file with standard headings, keys and values to provide answers during Windows Setup which normally prompts the user to enter information. Thus it can partly or totally replace user interaction and make the installation partly or totally automatic.
The answer file unattend.txt can be renamed to have a more meaningful title (especially if you create different versions of the file). For single computer installation, leave it as unattend.txt for network installation. You can create the file from scratch using any text editor or modify an existing one.
For installation using a CD alone (when you do not have a floppy disc drive), rename the file to winnt.sif and replace the one in the distribution folder's i386 folder before burning to CD. An older method (when you do not wish to make a custom CD) is to save winnt.sif on a floppy disc and insert this during text mode phase of Windows Setup from a Windows XP CD. As far as I am aware, winnt.sif will not work on USB Flash disks. Someone said on the internet he could get USB floppy to work but I've not verified this myself.
Setup Manager is not installed by default in Windows XP. Install it from the Deploy.cab packaged file from the \Support\Tools folder in the Windows XP CD. Double-click on the Deploy.cab file to extract and install the contents (follow the prompts) to the \Program Files\Deploy folder.
There is a new version of Deploy.cab for Windows XP SP2 with some modifications. It can be downloaded from Microsoft downloads website (KB 838080). Use the correct version to match your Windows XP product and language version.
Read the deploy.chm and ref.chm for more details. This Deploy folder contains other files, notably sysprep.exe for Sysprep, which will be covered in another article. There is a sample answer file UNATTEND.TXT in the Windows XP CD's i386 folder and this will give you a good idea of what it looks like. You can modify it yourself but it would be easier to use the Setup Manager to create the file.
Double-click setupmgr.exe in the extracted Deploy folder to launch the Setup Manager Wizard.
1. The Welcome to Setup Manager window appears. Click Next.
2. In the New or Existing Answer File window, choose
3. In Type of Setup, choose Unattended setup.
4. In Product, choose
5. In User Interaction, choose Fully automated (fig. 1).
Fig. 1. User Interaction
6. In Distribution Share, choose:
7. In Location of Setup Files, choose:
8. In Distribution Share Location, browse or type the path of the share folder in Distribution share location and give it a share name in the Share as section.
9. In License Agreement, you must read and tick:
10. In Name and Organization, type the entries as appropriate.
11. In Display Settings, you can leave the default settings or click the Custom button to specify your needs (Colors, Screen area X, Y and Refresh frequency). Note that your settings must be supported by your hardware and display drivers. In VMWare guest, unless you install the VMWare display drivers during installation, it only will support 640x480 and ignore any higher resolution).
12. In Time Zone, choose the correct zone from the drop-down list. For manual editing some zone codes are:
85 = GMT;
13. In Product Key, type the 5x5 alphanumeric key with a "-" separating each of the group of five. The key must comply with licence agreement or match the key on the Certificate of Authenticity label.
14. In Computer Name, enter a name, or import from a list for more computers.
15. In Administrator Password, enter a password or you can leave it blank (not recommended). Remember this is the root Administrator account so it should have a password for security. There is an option to encrypt the password in the answer file. You can set an optional number of autologon counts but only when the password is unencrypted (fig. 2).
Fig. 2. Administrator Password.
16. In Networking Components, you can choose
17. In Workgroup or Domain, the choice is self-explanatory. Enter the details as required.
18. Telephony for dial-up area codes is optional and could be omitted.
19. Regional Settings can be customised or just use the default to match the language version of Windows XP. If you use the US English version you can customise it to use UK English, for example. You can further customise the language for numbers and currency (fig. 3).
Fig. 3. Custom Regional Settings.
20. In Languages, you can add another language group (fig. 4).
Fig. 4. Languages
If you wish to add more, you have to manually add the language locale ID in the answer file. If you do that, ensure you have the matching language group as well. This can get rather complicated say if you install an En US version of Windows XP but wish to use UK English and Traditional Chinese. The locale ID and input locale combinations must match and the first becomes the default. The following list gives some examples but are not exhaustive.
Locale ID and Input Locale combination for English:
The System Locale (for non-unicode programs), UserLocale (for formatting standards) and InputLocale (keyboard IMEs) entries are ignored if Language = 0409 (for example) is specified.
21. In Browser and Shell Settings, use default, or a script from Internet Explorer Administration Kit or customise your proxy settings and IE in home page and Favorites.
22. In Installation Folder, normally choose A folder named Windows unless you really want to change it.
23. in Install Printers, enter network printer names.
24. In Run Once you can add a command line, bat or cmd file to run the first time a user logs on after Setup. If you have added printer in the previous dialogue, Add printer will automatically be included under Run these commands.
25. In Additional Commands, you can add commands to run at the end of Setup.
This finishes all the prompts in Setup Manager for the answer file.
26. In Setup Manager window which appears again, enter the Path and file name for the answer file. If more than one computer is included, then a bat and udb file will be created as well.
A Uniqueness Database File (UDB) provides the ability to specify per-computer parameters. The UDB modifies an answer file by overriding values in the answer file. When you run Setup with WINNT32.EXE you use the /udf:id[,UDB_file] switch. The UDB overrides values in the answer file, and the identifier (id) determines which values in the .udb file are used. (quote from MCSE Exam 70-270 Microsoft Windows XP Professional Training Kit )
If you wish to use a floppy disc, then insert a floppy and type a:\winnt.sif, and then click OK. It will save winnt.sif and winnt.bat onto the floppy.
27. Next, a progress bar shows the progress with the message: Please wait while Setup Manager copies files to your computer.
28. The Completing Setup Manager window shows you the location of the answer file (and the bat and udf files when present). Click Cancel to close this final window. Go to the distribution folder to check that the contents including the answer file have been created successfully. Examine the answer file with Notepad.
This is an example of an answer file (with the product key and other details masked with #, x and y) created by Setup Manager and subsequently modified. The Windows Firewall section is new to SP2 and the Components section specifies which Windows components to install or not install. Here, you can leave out the games.
The minimum sections and entries for a fully automated unattended installation (except at the beginning of Setup, see below) are shown in blue. Not all the values need to be enclosed in quotes. Spacing is optional. The semicolon before a line donates comments only.
Under the [unattended] section if you add:
Repartition = yes
it will instruct "Windows Setup to remove all partitions on the first physical disk, and to create one partition that uses the NTFS file system on which to install Windows. This command deletes all data on the target hard disk" (KB 308662). Use this entry with caution.
Check carefully these entries under the [Data] section (KB 314459):
UnattendedInstall = "Yes" (must be set to "yes");
MSDosInitiated = No (must be set to "no" or Setup stops during the graphical portion)
AutoPartition = 1 (1 means the installation partition is automatically selected. If the value is set to 0, you are prompted for the installation partition during the text portion of Setup.)
The distribution share folder can be readily used for network installation on another computer, or burned to a CD (if a boot image is included to make it bootable) for installation on individual computers. Testing is strongly recommended to make sure the settings are correct and there is no error or interruption during setup.
When made into an iso image (using any suitable imaging tools; MSFN website has a download link for CDImage) it can be readily tested in Microsoft Virtual PC or VMWare Workstation as guest. The advantage of using Virtual PC or VMWare is that both can emulate the iso image as CD-ROM so avoiding the need to burn to a physical media first.
Note that an unattended installation with an answer file still prompts you at the beginning of Setup to press F6 to install any third party SCSI or RAID drivers but you can include them in the unattended installation. It will then prompt you which partition to install to but after you make your choice it will proceed without further prompting. If you choose to overwrite an existing Windows partition it will immediately start deleting files from this partition: so exercise caution during the initial stages of Setup.
If your distribution folder is incomplete (especially if you made an error in service pack integration) or when there are other hardware problems like CD-ROM read errors, missing files will stop the Setup at some stage with a Fatal Error message (which won't tell you which files are missing).
Creating an unattended installation, testing and modifying it is enormously valuable for learning this skill and prepares you for Sysprep, which will be the subject of another tutorial.
If you wish to include in your unattended installation the latest Windows XP service pack and hotfix (slipstreaming or integration), Windows Media Player, .Net Framework, third party drivers, software and other things, go to MSFN website for more detailed tutorials and forum discussions.
The process of creating an unattended installation is similar in Windows 2000 and Windows XP. The following provide additional useful information.
KB 308662 HOW TO: Use Setup Manager to create an answer file in Windows 2000
KB 136153 Using an Answer File for an Unattended Installation
KB 216300 Items That Can or Cannot Be Added During Unattended Upgrade Using Answer Files
KB 220838 How to Disable the Configure Server Wizard for Unattended Installations
KB 155197 How To Unattended Setup Parameters for Unattend.txt File
KB 314459 How to Perform an Unattended Installation of Windows from a CD-ROM
KB 224390 How to Automate Windows 2000 Setup and Domain Controller Setup
KB 226315 Computer Account Organizational Unit May Be Specified Using the Unattend.txt Utility
KB 216937 Windows 2000 System Preparation Tool and Answer File Usage
KB 314472 Quick Guide to Preinstalling Windows
The Microsoft Windows Team, Microsoft Windows XP Professional Resource Kit 2nd Edition (Redmond, Microsoft Press, 2003) (also available online from Microsoft website)
Microsoft Corporation, MCSA/MCSE Self-Paced Training Kit Microsoft WINDOWS 2000 SERVER Exam 70-215 2nd Edition (Redmond: Microsoft Press, 2003)
Microsoft Corporation, MCSE Exam 70-270 Microsoft Windows XP Professional Training Kit, (Redmond: Microsoft Press, 2002)
Glenn, Walter and Northrup, Tony, MCSA/MCSE Self-Paced Training Kit (Exam 70-270): Installing, Configuring, and Administering Microsoft® Windows® XP Professional, Second Edition (Redmond: Microsoft Press, 2005)
Go to TOP
Copyright © 2004-2007 by Kilian. All my articles including graphics are provided "as is" without warranties of any kind. I hereby disclaim all warranties with regard to the information provided. In no event shall I be liable for any damage of any kind whatsoever resulting from the information. The articles are provided in good faith and after some degree of verification but they may contain technical or typographical errors. Links to other web resources may be changed at any time and are beyond the control of the author. Articles may be added, removed, edited or improved at any time. No support is provided by the author.
This is not an official support page for any products mentioned. All the products mentioned are trademarks of their companies.
Created 27 Aug 2004; last updated 29 April 2007