This step-by-step article describes how to use the System Preparation tool (Sysprep.exe) to perform disk duplication. You can use the cloning process to use an image of a Windows 2000 installation with its installed programs and data, for mass deployment of exactly the same installations throughout your organization. One problem from duplicating an installation of Windows 2000 is that each cloned computer has the same security identifier (SID) and computer name. This may prevent the cloned computers from functioning correctly in a workgroup or a domain. To work around this problem, administrators use the System Preparation Tool (Sysprep.exe) to remove configuration settings that are unique to the computer such as the computer name and SID. The resulting image can then be safely reused for installation on other computers.How to Prepare Windows 2000 for Cloning
To prepare an installation of Windows 2000 for cloning:
- Install Windows 2000 on a sample computer. You can install Windows either interactively, or you can use an answer file to automate the process.
- Restart the computer, and then log on as Administrator.
- Install and customize all programs that you want to deploy with Windows 2000.
- Add local user accounts, join a domain, or do both.
- Review the configuration to verify that the computer contains all the required components, settings and data.
- Click Start, click Run, type cmd in the Open box, and then press ENTER.
- At the command prompt, type cd \, press ENTER, type md sysprep, and then press ENTER again.
- Insert the Windows 2000 Professional CD-ROM into the CD or DVD drive, type expand CD drive letter:\system\tools\deploy.cab –f:* c:\sysprep, and then press ENTER. Note that this command assumes that you created the Sysprep folder on drive C in step 7. If you put the folder on another drive, change the command.
- At the command prompt, type cd \sysprep, and then press ENTER.
- To run Sysprep.exe, type Sysprep /parameters, and then press ENTER. For a list of parameters, see the "Sysprep.exe Parameters" section of this article.
- Shut down the computer, remove the hard disk from the computer, and then clone it by using a third party disk-imaging process. Note that you shut down the computer automatically when you run Sysprep.exe by using the –reboot switch.
The next time you start Windows 2000 from a cloned disk or the original disk, the following events occur:
How to Create the Sysprep.inf Answer File
- Setupcl.exe starts, and then generates a new SID.
- The Mini-Setup Wizard starts to customize the new computer. If you do not provide the Sysprep.inf answer file, the wizard is run interactively.
To create the Sysprep.inf answer file, type setupmgr.exe
at the command prompt, and then press ENTER. Follow the on-screen instructions to complete the wizard. You can also use a text editor to either create a new answer file, or modify an existing one.
For a more information, view the Unattend.doc file in the Deploy.cab file in the Support\Tools folder on your Windows 2000 CD-ROM, or visit the following Microsoft Web site:Requirements
The following conditions must exist for you to run Sysprep.exe and use the Sysprep.inf answer file:
- The Sysprep.exe, Setupcl.exe and Sysprep.inf files must be located in the Sysprep folder. The Sysprep.inf file can reside on a floppy disk, but the file must still be named Sysprep.inf. When Mini-Setup starts, it looks at the floppy drive to see if a Sysprep.inf file is there. If the Sysprep.inf file is there, it copies it to the %windir%\System32 folder as $winnt$.inf. Any existing file of that name is overwritten.
- The Sysprep folder must reside in the root folder of the same volume where the Winnt folder is located.
- The file must be named Sysprep.inf. If the file is not named Sysprep.inf or is located elsewhere, Mini-Setup ignores it and runs in interactive mode. Note that if a required section of the answer file is missing, Mini-Setup reverts to interactive mode to collect the missing information.
Sysprep.exe accepts the following switches:
- /quiet - suppresses confirmation dialog messages that are typically displayed on the screen.
- /nosidgen - informs Setupcl.exe not to generate new SIDs on the restart, and then runs the Mini-Setup Wizard.
- /reboot - Automatically restarts the computer.
- /pnp - forces Mini-Setup to re-run the full PnP device enumeration the next time the computer is started. This mode increases the time that is required for mini-Setup and enables the use of the OemPnPDriversPath key in the Sysprep.inf file.
Before the computer is shut down, Sysprep.exe performs the following tasks:
- Adds the
CloneTag value to the
HKEY_LOCAL_MACHINE\SYSTEM\Setup key that states the time and date that Sysprep.exe ran.
- Adds the
CmdLine value to the
HKEY_LOCAL_MACHINE\SYSTEM\Setup key. This "setup-newsetup-mini" value starts Mini-Setup when the computer restarts, and then changes the
SystemSetupInProgress value to
- Makes sure that the Setupcl.exe file is in the %systemroot%\System32 folder. If the file is not present, it looks for the file in the local folder, and then copies it to the %systemroot%\System32 folder. If the file is not found, Sysprep.exe displays an error message, and then quits.
- Places a command in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager -
- The [SysprepMassStorage] section of the Sysprep.inf file is processed to establish what drivers must be enabled in the system registry.
- Sysprep.inf is copied to the WINNT\System32\$winnt$.inf file so the file can be located if other components need any information from the Sysprep.inf file. For example, if you want to promote the computer to a domain controller, you can include the [DCInstall] section.
For more information about unattended promotion and demotion of Windows 2000 domain controllers, click the following article number to view the article in the Microsoft Knowledge Base:
Unattended promotion and demotion of Windows 2000 and Windows Server 2003 domain controllers
The Sysprep folder is deleted at the end of Mini-Setup. Sysprep.exe can also perform other tasks before the computer is shut-down. To make it possible for Sysprep to work with components that are already installed, a Minioc.inf file is put in the %windir%\Inf folder. This file references component-specific dynamic link libraries (DLLs) that perform the necessary tasks to prepare components for duplication. When Sysprep.exe runs, it opens the %windir%\Inf\Miniproc.inf file, and then processes the [SysprepBeforeExecute] section. When a cloned computer starts, Mini-Setup opens the Minioc.inf file, and then processes the [SysprepInitExecute] section.
The Sysprep folder may also contain the Provider.inf file. This file is used by third-party component providers to make sure that their components can be cloned by using Sysprep.exe. Format of the Sysprep.inf file.
The format of the Sysprep.inf file follows the same format as the format of the Unattend.txt file that is used in automating the installation of Windows 2000. However, only the following sections and parameters are supported: [Unattended]
- InstallFilesPath - This is a pointer to the installation sources for additional drivers that are not supplied on the Windows 2000 CD-ROM. This is useful if Regional Settings parameters are being specified.
- KeepPageFile - Instructs Sysprep.exe to either keep the current pagefile or regenerate a new one.
• All keys (Logo and Background)[GuiUnattended]
- OEMDuplicatorString - This is an answer-file parameter whose value is a string that contains a description of the duplication tool that is used and any other information an OEM or administrator wants to store in the registry. The value can have a maximum of 255 characters and is stored in
All keys are supported [LicenseFilePrintData]
• All keys are supported [GuiRunOnce][Display]
• All keys are supported[RegionalSettings]
• All keys are supported if the files are available on the computer hard disk. If regional settings are specified, you can refer to the location of the files by using the InstallFilesPath
key in the [Unattended] section.[Networking]
• Only the installation of the default components are supported. The section only needs to exist in the Sysprep.inf file. Note that the installDefaultComponents
values do not work, it always assumes "yes." [Identification]
• All keys are supported[NetClients]
• All keys for Client Services for Microsoft Networks and Client Services for NetWare are supported.[TapiLocation]
• All keys are supported. The values are valid only if the computer has a modem. For additional references, review the Microsoft Windows 2000 OEM Preinstallation Kit OPK users Guide.
For additional information about Sysprep, click the following article numbers to view the articles in the Microsoft Knowledge Base:
Windows 2000 System Preparation Tool and Answer File Usage
Best Practices for Using Sysprep with NTFS Volumes
How to Identify an Installation Created with the Sysprep Tool
Using the System Preparation Tool on Dissimilar Computers
How to Use Cmdlines.txt File During Sysprep.exe Setup Wizard
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.