unattend.exe

The unattend utility dynamically adds server-specific device-driver information to the Microsoft Windows answer file for an unattended installation deployment.

The device drivers on the Lenovo ServerGuide Setup and Installation CD are already configured for use with the unattend utility.

Two versions of the utility come with ServerGuide Scripting Toolkit:

The unattend utility processes three types of device drivers and adds the device-driver information to the answer file in one or more locations, depending on the type of device driver.

Table 1. unattend utility device drivers
Device Driver Notes
Text mode
  • Text mode device-driver information is added to the [MassStorageDevices] and [OemBootFiles] sections.
  • Entries are not duplicated, and existing entries are not changed.
  • The unattend utility uses the information in the hwdetect.ini file and the txtsetup.oem file (located in the \$oem$\textmode directory of the target server) to add the text mode device driver information to the answer file.
  • This utility also adds the Microsoft retail text mode device drivers using information specified in the txtsetup.sif file from the i386 directory of the Windows operating-system installation source files.
Hardware abstraction layer (HAL)
  • HAL device-driver information is assigned to the ComputerType keyword in the [Unattended] section.
  • Any value previously assigned to this keyword is overwritten.
Plug and Play
  • The OemPnPDriversPath keyword in the [Unattended] section is set to the path to the PnP device driver directory.
  • Any value previously assigned to this keyword is overwritten.
  • The unattend utility uses information from the hwdetect.ini file (the output of the hwdetect.exe utility) and the drvinfo.ini file in each device-driver directory in the target server to determine the device drivers to add to the answer file.
  • Device drivers that are not supported on the target server are deleted from the device drivers directory.

unattend utility usage

The unattend utility has the following command-line syntax:
unattend [/?] <file_name|/U:file /D:path /H:file /I:path> [/U:file] [/D:path]
[/H:file_name] [/I:path] [/S:drive] [/C] [/T] [/P] [/E] [/V:n]
Table 2. unattend parameters
Parameter Description
/?
Displays all parameters.
file_name
Specifies a fully qualified path and file name for the unattend.ini file that contains command-line parameters for the unattend.exe utility. You can put parameters in this file instead of typing them all on the command line, which is useful for long command lines that exceed the limit of 127 characters.
  1. Any settings for the /U, /D, /H, or /I parameters you place on the command line will override settings in the unattend.ini file.
  2. If you do not specify a setting for filename, you must specify the /U, /D, /H, and /I parameters on the command line.
/U:file
Specifies a fully qualified path and file name for the answer file.
/D:path
Specifies a fully qualified path to the device drivers directory in the target server. If path does not include $oem$, you must use the /T parameter to process text mode device drivers.
/H:file
Specifies a fully qualified path and file name for the hwdetect.ini file that was created by the hwdetect.exe utility.
/I:path
Specifies a fully qualified path to the i386 directory in the target server.
/S:drive
Specifies the drive letter on the target server to which the operating system is being installed.
/C
Creates a default unattend.ini file
/T
Causes the unattend.exe utility to add only the text mode device-driver information to the answer file.
/P
Causes the unattend.exe utility to add only the plug-and-play device driver information to the answer file.
/E
Causes the unattend.exe utility to add only the executable device driver information to the answer file.
/V:n
Specifies the verbose level used to report status during the deployment process. Valid values for n are:
  • 0 - quiet mode
  • 3 - default
  • 5 - maximum information

unattend utility return codes

The unattend utility returns the following values to indicate status:
  • 0 - Success.
  • 1 - Syntax error.
  • 2 - Program error.
  • 3 - Destination is read-only.
  • 4 - No device-driver information files found.

unattend utility examples

The following examples illustrate how to use the unattend utility.
Table 3. unattend examples
Example Description
unattend /U:c:\unattend.txt /D:c:\w2\$oem$\$1\drv
/H:c:\hwdetect.ini /I:C:\i386
Adds plug-and-play and executable device drivers from c:\w2\$oem$\$1\drv and text mode device drivers from c:\w2\$oem$\textmode to the answer file and deletes device drivers not specific to the target server.
unattend /U:C:\unattend.txt /D:c:\w2\$oem$\textmode
/H:c:\hwdetect.ini /I:c:\i386 /T
Adds only text mode device drivers from the c:\w2\$oem$\textmode directory to the answer file.