Customizing and Automating Installations

An unattended installation is a hands-free method of installing Windows 2000 Professional that is convenient and flexible and does not require additional tools. Unattended installations are done on a computer-by-computer basis.

This section explains how to use the Winnt32.exe and Winnt.exe commands; it also provides step-by-step instructions for running Setup on different operating systems and platforms, including the following:

  • Using Winnt.exe to run Setup on MS-DOS, Windows 3.1, or Windows for Workgroups–based computers.

  • Using Winnt32.exe to run Setup on Windows 95, Windows 98, Windows NT Workstation 4.0, or Windows 2000 Professional–based computers.

  • Running Setup from the operating system CD.

note-icon

Note

When you run Setup in unattended mode on a computer with multiple hard disks or partitions, specify the exact location of the destination hard drive or partition where you are installing. Use the Winnt /t or Winnt32 /tempdrive switch to specify the destination. If you use the CD Boot method, add AutoPartition = 1 to the [Data] section of the Winnt.sif file to specify the location. With CD Boot, Setup installs to the first logical partition that it finds with sufficient disk space. Your computer must have a minimum of 1 GB of free space and at least a 2-GB partition.

To run Setup in unattended mode

  • At the command prompt type:
    winnt /u
    – Or –
    winnt32 /unattend

Table 5.15 shows when to use these.

Table 5.15 Using the Setup Commands with an Answer File

Setup Command

Upgrade

Clean Installation

Winnt.exe

No

Yes

Winnt32.exe

Yes

Yes

When you run the Setup program, it installs Windows 2000 Professional in three phases:

  • File-copy

  • Text-mode

  • GUI-mode

File copy    Setup copies the Windows 2000 Professional program files and any additional files that you specify from the distribution folder to the computer's hard disk.

Text mode    Setup identifies the basic hardware in the computer (such as the microprocessor and motherboard type, hard disk controllers, file systems, and memory), installs the base operating system required to continue with Setup, and creates any folders that you specify.

GUI mode    Setup configures the computer's hardware (audio, video, and so on), configures the network settings, prompts you to provide an Administrator password, and allows you to personalize the installation. If you use Sysprep, the Setup program goes through another phase called Mini-Setup. This phase is a subset of the regular GUI mode of Setup and is only enabled on computers on which Sysprep has been run. Mini-Setup is used only to prompt for user-specific information, to redetect new hardware, and to regenerate System IDs.

Using the Winnt32.exe and Winnt.exe Programs

To install Windows 2000, run the appropriate Windows 2000 Setup program, either Winnt.exe or Winnt32.exe.

note-icon

Note

In this chapter, Winnt.exe and Winnt32.exe are both referred to as Setup.

Winnt32.exe    Use Winnt32.exe for a clean installation or upgrade on a computer running Windows NT version 4.0, Windows 95, or Windows 98 .

Winnt.exe    Use Winnt.exe for a clean installation on a computer running MS-DOS or Windows 3. x . Upgrades of these operating systems are not supported.

caution-icon

Caution

Before upgrading to the Windows 2000 operating system, restart the computer if you have just upgraded any applications.

Winnt32.exe Command Syntax

Winnt32 [/checkupgradeonly] [/cmd:command_line] [/cmdcons][/copydir:folder_name] [/copysource:folder_name] [/debug[level][: file_name]] [/m:folder_name] [/makelocalsource][/noreboot] [/s:sourcepath] [/syspart:drive_letter] [/tempdrive:drive_letter] [/udf:ID[,UDB_file]] [/unattend][/unattend[seconds][:answer_file]]

Where:

/checkupgradeonly

Checks the current operating system for upgrade compatibility with Windows 2000. This is simply a verification and does not install Windows 2000.

**/cmd:**command_line

Specifies a command to be carried out after the graphical user interface (GUI) portion of Setup finishes. The command occurs before Setup is complete and after Setup has restarted your computer and collected the necessary configuration information. For example, this option can run Cmdlines.txt, which usually specifies the applications to be installed immediately after Setup completes.

/cmdcons

Adds a Recovery Console option for repairing a failed installation.

**/copydir:**folder_name

Creates a subfolder within the folder that contains the Windows 2000 files. For example, if the source folder contains a Private_drivers folder that has modifications just for your site, you can type /copydir:private_drivers to copy that folder to your Windows 2000 folder. You can use the /copydir option multiple times.

**/copysource:**folder_name

Temporarily creates a subfolder within the folder that contains the Windows 2000 files. For example, if the source folder contains a Private_drivers folder that has modifications just for your site, type /copysource:private_drivers to have Setup copy that folder to your Windows 2000 folder and use its files during Setup. Unlike the /copydir option, folders created by using /copysource are deleted when Setup finishes.

/debug [ level ][ **:**file_name ]

Creates a debug log at the level specified. When you use the default setting, the program creates a log file ( %windir% \Winnt32.log) that has a warning level of 2. The warning levels for the log file are as follows: 0 = severe errors, 1=errors, 2 = warnings, 3 = information, and 4 = detailed information for debugging. Each level also includes the levels below it.

**/m:**folder_name

Instructs Setup to copy replacement files from an alternate location. It directs Setup to look at the alternate location first and to copy the files from that location (if they files are present) instead of from the default location.

/makelocalsource

Instructs Setup to copy all installation source files to your local hard disk. Use /makelocalsource to obtain installation files if you begin installation from a CD and the CD becomes unavailable during the installation.

/noreboot

Instructs Setup to not restart the computer after the file copy phase of Winnt32 is complete so that you can execute another command.

**/s:**sourcepath

Specifies the source location of the Windows 2000 files. The default is the current folder. To copy files simultaneously from multiple servers, you can specify up to eight sources. For example:

winnt32 /s:server1 /s:server8

Windows 2000 can use up to eight /s switches to point to other distribution servers as source locations for installation to the destination computer. This functionality speeds up the file copy phase of Setup to the destination computer and provides additional load balancing capability to the distribution servers from which Setup can be run. For example:

path to distribution folder 1\winnt32 [/unattend] [:path\answer.txt] [/s:path to distribution folder 2] [/s:path to distribution folder 3] [/s:path to distribution folder 4]

**/syspart:**drive_letter

Specifies that you can copy Setup startup files to a hard disk, mark the disk as active, and install the disk in another computer. When you start that computer, Setup automatically starts at the next phase. Remember the following points when you use this switch:

  • You must always use the / syspart option with the / tempdrive option.

  • Both / syspart and / tempdrive must point to the same partition of a secondary hard disk.

  • You must install Windows 2000 on the primary partition of the secondary hard disk.

  • You can use the /syspart switch only from a computer that is running Windows NT 3.51, Windows NT 4.0, or Windows 2000. You cannot use this switch from a computer that is running Windows 95 or Windows 98.

**/tempdrive:**drive_letter

Directs Setup to place temporary files on the specified partition and to install Windows 2000 on that partition. Remember the following points as you use this switch:

  • You must always use the / tempdrive option with the / syspart option.

  • Both / tempdrive and / syspart must point to the same partition of a secondary hard disk.

  • You must install Windows 2000 on the primary partition of the secondary hard disk.

**/udf:**ID [ **,**UDB_file ]

Indicates an identifier that Setup uses to specify how a Uniqueness Database File (UDB) modifies an answer file (see the /unattend option). The UDB file overrides values in the answer file, and the identifier determines which values in the UDB file are used. For example, /udf:Roaming_user,Our_company.udb overrides settings specified for the identifier Roaming_user in the Our_company.udb file. If you do not specify a UDB file , Setup prompts you to insert a disk that contains the file $ Unique $.udb.

/unattend

Upgrades your previous version of Windows by using unattended Setup mode. All user settings are taken from the previous installation so that no user intervention is required during Setup.

important-icon

Important

Using the /unattend switch to automate Setup affirms that you have read and accepted the End User License Agreement (EULA) for Windows 2000. Before using this switch to install Windows 2000 on behalf of an organization other than your own, you must confirm that the end user (whether an individual or a single entity) has received, read, and accepted the terms of the Windows 2000 EULA. Original equipment manufacturers (OEMs) may not specify this key on computers being sold to end users.

/unattend [ seconds ][ **:**answer_file ]

Installs Windows 2000 without using prompts that require user interaction; instead, Setup obtains the information it needs from an answer file that you prepare in advance. For more information about answer files, see Sample Answer Files for Unattended Setup in this book.

Include seconds only if you are upgrading from Windows NT 4.0. Seconds specifies the delay, in seconds, between when Setup finishes copying the files and when system setup begins.

Winnt.exe Command Syntax

Winnt [/E:command][/R:folder_name][/Rx:folder_name][/S:sourcepath][/T[:tempdrive]][/U[:answer_file]][/udf:ID[,UDB_file] [/A:]

**/E:**command

Specifies a command to be carried out after the GUI portion of Setup finishes. For example, this option can run Cmdlines.txt, which usually specifies the applications to be installed immediately after Setup completes.

**/R:**folder_name

Creates a subfolder within the folder that contains the Windows 2000 files. For example, if the source folder contains a Private_drivers folder that has modifications just for your site, type /R:private_drivers to copy that folder to your Windows 2000 folder. You can use the /R option multiple times.

**/Rx:**folder_name

Temporarily creates a subfolder within the folder that contains the Windows 2000 files. For example, if the source folder contains a Private_drivers folder that has modifications just for your site, you can type /Rx:private_drivers to have Setup copy that folder to your Windows 2000 folder and use its files during Setup. Unlike the /R option, folders created by using /Rx are deleted when Setup finishes.

**/S:**sourcepath

Specifies the source location of the Windows 2000 files. The location must be a full path of the form Drive_letter :\ Path or \\ Server \ Share \ Path . The default is the current folder.

**/T:**tempdrive

Directs Setup to place temporary files on the specified drive and to install Windows 2000 on that drive. If you do not specify a location, Setup attempts to locate a drive for you.

**/U:**answer_file

Installs Windows 2000 without using prompts that require user interaction; instead, Setup obtains the information it needs from an answer file that you prepare in advance. For more information about answer files, see Sample Answer Files for Unattended Setup in this book. This requires /S .

**/udf:**ID [ **,**UDB_file ]

Indicates an identifier that Setup uses to specify how a UDB modifies an answer file. The UDB file overrides values in the answer file, and the identifier determines which values in the UDB file are used. For example, /udf:Roaming_user,Our_company.udb overrides settings specified for the identifier Roaming_user in the file Our_company.udb . If you do not specify a UDB file , Setup prompts you to insert a disk that contains the file $ Unique $.udb.

/A

Enables accessibility options.

Running Setup on Windows 95, Windows 98, Windows NT Workstation 4.0, or Windows 2000 Professional–based Computers

Use Winnt32.exe to start Windows 2000 Professional Setup from computers running Windows 95, Windows 98, Windows NT Workstation 4.0, or Windows 2000 Professional.

To run Setup in unattended mode from Windows 95, Windows 98, Windows NT Workstation 4.0, or Windows 2000 Professional

  • At the command prompt, type:

winnt32 /unattend:answer_file /s :install_source[/syspart:target_drive] [/tempdrive:target_drive] [t]

The following is an example of how Winnt32.exe can be used:

<path to source>\i386\Winnt32.exe /s:<path to source>\i386 /unattend:<path to answer file>\Unattend.txt

where:

  • <path to source> and <path to answer file> are fully qualified Uniform Naming Convention (UNC) or drive-letter references to the locations of the Windows 2000 Professional source files and of the answer file.

Running Setup on MS-DOS, Windows 3.1, or Windows for Workgroups–based Computers

Use Winnt.exe to start Windows 2000 Professional Setup from computers running MS-DOS, Windows 3.1, or Windows for Workgroups. Run Winnt.exe from the MS-DOS command prompt.

To run Setup in unattended mode from MS-DOS, Windows 3.1, or Windows for Workgroups

  • At the command prompt, type:

winnt /u:<answer file> /s:<install source> /t:<target drive>

The following is an example of how Winnt.exe can be used:

< path to source>\i386\Winnt.exe /s:<path to source>\i386 /u:<path to answer file>\Unattend.txt

where:

  • <path to source> and <path to answer file> are fully qualified UNC or drive-letter references to the locations of the Windows 2000 Professional source files and of the answer file.

note-icon

Note

Winnt.exe can only be run on computers that are running MS-DOS or Windows 3. x .

Running Setup from the Operating System CD

To run Windows 2000 Professional Setup in unattended mode from the Windows 2000 Professional operating system CD, the following conditions must be met:

  • The computer must support starting from the CD-ROM drive — El Torito No Emulation CD boot support.

  • The answer file must be named Winnt.sif and be on a floppy disk to be inserted when the computer starts from the CD.

  • The answer file must contain a [Data] section with the required keys specified.