This step-by-step article describes how to use the System
Preparation Tool (Sysprep) to automate the successful deployment of Microsoft
Windows XP. Sysprep is a tool that is designed for system administrators,
Original Equipment Manufacturers (OEMs), and others who must automatically
deploy the Windows XP operating system on multiple computers. After you perform
the initial setup steps on a single computer, you can run the Sysprep tool to
prepare the sample computer for cloning.
Before you can use the Sysprep tool, your computer hardware and
related devices must meet the following requirements:
The reference and destination computers must have
compatible HALs. For example, Advanced Programmable Interrupt Controller
(APIC)–based MPS (multiprocessor systems) must use the same APIC HAL. A
standard HAL Programmable Interrupt Controller (PIC)–based system is not
compatible with either the APIC HAL or the MPS HAL.
The reference and destination computers must have the same
Advanced Configuration and Power Interface (ACPI) support.
The Plug-and-Play devices on the reference and destination
computers, such as modems, sound cards, network adapters, and video cards, do
not have to be from the same manufacturer. However, the drivers for these
devices must be available.
Third-party disk-imaging software or disk-duplicating
hardware devices are required. These products create binary images of a
computer's hard disk and either duplicate the image to another hard disk or
store the image in a file on a separate disk.
The size of the hard disk on the destination computer must
be at least the same size as the hard disk on the reference computer. If the
destination computer has a larger hard disk, the difference is not included in
the primary partition. However, you can use the ExtendOemPartition key in the
Sysprep.inf file to extend the primary partition if it was formatted by using
the NTFS file system.
Prepare a reference computer for Sysprep deployment
To prepare a reference computer for Sysprep deployment in Windows
XP, follow these steps:
On a reference computer, install the operating system and
any programs that you want installed on your destination computers.
Click Start, click Run,
type cmd, and then click OK.
At the command prompt, change to the root folder of drive
C, and then type md Sysprep.
Insert the Windows XP operating system CD into the
appropriate CD-ROM or DVD-ROM drive, and then open the Deploy.cab file in the
Note To make sure that you are using the correct version of the Deploy.cab file for your service pack, use the Deploy.cab file that is distributed with that service pack. Visit the following Microsoft Web site to download the correct version for your service pack:
Copy the Sysprep.exe file and the Setupcl.exe file to the
Note If you use the Sysprep.inf file, copy this file to the Sysprep
folder also. For the Sysprep tool to function correctly, the Sysprep.exe file,
the Setupcl.exe file, and the Sysprep.inf file must all be in the same folder.
Remove the Windows XP operating system CD.
At the command prompt, type cd
Sysprep to change to the Sysprep folder.
To run the Sysprep tool, type the following command at the
Sysprep /optional parameter
Note For a list of parameters, see the "Sysprep parameters"
If you run the Sysprep.exe file from the
%systemdrive%\Sysprep folder, the Sysprep.exe file removes the whole folder and
the contents of the folder after it finishes.
Microsoft recommends that after you run the Sysprep.exe
file on a reference computer, isolate the reference computer from the local
network where the image will be subsequently deployed to avoid any NetBIOS
conflicts. This permits the Sysprep tool to complete the Setup program, join
the domain that is specified, and use the new computer name that is specified
in the Sysprep.inf answer file.
Create the Sysprep.inf answer file
The Sysprep.inf answer file is a text file that scripts the
answers for a series of graphical user interface (GUI) dialog boxes. To create
a Sysprep.inf answer file that is used by the Sysprep tool, you can use a text
editor or you can use the Setup Manager tool that is included on the Windows XP
CD and is also included with the Microsoft Windows XP Resource Kit. The answer
file must be renamed to Sysprep.inf, and must reside in the Sysprep folder in
the root of the drive where Windows XP is installed, or these files can reside
on a floppy disk. If the Sysprep folder is named differently, the Setup program
ignores it. There is not a parameter for specifying the Mini-Setup Wizard
Sysprep.inf answer file format and parameters
The Sysprep.inf answer file format and parameters are the
same as the Unattended.txt file for Windows XP, but only the following sections
and parameters are supported:
[UserData] Supports the same set of entries as the Unattend.txt
file. [LicenseFilePrintData] Supports the same set of entries as the Unattend.txt
file. [GuiRunOnce] Supports the same set of entries as the Unattend.txt
file. [Display] Supports the same set of entries as the Unattend.txt
file. [RegionalSettings] Supports the same set of entries as the Unattend.txt
file. [Networking] Supports the same set of entries as the Unattend.txt
file. [Identification] Supports the same set of entries as the Unattend.txt
file. [TapiLocation] [Sysprep] Automatically generates the entries in the
[SysprepMassStorage] section. [SysprepMassStorage] Allows you to use the same image on computers with different
Use the Setup Manager tool to create the Sysprep.inf answer file
To install the Setup Manager tool and to create an answer file,
follow these steps:
Open My Computer, and then open the Support\Tools folder on
the Windows XP CD.
Double-click the Deploy.cab file to open
On the Edit menu, click Select
On the Edit menu, click Copy To
Click Make New Folder.
name that you want for the Setup Manager folder, and then press ENTER. For
example, type setup manager, and then press ENTER.
Open the new folder that you created, and then double-click
the Setupmgr.exe file. The Windows Setup Manager Wizard
Follow the instructions in the wizard to create an answer
For additional information
about how to create an answer file, click the following article number to view
the article in the Microsoft Knowledge Base:
HOW TO: Use Setup Manager to create an answer file in Windows 2000
You can use the following optional parameters with the Sysprep
command in Windows XP:
-activated - Do not reset the grace period for Windows product activation.
Use this parameter only if you have activated the Windows installation in the
Important The product key that you use to activate the Windows installation
must match the product key that is located on the COA sticker that is attached
to that particular computer.
-audit - Restarts the computer in Factory mode without having to
generate new security IDs (SIDs) or process any items in the [OEMRunOnce]
section of the Winbom.ini file. Use this command-line parameter only if the
computer is already in Factory mode.
-bmsd - Populates all the available mass storage devices in the
-clean - Clears the critical devices database that is used by the
[SysprepMassStorage] section in the Sysprep.inf file.
-factory - Restarts in a network-enabled state without displaying Windows
Welcome or mini-Setup. This parameter is useful for updating drivers, running
Plug and Play enumeration, installing programs, testing, configuring the
computer with customer data, or making other configuration changes in your
factory environment. For companies that use disk imaging (or cloning) software,
Factory mode can reduce the number of images that are required.
all the tasks in Factory mode are complete, run the Sysprep.exe file by using
the -reseal parameter to prepare the computer for end-user delivery.
-forceshutdown - Shuts down the computer after the Sysprep.exe file
Note Use this parameter with computers that have an ACPI BIOS that do
not shut down correctly with the default behavior of the Sysprep.exe file.
-mini - Configures Microsoft Windows XP Professional to use Mini-Setup
instead of Windows Welcome. This parameter does not affect Microsoft Windows XP
Home Edition, where the first-run experience is always Windows
Note that if you plan to use the Sysprep.inf file to automate
Mini-Setup, you must either run the Sysprep tool by using the -mini switch, or click to select the MiniSetup check
box in the GUI interface. By default, if you do not choose to run Mini-Setup,
Windows XP Professional runs the Windows Welcome.
-noreboot - Modifies registry entries (SID, OemDuplicatorString, and other
registry entries) without the computer restarting or preparing for duplication.
This parameter is mainly used for testing, specifically to see if the registry
is modified correctly. Microsoft does not recommend this option because making
changes to a computer after the Sysprep.exe file has run may invalidate the
preparation that was completed by the Sysprep.exe file. Do not use this
parameter in a production environment.
-nosidgen - Runs the Sysprep.exe file without generating new SIDs. You must
use this parameter if you are not duplicating the computer where you are
running the Sysprep.exe file or if you are preinstalling domain
-pnp - Runs the full Plug and Play device enumeration and installation
of previous devices during Mini-Setup. This command-line parameter has no
effect if the first-run experience is Windows Welcome.
Use the -pnp command-line parameter only when you must detect and install
previous, non-Plug and Play devices. Do not use the sysprep -pnp command-line parameter on computers that only use Plug and Play
devices. Otherwise, you will increase the time that it takes for the first-run
experience without providing any additional benefit to the user.
Note When unsigned drivers are unavoidable, use the UpdateInstalledDrivers=yes parameter in conjunction with OemPnPDriversPath= and DriverSigningPolicy=ignore instead of the -pnp command-line parameter to provide a more seamless
-quiet - Runs the Sysprep.exe file without displaying onscreen
confirmation messages. This is useful if you are automating the Sysprep.exe
file. For example, if you plan to run the Sysprep.exe file immediately after
the unattended Setup program finishes, add the sysprep -quiet command to the [GuiRunOnce] section of the Unattend.txt
-reboot - Forces the computer to automatically restart, and then starts
Windows Welcome Mini-Setup, or Factory mode, as specified. This is useful when
you want to audit the computer and verify that the first-run experience is
-reseal - Clears the Event Viewer logs and prepares the computer for
delivery to the customer. Windows Welcome or Mini-Setup is set to start the
next time that the computer restarts. If you run the sysprep -factory command, you must seal the installation as the last step in your
preinstallation process. To do this, run the sysprep -reseal command or click the Reseal button in the
Sysprep dialog box.