Automating Tasks During Mini-Setup

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

You can automatically update device drivers and configure user preferences and computer settings during Mini-Setup by using a Sysprep.inf file. Sysprep.inf is most commonly used as the answer file for Mini-Setup, but you can use it to perform other automated tasks during Mini-Setup. For example, if you use Sysprep.inf in conjunction with a Cmdlines.txt file, you can install software and run programs, scripts, and batch files just after Mini-Setup is finished but before a destination computer shuts down or restarts.

When you prepare a disk image with Sysprep and then copy the image onto a destination computer, the destination computer automatically searches for Sysprep.inf the first time it starts and automatically performs the installation and configuration tasks you specify in Sysprep.inf. When the destination computer finishes all of the tasks listed in Sysprep.inf, it restarts and is ready for use by an end user (unless there are automated tasks that need to be performed after Mini-Setup runs — in that case, the tasks are performed, the computer restarts, and then it is ready for use by an end-user).

Use a Sysprep.inf file to automate installation tasks during Mini-Setup if you need:

  • Automated Mini-Setup. You can automate end-user prompts during Mini-Setup, which reduces the amount of end user interaction.

  • Page file regeneration. You can delete and recreate the page file on the disk image, which is useful if the amount of RAM on the destination computer is different from the amount of RAM that was on the master computer.

  • Mass storage controller support. You can predefine driver information for mass storage controllers so that Windows loads the correct mass storage controller driver on a destination computer.

  • Cmdlines.txt support. You can use this file to install programs or run programs, scripts, and batch files when Mini-Setup is finished but before the computer restarts. All tasks listed in Cmdlines.txt run under the Local System security account because there is no logged-on user.

Automating tasks during Mini-Setup has some limitations. You cannot automate tasks during Mini-Setup if:

  • You need network connectivity. You cannot access network resources, such as shared folders, during Mini-Setup. This is also true for any tasks you automate by using a Cmdlines.txt file.

  • You need to perform a task under a specific user account. All tasks are performed under the Local System security account during Mini-Setup. This is also true for any tasks you automate by using a Cmdlines.txt file.

  • You want to install software by using Windows Installer packages. You cannot use the Cmdlines.txt file to install .msi packages.

You can create a Sysprep.inf file either by using Setup Manager or by using a text editor such as Notepad. Setup Manager steps you through the Mini-Setup process and records your answers in a Sysprep.inf file. Setup Manager is included in the Deploy.cab file in the Support folder on the Windows Server 2003 operating system CD. For more information about using Setup Manager, 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.

To design automated installation tasks that occur during Mini-Setup, you must identify:

  • The installation tasks you want to automate.

  • The configuration files you need to use.

  • The settings you need to configure for each configuration file.

Identifying Automated Installation Tasks You Can Perform During Mini-Setup

You can use each copy of the "Disk Image Worksheet" (ACISYS_1.doc) to identify the installation tasks you need to perform after each of your disk images is copied onto a destination computer. If you have not created a worksheet for each of your disk images, identify the installation and configuration tasks that need to be performed after each of your disk images is copied onto a destination computer.

Next, use Table 3.8 to determine which installation tasks to automate during Mini-Setup. If possible, automate tasks before Mini-Setup by using Factory mode and a Winbom.ini file.

Table 3.8   Installation Tasks You Can Automate During Mini-Setup

Installation Task Comments

Extend a primary partition

Extends the primary partition that the Windows operating system is installed on. This task is performed during the Mini-Setup phase of installation, but just before Mini-Setup runs.

Update device drivers and device path

Runs Plug and Play at the end of Mini-Setup to re-enumerate all the installed drivers and install any updated drivers that are found in the device path. The device path tells the Plug and Play module where device drivers are located, and is stored in the registry. You can also change the device path.

Regenerate a page file

Deletes and regenerates a page file based on the amount of RAM in the destination computer. This task is performed during the Mini-Setup phase of installation, but just before Mini-Setup runs.

Install drivers for mass storage controllers

This task is performed during the Mini-Setup phase of installation, but just before Mini-Setup runs.

Configure user settings

These settings include computer name, user name, organization name, and product key. If you automate this task, end users are not prompted for this information during Mini-Setup.

Configure regional options

These options include locale and language settings. If you automate this task, end users are not prompted for this information during Mini-Setup.

Set date and time

If you automate this task, end users are not prompted for this information during Mini-Setup.

Set server licensing mode

If you automate this task, end users are not prompted for this information during Mini-Setup.

Configure display settings

These settings include color depth, resolution, and refresh rate. If you automate this task, end users are not prompted for this information during Mini-Setup.

Configure telephony settings

These include area code, country code, dial tone type, and number to dial for an outside line. If you automate this task, end users are not prompted for this information during Mini-Setup.

Configure computer settings

These include computer name, organizational unit membership, domain or workgroup membership, and administrator password. If you automate this task, end users are not prompted for this information during Mini-Setup.

Configure network settings

These include installation of optional networking components and configuration of network services, protocols, and network adapters. If you automate this task, end users are not prompted for this information during Mini-Setup.

Install software

If you use Cmdlines.txt to install software, you cannot use .msi packages and you cannot access network resources. In addition, installation tasks are run under the Local System security account because there is no logged-on user.

Run programs, scripts, and batch files

You cannot access network resources if programs, scripts, or batch files are run with Cmdlines.txt. In addition, programs, scripts, and batch files are run under the Local System security account because there is no logged-on user.

Identifying Configuration Files to Use During Mini-Setup

You might have to configure several answer files or configuration files if you automate installation tasks during Mini-Setup. Table 3.9 describes these answer files and configuration files, and explains where you need to save them.

Table 3.9   Configuration Files Used to Automate Tasks During Mini-Setup

Configuration File Description Where to Save the Configuration File

Sysprep.inf

Primarily the answer file for Mini-Setup, but can also be used to configure computer settings.

Must be saved in the same location as Sysprep.exe and Setupcl.exe, which are in the systemdrive\Sysprep folder on the destination computer.

Cmdlines.txt

Configuration file for running programs, scripts, or batch files during Mini-Setup.

Must exist in the systemdrive\Sysprep\$OEM$ folder on the destination computer’s hard disk.

filename.txt*

Answer file for programs or scripts that run during Mini-Setup. This includes answer files for software installation (setup) programs.

Same location as the program or script that you need to run without user intervention during Mini-Setup.

* Where filename can be any valid file name you choose.

You can use different Sysprep.inf files with a single disk image by copying Sysprep.inf to the systemdrive\Sysprep folder after you copy the disk image to a destination computer. The easiest way to do this is to start the destination computer in Factory mode, and then copy the appropriate Sysprep.inf file from a shared folder to the systemdrive\Sysprep folder. You can also use a disk-imaging application to copy files onto a disk image after the disk image has been created, although not all disk-imaging programs provide this functionality.

Note

  • You can also save Sysprep.inf on a floppy disk with Sysprep.exe and Setupcl.exe; however, the floppy disk controller on the master computer must be identical to the floppy disk controller on the destination computer. If the floppy disk controllers are different, the Setup program will not find the floppy disk controller on the destination computer, and the automated tasks and settings specified in Sysprep.inf will fail.

For more information about using Sysprep.inf and Cmdlines.txt files, see the Microsoft Windows Corporate Deployment Tools User’s Guide (Deploy.chm), which is included in the Deploy.cab file in the Support folder on the Windows Server 2003 operating system CD. For more information about how to configure an answer file for a program or script, see the documentation for the program or script.

Identifying Configuration File Settings for Sysprep.inf

Use Table 3.10 to match an installation task with a specific section and parameter in a Sysprep.inf file.

Table 3.10   Installation Tasks and Corresponding Sysprep.inf Section Names

To Automate This Task Configure These Sections in Sysprep.inf

Extend a primary partition

[Unattended]

Update device drivers and change device path

[Unattended]

Regenerate a page file

[Unattended]

Install drivers for mass storage controllers

[Sysprep] and [SysprepMassStorage]

Configure user settings

[UserData]

Configure regional options

[GuiUnattended] and [RegionalSettings]

Set date and time

[GuiUnattended]

Set server licensing mode

[LicenseFilePrintData]

Configure display settings

[Display]

Configure telephony settings

[TapiLocation]

Configure computer settings

[Networking] and [Identification]

Configure network settings

[Networking]

Install software

[GuiRunOnce]

Run programs, scripts, and batch files.

[GuiRunOnce]

Note

  • You can also use the [GuiRunOnce] section in a Sysprep.inf file to install software and run programs, scripts, and batch files. All tasks that are listed in the [GuiRunOnce] section occur after Mini-Setup finishes and the computer restarts. For more information about the [GuiRunOnce] section, see "Automating Tasks After Mini-Setup" later in this chapter.