Choosing Sysprep Settings

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Sysprep prepares a master installation for disk imaging. You can run Sysprep at the command line or within the Windows graphical user interface. You need to put the Sysprep files in the Sysprep folder on each of your master installations or on a floppy disk.

Running Sysprep

You run Sysprep just before you create a disk image of a master installation. This ensures that any changes Sysprep makes are present on the disk image, which in turn ensures that the changes are present on every destination computer onto which you copy the disk image.

When you run Sysprep without specifying any parameters, Sysprep:

  • Searches for Sysprep.inf, and, if the file is found, temporarily stores the path to Sysprep.inf in the registry.

  • Determines whether a master computer is a member of a domain, and, if it is, removes the master computer from the domain.

  • Copies Setupcl.exe to systemroot\System32, and then runs Setupcl.exe, which resets SIDs.

  • Removes all network adapters (except legacy network adapters), which removes all network settings such as DNS and IP configuration settings.

  • Configures the registry so that Mini-Setup runs the next time a destination computer is started.

  • Issues a shutdown command so a disk image of the master installation can be created.

You can run Sysprep on a master installation without specifying any parameters if:

  • You do not want to perform any auditing or testing after a disk image is copied onto a destination computer and before it is delivered to an end user.

  • You are not performing automated installation and configuration tasks by using a Winbom.ini file.

  • You do not want to install or configure software, device drivers, or system components after a disk image is copied onto a destination computer and before it is delivered to an end user.

  • You do not need to enumerate non–Plug and Play devices the first time a destination computer starts.

  • Your master computer shuts down properly after you run Sysprep. Some computers do not shut down after you run Sysprep; if this is the case, you must use the -forceshutdown parameter with Sysprep.

  • You do not want to reset the grace period for Windows Product Activation, nor clear the critical devices database, nor run Sysprep without generating new SIDs.

If you cannot run Sysprep with its default settings, you need to specify optional parameters. You can use the following guidelines to help you configure Sysprep.

Using the -activated parameter

Use the -activated parameter if you activate your destination computers in Factory mode. For more information about Windows Product Activation and Sysprep, see article Q299840, "How to Use Sysprep with Windows Product Activation or Volume License Media to Deploy Windows XP," in the Microsoft Knowledge Base. To find this article, see the Microsoft Knowledge Base link on the Web Resources page at https://www.microsoft.com/windows/reskits/webresources. The -activated parameter is not applicable if you have a volume license.

Using the -audit parameter

Use the -audit parameter to audit or test a computer in Factory mode. If you use this parameter, you must clear the event logs and delete all files that you created while you were auditing or testing. You cannot use the -audit parameter with any other Sysprep parameters.

Using the -bmsd parameter

Use the -bmsd parameter to populate the [SysprepMassStorage] section of Sysprep.inf with the Plug and Play IDs of mass-storage devices specified in Machine.inf, Scsi.inf, Pnpscsi.inf, and Mshdc.inf. Sysprep only builds the list of mass-storage devices; it does not install these devices in the critical device database or complete any other processing.

You can only use this parameter if the [SysprepMassStorage] section exists in Sysprep.inf, but does not contain any entries. You do not need to add the BuildMassStorageSection parameter to the [Sysprep] section in Sysprep.inf when you use the -bmsd parameter. In addition, you cannot use the -bmsd parameter with any other Sysprep parameters.

Using the -clean parameter

Use the -clean parameter to delete device drivers for mass storage controllers that are loaded but not physically present on a computer. You can only use the -clean parameter if you used the [SysprepMassStorage] section in Sysprep.inf and the -bmsd parameter to load device drivers for mass storage controllers. You typically run Sysprep with the -clean parameter in a Cmdlines.txt file. You cannot use the -clean parameter with any other Sysprep parameters.

Using the -factory parameter

Use the -factory parameter to perform installation and configuration tasks — such as installing, configuring, auditing, or testing software and system components — before you prepare a computer for delivery to an end user. You must run Sysprep again on the destination computer when you are finished performing installation and configuration tasks in Factory mode. To do this, use the Reseal and ResealMode entries in the [Factory] section of Winbom.ini.

Using the -forceshutdown parameter

Use the -forceshutdown parameter if a computer with an ACPI BIOS does not shut down after you run Sysprep.

Using the -noreboot parameter

Use the -noreboot parameter to test installation and configuration changes in a nonproduction environment. When you run Sysprep with this parameter, Sysprep performs all tasks without shutting down or restarting the computer.

Using the -nosidgen parameter

Use the -nosidgen parameter if you are not duplicating the computer on which you are running Sysprep.

Using the -pnp parameter

Use the -pnp parameter only if legacy (non–Plug and Play) hardware is not being detected properly. The -pnp parameter can only be used to install legacy hardware, such as COM ports, and cannot be used to install unsigned device drivers. In addition, a destination computer can take up to 20 minutes to start when you use the -pnp parameter. This is because the -pnp parameter forces a computer to enumerate every device.

Using the -quiet parameter

Use the -quiet parameter to run Sysprep without displaying onscreen confirmation messages. This is useful if you are automating Sysprep. For example, if you plan to run Sysprep immediately following an unattended Setup, add sysprep -quiet to the [GuiRunOnce] section of the Unattend.txt file.

Using the -reboot parameter

Use the -reboot parameter to force a computer to automatically reboot and then start Mini-Setup, or Factory mode, as specified. This is useful when you want to audit the system and verify that the first-run experience is operating correctly.

Using the -reseal parameter

Use the -reseal parameter to prepare a destination computer for final delivery to an end user after you have performed installation and configuration tasks in Factory mode. This parameter clears the Event Viewer logs and configures the registry so that Mini-Setup is set to start at the next boot. If you run the command sysprep -factory, you must seal the installation as the last step in your preinstallation process, either by running the command sysprep -reseal or by clicking the Reseal button in the Sysprep dialog box.

For more information about Sysprep parameters, see the Microsoft Windows Corporate Deployment Tools User’s Guide (Deploy.chm). Deploy.chm is included in the Deploy.cab file in the Support folder on the Windows Server 2003 operating system CD.