How Sysprep Works (original) (raw)

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

How Sysprep Works

In this section

The System Preparation tool (Sysprep) is a technology that you can use when performing an image-based installation. Image-based installation is a method of copying or cloning preconfigured operating systems and software applications onto destination computers. Image-based installation is the fastest method of installing an operating system and applications, and is typically used during large-scale rollouts when it would be too slow and costly to have administrators or technicians interactively install the operating system on individual computers.

These sections provide an in-depth view of how Sysprep works in an optimal environment. An optimal environment for Syprep contains the following:

Sysprep Architecture

Sysprep relies on several components, including three executable programs and several answer files. How these components interact with each other at the various stages of an image-based installation is illustrated in the following figure.

Sysprep Architecture

Sysprep Architecture

The Sysprep tool consists of three components: Sysprep.exe, Setupcl.exe, and Factory.exe. These components run on both the master computer — the computer on which you are creating your master installation — and the destination computer — the computer on which you are installing a disk image. The answer files (Cmdlines.txt, Sysprep.inf, and Winbom.ini) are created on a technician or administrator computer, and are used on the master computer and the destination computer when Sysprep and its associated components run. The disk imaging tool runs on the master computer, where it is used to create a disk image, and on the destination computer, where it is used to copy a disk image from a CD or a remote server onto the destination computer’s hard disk.

The following are components used in an image-based installation with Sysprep.

Cmdlines.txt

A configurable text file that you use to perform installation and configuration tasks at the end of the Mini-Setup stage. Cmdlines.txt contains a list of commands that run synchronously after the Mini-Setup stage finishes, but before a computer restarts.

Destination computer

Computer on which you are installing an operating system. For image-based installations, this is the computer to which you are copying a disk image. During a large-scale rollout, there can be typically hundreds or thousands of destination computers.

Disk image

Functionally identical replica of a hard disk that can be copied onto multiple computers. You need a disk imaging tool to create a disk image.

Disk-imaging tool

Program that creates and manages disk images. You use the disk-imaging tool on the master computer to create a disk image and save the disk image to a CD, DVD, or a remote server. You use the disk-imaging tool on the destination computer to copy the disk image from a CD, DVD, or remote server to the destination computer’s hard drive. You can purchase a non-Microsoft disk-imaging program to perform an image-based installation with Sysprep, but you can also use ADS.

Distribution server

Computer that contains the disk images you want to copy onto destination computers.

Factory.exe

Sysprep component that controls the Factory-mode stage of an image-based installation with Sysprep. You can configure Sysprep so that a destination computer starts in Factory mode. Factory mode puts a destination computer into a network-enabled state that allows you to perform installation and configuration tasks before you prepare the destination computer for final delivery to a user. Factory.exe must exist in the same folder on the master computer as Setupcl.exe and Sysprep.exe, which is typically the _systemdrive_\Sysprep folder.

Master computer

Computer from which a disk image is derived. A master computer contains a master installation, which is the system disk on which you have installed and configured the operating system and software applications that you want to install onto the destination computers in your organization.

Mini-Setup

A wizard that is a subset of Setup. Mini-Setup runs automatically after a disk image is copied to a destination computer and the destination computer is started. Mini-Setup provides prompts for user-specific information, configures operating system settings, and detects new hardware. You can automate the Mini-Setup stage by using Sysprep.inf.

Registry

Repository where Sysprep stores configuration and setup information prior to the disk imaging process. Sysprep reads the configuration and setup information from this repository the first time a destination computer starts after delivery to a user.

Setupcl.exe

Sysprep component that resets security identifiers (SIDs) on the master computer prior to running a disk imaging tool and creating a disk image of the master computer’s system disk. Setupcl.exe can also run at the end of the Factory-mode stage if you run Sysprep with the Factory mode option. Setupcl.exe must exist in the same folder on the master computer as Factory.exe and Sysprep.exe, which is typically the _systemdrive_\Sysprep folder.

Setup Manager

Deployment tool that creates a basic Sysprep.inf answer file. You use Setup Manager on the administrator or technician computer, and then transfer the answer file to the master computer prior to creating the disk image.

Sysprep.exe

Primary Sysprep component. You run Sysprep.exe on the master computer prior to running a disk-imaging tool to create a disk image. Sysprep.exe also runs automatically after you copy a disk image to a destination computer and then start the destination computer for the first time. Sysprep.exe can be run from the command line or it can be run in the Windows graphical user interface (GUI). Sysprep.exe must exist in the same folder on the master computer as Setupcl.exe and Factory.exe, which is typically the _systemdrive_\Sysprep folder.

Sysprep.inf

An answer file that can be used to automate the Mini-Setup stage.

Syssetup.dll

Dynamic-link library that performs installation and configuration tasks during the Factory mode stage and the Mini-Setup stage of an image-based installation with Sysprep.

Technician computer

Computer used by an administrator or technician to use Setup Manager or Notepad to create and modify answer files, such as Sysprep.inf and Winbom.ini.

Winbom.ini

An answer file that you can use to automate installation tasks when a computer is started in Factory mode. Factory mode is useful for updating drivers, running Plug and Play enumeration, installing applications, testing, configuring the computer with customer data, or making other configuration changes before you deliver a computer to an end user.

Winlogon.exe

A component of the Windows operating system that provides interactive logon support. Winlogon is designed around an interactive logon model that consists of three components: the Winlogon executable, a Graphical Identification and Authentication dynamic-link library (DLL) referred to as the GINA, and many network providers.

Sysprep Physical Structures

The structures of two files are essential to an image-based installation with Sysprep: the Sysprep.inf answer file, which automates the Mini-Setup stage of an image-based installation, and the Winbom.ini answer file, which automates the Factory-mode stage of an image-based installation. You can create the Sysprep.inf answer file by using Setup Manager (Setupmgr.exe) or you can create it manually by using a text editor, such as Notepad. You must create the Winbom.ini answer file manually by using a text editor, such as Notepad.

As with most answer files, Sysprep.inf and Winbom.ini contain multiple predefined sections — some mandatory and some optional — that you can modify. Section names are always enclosed in square brackets (for example, [Unattended]).

Every section has one or more entries that contain installation and configuration information. Entries are usually composed of an entry name, an equal sign, and a value (for example, ComputerName = Computer1). The entry name represents a specific computer setting or action; the value represents the unique way you want the setting configured or the action performed. In some cases, entries do not have an entry name. In these cases, a value or a list of values (usually commands) appear in the answer file below a section name. The following example shows a section that contains only values and does not have entry names.

[GUIRunOnce]
dcpromo /answer:a:\installdc.txt
%systemroot%\cluster\cluster.exe

Use the following guidelines when you create or modify an answer file:

Note

Sysprep.inf Structure

You can use Sysprep.inf to automate the Mini-Setup stage of an image-based installation. This corresponds to the final stage, or GUI-mode stage, of an interactive setup. The following table lists all of the valid sections that can appear in a Sysprep.inf file.

Answer File Sections for Sysprep.inf

Section Description
[_adapter_specific_protocol_section_] Contains an entry for specifying a network component. Used in conjunction with the [Networking] section.
[Display] Contains entries for specifying display settings for graphics devices.
[GuiRunOnce] Contains commands to run the first time a user logs on to the computer after the Mini-Setup stage completes and the destination computer restarts.
[GuiUnattended] Contains entries for configuring the way the Mini-Setup stage runs as well as time and date settings. .
[Identification] Contains entries for specifying the network identification of a computer. If these entries are not present, Setup adds the computer to the default workgroup. If there is not enough information for this entry, Setup prompts the user to provide this information.
[IEHardening] Contains entries for configuring Web content zones.
[LicenseFilePrintData] Contains entries for installing licensing information for Windows Server 2003.
[_MS_AppleTalk parameters_] Contains entries for configuring AppleTalk.
[_MS_ATMArps parameters_] Contains no entries.
[_MS_ATMLANE parameters_] Contains no entries.
[_MS_ATMUni parameters_] Contains no entries.
[_MS_L2TP parameters_] Contains entries for the Layer 2 Tunneling Protocol (L2TP).
[_MS_MSClient parameters_] Contains entries for Client for Microsoft Networks.
[_MS_NetMon parameters_] Contains no entries.
[_MS_NWClient parameters_] Contains entries for Client Service for NetWare.
[_MS_NWIPX parameters_] Contains entries for the Internetwork Packet Exchange (IPX) protocol. Its parameters are network adapter–independent.
[_MS_NwSapAgent parameters_] Contains no entries.
[_MS_PPTP parameters_] Contains entries for the Point-to-Point Tunneling Protocol (PPTP).
[_MS_Psched parameters_] Contains no entries.
[_MS_RAS parameters_] Contains entries for the Routing and Remote Access service.
[_MS_RasSrv parameters_] Contains entries for the Routing and Remote Access service for remote access servers.
[_MS_Server parameters_] Contains entries for the File and Print Service.
[_MS_TCPIP parameters_] Contains entries for configuring the TCP/IP protocol.
[_MS_WLBS parameters_] Contains parameters for configuring Network Load Balancing (formerly, Windows Load Balancing Service, or WLBS) and binding Network Load Balancing to multiple network adapters.
[NetAdapters] Contains entries that specify network adapters.
[NetBindings] Contains entries for disabling, enabling, and demoting binding rules for network components such as services, protocols, and adapters.
[NetClients] Contains an entry for specifying the network clients to install.
[NetOptionalComponents] Contains entries for installing optional network components.
[NetProtocols] Contains an entry for installing the network protocols.
[NetServices] Contains entries for installing network services.
[Networking] Contains no entries. However, to configure network protocols, you must include the [Networking] section name in your answer file.
[_params.adapter_instance_] Contains entries for specifying an adapter’s instance on a computer.
[_protocol_parameters_section_] Contains an entry for specifying network protocol parameters that are also specified in the [NetProtocols] section.
[RegionalSettings] Contains entries for installing regional options during the setup process.
[Sysprep] Contains an entry for automatically generating the entries in the pre-existing [SysprepMassStorage] section and then installing those mass-storage controllers.
[SysprepMassStorage] Contains entries for identifying the different mass-storage controllers that you want to install on each destination computer.
[TapiLocation] Contains entries for specifying the telephony API (TAPI). It is valid only if a modem is present on the computer.
[Unattended] Contains entries that control the Mini-Setup stage.
[UserData] Contains entries for specifying user settings during the setup process.

You do not need to add every possible section and entry to the Sysprep.inf file. Most sections and entries are optional, and Mini-Setup ignores optional sections and entries that are not present in the answer file.

If you want to fully automate the Mini-Setup stage, you must configure the following sections and entries in Sysprep.inf. If you do not provide values for these entries in Sysprep.inf, a prompt will appear during the Mini-Setup stage asking for the values.

[GuiUnattended]

You must provide values for the AdminPassword, EncryptedAdminPassword, and TimeZone entries. The value for AdminPassword cannot begin with an asterisk (*). Using a password that begins with an asterisk can cause the password to be set to a null value, which can be a security risk. You must also include the following entries and values: OEMSkipWelcome = 1 and OEMSkipRegional = 1.

[Identification]

You must specify values for either the JoinWorkgroup entry or the JoinDomain entry. If you choose the latter, you must also provide values for the DomainAdmin and DomainAdminPassword entries. However, if you are concerned about security you might want to leave the DomainAdminPassword blank because this entry cannot be encrypted in the answer file. If you leave the DomainAdminPassword entry blank, you will be prompted for the password during the Mini-Setup stage.

[LicenseFilePrintData]

You must specify values for the AutoMode and AutoUsers entries if you are installing Windows Server 2003. This section does not apply to Windows XP.

[Networking]

At a minimum you must set InstallDefaultComponents=Yes.

[Unattended]

You must accept the End User License Agreement (EULA) by setting OEMSkipEula = Yes. You must also provide a value for the InstallFilesPath entry, which specifies the location of any files that are necessary during the Mini-Setup stage, such as language files.

[UserData]

You must specify values for the ComputerName, FullName, and OrgName entries. You must also specify a value for the ProductKey entry.

Winbom.ini Structure

You can use Winbom.ini to automate the Factory-mode stage of an image-based installation with Sysprep. The following table lists all of the valid sections that can appear in a Winbom.ini file.

Answer File Sections for Winbom.ini

Section Description
[Components] Contains entries for installing the components of Windows XP Professional and Windows Server 2003.
[ComputerSettings] Contains entries for configuring user settings on the destination computer.
[DesktopShortcutsFolder] Contains an entry for specifying a shortcuts folder on the desktop.
[DiskConfig] Contains entries for configuring and partitioning one or more physical hard disks when Factory.exe runs in the Windows Preinstallation Environment (Windows PE)
[description.config] Contains entries for configuring partitions located on a physical disk.
[Factory] Contains entries for managing the actions of Factory.exe.
[NetCards] Contains an entry for configuring the network adapter on the destination computer, if Setup requires a network connection.
[OEMLink] Contains entries for adding graphics and text to the Start menu so that users have easy access to an OEM’s customized folder, .htm file, or .exe file for a tour.
[OEMRun] Enables you to run external applications and command-line scripts when auditing the computer in Factory mode, by using the Sysprep -factory command.
[OEMRunOnce] Enables you to control how and when external applications and command shell scripts run when auditing the computer in Factory mode, by using the Sysprep -factory command.
[_section_name_] Contains entries for configuring the preinstallation of applications during the Factory-mode stage of Sysprep. This section can be used only with the [OEMRunOnce] section.
[PnPDrivers] Lists all the updated drivers to copy onto the destination computer.
[PnPDriverUpdate] Contains entries for specifying optional user credentials and a source location of drivers to place on an installed image.
[SetupHomenet] Contains an entry for setting up a firewall on a computer with a preconfigured Internet connection.
[Shell] Contains entries for specifying the visual style of the user interface.
[StartMenuMFUList] Contains entries for installing shortcut links in the Start menu.
[UpdateSystem] Contains entries, called directives, for performing registry or file system updates.
[UserAccounts] Contains entries for controlling the creation of user accounts on the destination computer.
[UserDefined] Contains branding information or any other data that other processes might need to access.
[WinPE] Contains entries for identifying the configuration set and Windows operating system that you install.
[WinPE.Net] Contains entries for controlling the settings that Windows Preinstallation Environment (Windows PE) uses to connect to a network.

You do not need to add every possible section and entry to the Winbom.ini file. All sections and entries are optional, and Factory.exe ignores optional sections and entries that are not present in the answer file.

For more information about answer file sections, including descriptions and examples of entries and values, see “Sysprep Tools and Settings”.

Sysprep Processes and Interactions

Sysprep configures various operating system settings on the master computer to ensure that every copy of the master computer’s disk image is unique when you distribute it to a destination computer. Specifically, Sysprep configures a master installation (and hence, the disk image of that master installation) so that a unique computer security identifier (SID) is generated on each destination computer. A SID is a variable length data structure that identifies a user, a group, or a computer. Internal processes in Windows refer to the SID instead of the computer name or user name or group name. Sysprep resets SIDs by running Setupcl.exe, which is a Sysprep component.

You can also use Sysprep to configure the master computer’s disk image so that every destination computer starts in a special setup mode known as Mini-Setup. Mini-Setup is the first-run experience on Windows Server 2003 and Windows XP, however, you can also configure Sysprep so that Windows Welcome is the first-run experience on Windows XP.

After you copy a disk image onto a destination computer, Mini-Setup runs the first time you start the destination computer. Mini-Setup provides the administrator, technician, or user the opportunity to configure operating system settings that are unique to the user or the computer. For example, computer name, regional options, time zone, and display settings. The Mini-Setup stage is a shortened version of the final stage of an interactive setup.

You can also use Sysprep to configure the master computer’s disk image so that every destination computer starts in a special intermediate setup mode known as Factory mode. Factory mode is controlled by Factory.exe and is commonly used in a manufacturing environment where every computer requires some customization prior to final delivery; however, it is also useful for some corporate deployments. You can use Factory mode if you want to customize individual computers or groups of computers after you have copied a disk image onto a destination computer but before Mini-Setup runs. For example, Factory mode gives you the ability to update drivers, run Plug and Play enumeration, install applications, test hardware and software, and configure computer settings. Factory mode is an extension of Mini-Setup and encompasses many of the same installation and configuration tasks as the final (GUI-mode) stage of an interactive setup.

In addition to preparing a master computer for disk duplication, you can configure Sysprep so that the Mini-Setup and Factory-mode stages are automated. You use an answer file known as Sysprep.inf to automate the Mini-Setup stage of an image-based installation; you use an answer file known as Winbom.ini to automate the Factory-mode stage of an image-based installation. You can also use an answer file known as Cmdlines.txt to automate installation and configuration tasks at the end of the Mini-Setup stage. Cmdlines.txt does not contain any predefined, structured entries like Sysprep.inf and Winbom.ini. Instead, Cmdlines.txt contains command-line instructions similar to a batch file. You can use Cmdlines.txt to perform customized installation and configuration tasks such as installing software programs and running command-line programs.

This section describes the primary processes and interactions that occur when you:

This section does not discuss all of the processes and interactions that occur during an image-based installation: this section discusses only the processes and interactions that occur when you run the Sysprep tool. For example, the disk-imaging process and the image-copying process are not discussed in this section because these processes vary according to the disk-imaging program that you use.

Tasks Performed by Sysprep

You can use the Sysprep tool to perform four tasks.

Prepare a master installation for final delivery

This is the primary purpose of the Sysprep tool. To do this you run the Sysprep -reseal command, or click the Reseal button in the Sysprep interface.

Configure a destination computer for Factory mode

This task is performed primarily in manufacturing environments where every computer requires some customization prior to final delivery. However, it is also useful for some corporate deployments. To do this you run the Sysprep -factory command, or click the Factory button in the Sysprep interface.

Configure a destination computer for auditing

This task is performed to audit a destination computer before Mini-Setup runs. To do this you run the Sysprep -audit command, or click the Audit button in the Sysprep interface.

Remove hidden mass storage devices

This task is performed to remove references to devices that were present on the master computer but are not present on the destination computer. To do this you run the Sysprep -clean , Sysprep -factory, or Sysprep -reseal command, or click Factory or Reseal in the Sysprep interface.

The following sections describe the processes and interactions that occur when you use the four main parameters of Sysprep. The processes and interactions are presented in the approximate order in which they occur. It is not possible to describe these processes and interactions in precise order because the order might vary slightly depending on the way you perform the image-based installation and the options you choose when you run the Sysprep tool.

Running Sysprep -reseal

There are three types of processes and interactions that occur when you run the Sysprep -reseal command: verification and data gathering, configuration, and cleanup.

Verification and Data Gathering

Before any configuration settings are changed on the master installation, Sysprep checks various configuration settings and gathers information about the master installation. The main verification and data gathering processes include:

Configuration

After the verification and data gathering processes are complete, Sysprep configures the master installation. The main configuration processes and interactions include:

Cleanup

After the configuration processes complete, Sysprep cleans up user-specific and computer-specific settings and data that you don’t want copied to a destination computer. The main cleanup processes include:

After these processes run, the master computer either shuts down or restarts depending on whether you use the -reboot or -noreboot parameters with Sysprep.

Running Sysprep -factory

There are two types of processes and interactions that occur when you run the Sysprep -factory command: configuration and cleanup.

Configuration

The main configuration processes and interactions that occur when you run the Sysprep -factory command include:

Cleanup Processes

After the configuration processes complete, Sysprep cleans up user-specific and computer-specific settings and data that you don’t want to appear on a destination computer. The main cleanup processes include:

After these processes run, the master computer shuts down.

Running Sysprep -audit

When you use Sysprep to configure a destination computer for auditing, Sysprep changes the registry so that the destination computer starts in an audit mode the next time it is started. When the technician or administrator is finished performing auditing tasks, Sysprep must be run again with the -factory parameter or the -reseal parameter, or by clicking Factory or Reseal in the Sysprep interface.

Running Sysprep -clean

When you use Sysprep to remove hidden mass storage devices, Sysprep does two things:

After the command Sysprep -clean is run, the computer is typically shut down and is ready for delivery to its final destination.

Factory Mode Processes and Interactions

You can use Factory mode to perform configuration and installation tasks on a destination computer. It is most often used to perform configuration and installation tasks that you could not perform on the master installation. This includes such tasks as configuring operating system settings, installing additional device drivers, and installing applications. When you use Factory mode, every destination computer starts in a network-enabled state without starting Mini-Setup. In this state, Factory.exe processes its answer file, Winbom.ini, and performs these actions:

Locating a Winbom.ini File

Sysprep searches these locations in this order for a Winbom.ini file:

After locating a Winbom.ini file, Sysprep reads the value of the WinbomType entry in the [Factory] section. If the value of WinbomType is not appropriate (for example, you use the entry WinbomType = WinPE but the computer is not running WinPE), the Winbom.ini file is ignored and Sysprep continues searching for a Winbom.ini file. If the value of the WinbomType entry is appropriate, Sysprep reads the value of the NewWinbom entry in the [Factory] section. If a value is specified for NewWinbom, and a Winbom.ini file is located at that location, Sysprep examines that Winbom.ini file for a NewWinbom entry.

This cycle continues until Sysprep locates a Winbom.ini file of the correct type that does not contain a NewWinbom entry or for a maximum of ten times, whichever occurs first. Sysprep then continues to run in Factory mode, performing the tasks that are specified in the Winbom.ini file.

When you run Sysprep in Factory mode, the NewWinbom entry is processed only once at each start.

Processing Winbom.ini

Factory.exe processes Winbom.ini entries in different ways, depending on the value of the WinbomType entry in the [Factory] section of the Winbom.ini file.

A state is the smallest group of Winbom.ini sections and entries that is logged as a single unit. For each value of the WinbomType entry, the states are listed in the order in which Factory.exe processes them. States always restart the computer, meaning that if the computer restarts either programmatically or unexpectedly, Factory.exe resumes by processing its last state, along with any states that are processed on every restart of the computer for that value of WinbomType.

Specific states can apply to more than one value of the WinbomType entry, and Factory.exe might process the same state multiple times during a particular instance of running the tool.

The following sections contain information about the states that occur during each type of Winbom.ini processing. The information for each state is listed in a table formatted as follows:

State Name of the state as it appears in the user interface and/or the log file. This name is localized and can be different in each language build of Factory.exe.
Winbom.ini List of the Winbom.ini sections and entries processed in this state. If only a section is listed, then all entries in the section are processed. If the value for an entry is not specified, the entry can have any value that is syntactically correct.
Default Specifies the default value if the entry is omitted or blank. "Nothing" means that the state does nothing if the entry is not specified. Otherwise, the values listed are used as specified, even when the entries are not present
Executes Specifies if this state is processed once or on every boot of the computer. "Once" means that after the state completes, Factory.exe does not process that state again until you run either Sysprep -factory or Sysprep -reseal. Any entries read in those states are not read again from that state if you run Sysprep -audit. "Always" means that the state is processed on every start. If the computer restarts in the middle of processing the Winbom.ini file or if you manually restart the computer while auditing the installation, all of the "Always" states are processed again. However, each state is processed only once per start, unless otherwise noted.
Variables Specifies if the entries processed in this state support environment variables. If No, then none of the entries support them. If Yes, then all the entries listed (or the whole section) support them. Otherwise, the individual Winbom.ini entries that support environment variables are listed. If the state occurs before a user account logs on to the system or during Windows Welcome, then that state supports only system environment variables, not per user-defined environment variables, because the state is processed in the system context.
Comments Additional comments, if any.
Winbom.ini Processing When Preinstalling Windows from Windows PE

The states in this section contain the Winbom.ini entries that are processed when you start a computer by using Windows PE as the operating system, and run the command factory -winpe to preinstall Windows from a configuration set specified in the Winbom.ini file. WinbomType, located in the [Factory] section of the Winbom.ini file, must include the value WinPE.

The following tables describe the states in the order in which they are processed.

State Setting display resolution
Winbom.ini [ComputerSettings] DisplayResolution DisplayRefresh
Default [ComputerSettings] DisplayResolution = "800x600x16"
Executes Always
Variables No
Comments None
State Partitioning disks and formatting drives
Winbom.ini [DiskConfig] DiskN [description.Config] WipeDisk ForceFormat FileSystemN PartitionTypeN QuickFormatN SetActiveN SizeN N is the (1-based) index of the physical disk.
Default On 32-bit versions of Windows: [description.Config] WipeDisk = No ForceFormat = No FileSystemN = NTFS PartitionTypeN = Primary QuickFormatN = Yes SetActiveN = No On 64-bit versions of Windows: [description.Config] WipeDisk = Yes ForceFormat = No FileSystemN = NTFS PartitionTypeN = Primary QuickFormatN = Yes SetActiveN = No
Executes Always
Variables No
Comments None
State Creating Page File
Winbom.ini [WinPE] PageFileSize
Default If the computer has less than 64 MB of physical memory: [WinPE] PageFileSize = 64
Executes Always
Variables No
Comments If the machine has more than 64 MB of physical memory, the page file size is 0 by default.
State Starting Networking
Winbom.ini [WinPE.Net] Startnet IPConfig SubnetMask Gateway
Default [WinPE.Net] Startnet = Yes IPConfig = DHCP
Executes Always
Variables No
Comments If StartNet = No, then subsequent values are ignored. If IPConfig = DHCP, then SubnetMask and Gateway are ignored.
State Installing applications
Winbom.ini [OEMRunOnce]
Default Nothing
Executes Always
Variables No
Comments Credentials come from the UserName and Password entries in the [Factory] section.
State Launching [OEMRun] programs
Winbom.ini [OEMRun]
Default None
Executes Always
Variables No
Comments Credentials come from the UserName and Password entries in the [Factory] section.
State Installing the Configuration Set
Winbom.ini [WinPE] ConfigSet Lang Quiet SKU SourceRoot
Default [WinPE] Quiet = No
Executes Always
Variables No
Comments Credentials come from [WinPE] section or from the UserName and Password entries in the [Factory] section.
State Processing INF settings
Winbom.ini [UpdateSystem]
Default None
Executes Always
Variables No
Comments None
State Finishing Windows PE
Winbom.ini [WinPE] Restart
Default [WinPE] Restart = Prompt
Executes Always
Variables No
Comments None
Winbom.ini Processing During Sysprep in Factory Mode

The states in this section are the Winbom.ini entries processed when you run the command Sysprep -factory. The WinbomType entry, located in the [Factory] section of the Winbom.ini file, must include the value Factory.

The following tables describe the states in the order in which they are processed.

Note

State Extending system drive
Winbom.ini [ComputerSettings] ExtendPartition
Default [ComputerSettings] ExtendPartition = 0
Executes Once
Variables No
Comments You can extend only NTFS file system partitions. The partition to extend must have unpartitioned space available on its disk following the partition.
State Setting source path
Winbom.ini [ComputerSettings] SourcePath
Default Nothing
Executes Once
Variables Yes
Comments This should point to the folder that contains the I386 folder. If the files exist in the root, and this entry is present, and the source path that it points to does not exist, Factory.exe moves the files from the root to where the source path points.
State Installing test certificate
Winbom.ini [ComputerSettings] TestCert
Default Nothing
Executes Once
Variables No
Comments None
State Setting factory computer name
Winbom.ini [Factory] FactoryComputerName RebootAfterComputerName
Default [Factory] RebootAfterComputerName = No
Executes Once
Variables No
Comments None
State Copying updated drivers
Winbom.ini [PNPDrivers] [PNPDriverUpdate] DevicePath TargetRoot
Default [PNPDrivers] [PNPDriverUpdate] TargetRoot = %SYSTEMROOT%\drivers
Executes Once
Variables Yes
Comments None
State Starting Plug and Play
Winbom.ini Nothing
Default Nothing
Executes Always
Variables No
Comments None
State Setting display resolution
Winbom.ini [ComputerSettings] DisplayResolution DisplayRefresh
Default [ComputerSettings] DisplayResolution = "800x600x16"
Executes Always
Variables No
Comments None
State Customizing shell settings
Winbom.ini [Shell] MSNExplorer DefaultStartPanelOff DefaultThemesOff CustomDefaultThemeFile DoDesktopCleanup
Default Nothing
Executes Once
Variables CustomDefaultThemeFile
Comments DefaultStartPanelOff, DefaultThemesOff, and CustomDefaultThemeFile change the relevant setting only when new users are created. These settings are not changed on the administrator/owner account.
State Preparing for automatic logon
Winbom.ini [ComputerSettings] AuditAdminAutoLogon
Default [ComputerSettings] AuditAdminAutoLogon = No
Executes Once
Variables No
Comments If AuditAdminAutoLogon = Yes, then Factory.exe logs on to the desktop by using the administrator account. On Windows XP Home Edition, the owner account is used instead of the administrator account.
State Waiting for Plug and Play to finish
Winbom.ini [PNPDriverUpdate] WaitForPnP
Default [PNPDriverUpdate] WaitForPnP = Yes
Executes Always
Variables No
Comments Runs only if WaitForPnP = Yes.
State Updating installed drivers
Winbom.ini [PnPDriverUpdate] UpdateInstalledDrivers
Default If the first-run experience is Windows Welcome: [PNPDriverUpdate] UpdateInstalledDrivers = Yes If the first-run experience is Mini-Setup: [PNPDriverUpdate] UpdateInstalledDrivers = No
Executes Once
Variables No
Comments None
State Setting display resolution
Winbom.ini [ComputerSettings] DisplayResolution DisplayRefresh
Default [ComputerSettings] DisplayResolution = "800x600x16"
Executes Always
Variables No
Comments This state is run a second time, in case Plug and Play installed a new display driver.
State Optimizing Shell
Winbom.ini [Factory] OptimizeShell
Default [Factory] OptimizeShell = Yes
Executes Always
Variables No
Comments None
State Customizing shell font settings
Winbom.ini [ComputerSettings] FontSmoothing
Default Nothing
Executes Once
Variables No
Comments None
State Customizing shell settings
Winbom.ini [Shell] DefaultStartPanelOff DefaultThemesOff CustomDefaultThemeFile
Default Nothing
Executes Once
Variables CustomDefaultThemeFile
Comments DefaultStartPanelOff, DefaultThemesOff, and CustomDefaultThemeFile change the relevant setting only when new users are created. These settings are not changed on the administrator/owner account.
State Customizing power settings
Winbom.ini [ComputerSettings] Hibernation PowerScheme
Default Nothing
Executes Once
Variables No
Comments None
State Customizing home network settings
Winbom.ini [SetupHomeNet] EnableFirewall
Default Nothing
Executes Once
Variables No
Comments If this section exists, Factory.exe uses the Home Networking feature to configure settings.
State Adding user identities
Winbom.ini [UserAccounts]
Default Nothing
Executes Once
Variables No
Comments User accounts are not configured on the Windows Server 2003 family.
State Processing INF settings
Winbom.ini [UpdateSystem]
Default Nothing
Executes Always
Variables No
Comments None
State Configuring Optional Components
Winbom.ini [Components]
Default Nothing
Executes Once
Variables No
Comments None
State Installing applications
Winbom.ini [OEMRunOnce]
Default Nothing
Executes Always
Variables Yes
Comments Credentials come from the UserName and Password entries in the [Factory] section.
State Adding Start Menu frequently used links
Winbom.ini [StartMenuMFUlist]
Default Nothing
Executes Once
Variables Yes
Comments None
State Recording OEM application preferences
Winbom.ini [Shell] DefaultClientStartMenuInternet DefaultClientMail DefaultClientMedia DefaultClientIM DefaultClientJavaVM
Default Nothing
Executes Once
Variables Yes
Comments None
State Applying OEM Start Menu branding
Winbom.ini [OEMLink] [DesktopShortcutsFolder]
Default Nothing
Executes Once
Variables Yes
Comments None
State Launching [OEMRun] programs
Winbom.ini [OEMRun]
Default Nothing
Executes Always
Variables Yes
Comments Credentials come from the UserName and Password entries in the [Factory] section
State Waiting for Plug and Play to Finish
Winbom.ini [PnPDriverUpdate] WaitForPnP
Default [PNPDriverUpdate] WaitForPnP = Yes
Executes Always
Variables No
Comments Runs only if WaitForPnP = Yes.
State Launching Sysprep
Winbom.ini [Factory] Reseal ResealFlags ResealMode
Default On Windows XP Home Edition or Windows XP Professional: [Factory] Reseal = No ResealoMode = OOBE On Windows XP 64-Bit Edition or the Windows Server 2003 family: [Factory] ResealMode = Mini
Executes Always
Variables No
Comments On Windows XP 64-Bit Edition or the Windows Server 2003 family, the default behavior is for Sysprep to run and present its user interface.
Winbom.ini Processing During Windows Welcome

The states in this section are the Winbom.ini entries processed at the beginning of Windows Welcome on Windows XP. These states are not processed if the first-run experience is Mini-Setup. The WinbomType entry, located in the [Factory] section of the Winbom.ini file, must include the value OOBE.

The following tables describe the states in the order in which they are processed.

State Extending system drive
Winbom.ini [ComputerSettings] ExtendPartition
Default Nothing
Executes Once
Variables No
Comments None
State Setting source path
Winbom.ini [ComputerSettings] SourcePath
Default Nothing
Executes Once
Variables Yes
Comments The value of SourcePath the folder that contains the I386 folder. If the files exist in the root, this entry is present, and the source path that it points to does not exist, then Factory.exe moves the files from the root to the location specified by SourcePath.
State Installing test certificate
Winbom.ini [ComputerSettings] TestCert
Default Nothing
Executes Once
Variables No
Comments None
State Updating installed drivers
Winbom.ini [PnPDriverUpdate] UpdateInstalledDrivers
Default [PNPDriverUpdate] UpdateInstalledDrivers = Yes
Executes Once
Variables No
Comments Only functions if UpdateInstalledDrivers = Yes.
State Setting display resolution
Winbom.ini [ComputerSettings] DisplayResolution DisplayRefresh
Default [ComputerSettings] DisplayResolution = "800x600x16"
Executes Once
Variables No
Comments None
State Optimizing Shell
Winbom.ini [Factory] OptimizeShell
Default [Factory] OptimizeShell = Yes
Executes Always
Variables No
Comments Does not function if OptimizeShell = No. If OptimizeShell = Yes, the Windows shell settings are configured every time Windows Welcome runs, even if that causes the computer to restart.
State Customizing shell settings
Winbom.ini [Shell] MSNExplorer DefaultStartPanelOff DefaultThemesOff CustomDefaultThemeFile DoDesktopCleanup
Default Nothing
Executes Once
Variables CustomDefaultThemeFile
Comments DefaultStartPanelOff, DefaultThemesOff, and CustomDefaultThemeFile change the relevant setting only when new users are created. These settings are not changed on the administrator/owner account.
State Customizing power settings
Winbom.ini [ComputerSettings] Hibernation PowerScheme
Default Nothing
Executes Once
Variables No
Comments None
State Configuring Optional Components
Winbom.ini [Components]
Default Nothing
Executes Once
Variables No
Comments None

Mini-Setup Processes and Interactions

Mini-Setup is a shortened version of an interactive setup. Syssetup.dll controls Mini-Setup, which is the same DLL that controls the final stage (GUI mode stage) of an interactive setup. However, not all of the interactive setup steps are performed during Mini-Setup because the operating system was already installed when the master installation was created.

The primary processes and interactions that occur during the Mini-Setup stage are described below in the approximate order in which they occur.

When the Mini-Setup stage finishes, the computer restarts and the entries specified in the [GUIRunOnce] section are run.

Post Installation Processes and Interactions

Several Sysprep installation processes occur after an operating system is installed on a destination computer. These processes occur when you automate post-installation configuration tasks. Examples of post-installation configuration tasks include running command-line programs to configure system services, running scripts to configure Group Policy settings, and installing software programs. The most commonly used mechanisms for automating post-installation tasks is the Cmdlines.txt file and the [GUIRunOnce] in the Sysprep.inf answer file.

Cmdlines.txt Processes and Interactions

A Cmdlines.txt file contains a list of commands, programs, scripts, or batch files that run just after the Mini-Setup stage finishes but before the destination computer restarts. By default, Cmdlines.txt does not exist, so you must manually create the file with a text editor, such as Notepad.

The syntax for Cmdlines.txt is as follows:

[Commands] 
"command_1" 
"command_2" 
     . 
     . 
"command_x"

Where command_1, command_2, and command_x refer to the commands, programs, scripts, or batch files that you want to run when the Mini-Setup stage is complete. Note that all commands must be enclosed in quotation marks. Also, if you are using the command window (Cmd.exe) to run commands, programs, scripts, or batch files, then you need to use the /c parameter with the cmd command.

For example, to create a new folder named Test on drive C, you type:

"cmd /c mkdir c:\Test"

In addition, to use a Cmdlines.txt file, you need to:

[Unattended]  
InstallFilesPath = C:\Sysprep\i386  

You can only have one Cmdlines.txt file, but you can use it to run multiple commands, programs, scripts, or batch files. When these commands, programs, scripts, or batch files run, the following processes and interactions occur:

[GuiRunOnce] Processes and Interactions

The [GuiRunOnce] section of an answer file contains a list of commands, programs, scripts, or batch files that run the first time an administrator or technician logs on to the destination computer after the operating system is installed.

The syntax for [GuiRunOnce] is:

[GuiRunOnce] 
"command_1" 
"command_2" 
     . 
     . 
"command_x"

Where command_1, command_2, and command_x refer to the commands, programs, scripts, or batch files that you want to run after the operating system is installed and the administrator or technician logs on. Note that all commands must be enclosed in quotation marks.

The commands that are listed in the [GuiRunOnce] section are stored in the following registry location:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce

When an administrator or technician logs onto the destination computer for the first time after the Mini-Setup stage is complete, Windows Server 2003 reads and then runs the commands that are listed in this registry location. When these commands, programs, scripts, or batch files run, the following processes and interactions occur:

In addition, there are some interactions and processes that you might need to control if you run certain commands, programs, scripts, and batch files with the [GuiRunOnce] section.

Prevent restarts

You can run commands, programs, scripts, and batch files only if you can prevent the command, program, script, or batch file from restarting the computer. When a computer restarts, all remaining entries in the [GuiRunOnce] section are lost because the Runonce registry entry is deleted. If the system restarts before completing entries listed in the [GuiRunOnce] section, the remaining items will not run. Therefore, you need to suppress restarts. If you cannot suppress a restart within a command, program, script, or batch file, you can try to repackage the command, program, script, or batch file into a Windows Installer package.

Do not rely on the Windows Explorer shell

The Windows Explorer shell is not loaded when the operating system starts running commands, programs, scripts, or batch files that are listed in the [GuiRunOnce] section of an answer file. In some cases, you can get an updated installer program from the application vendor that does not rely on the Windows Explorer shell. If you cannot, you might be able to repackage the command, program, script, or batch file as a Windows Installer package (.msi file).

Control the processes by using the /wait parameter

Commands, programs, scripts, and batch files often start and stop several different processes. In some cases, when you are running multiple programs — especially installation programs — this can inadvertently cause the next program listed in the [GuiRunOnce] section to start before the previous program is finished running. When this occurs, the second program usually fails. To prevent this, you can run the programs from batch files by using the start command with the /wait parameter. This forces each program to complete before the next command listed in [GuiRunOnce] runs.

The following resources contain additional information that is relevant to this section.