UNATTEND.EXE

The unattend.exe utility adds device-driver specific information to the Microsoft Windows unattended installation answer file for a deployment scenario.

The ServerGuide Scripting Toolkit uses the unattend.exe utility to dynamically add server-specific device-driver information to the answer file for an unattended installation. The device drivers on the IBM ServerGuide Setup and Installation CD are already configured for use with this utility.

Two versions of the utility come with the ServerGuide Scripting Toolkit:
The unattend.exe utility processes three types of device drivers:
The unattend command adds the device-driver information to the answer file in one or more locations, depending on the type of device driver:
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.
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.
Executable
The executable device-driver information is added to the [GUIRunOnce] section. Existing entries are not changed.
Path to the $oem$ directory
The OemFilesPath keyword in the [Unattended] section is set to the path to the $oem$ directory. Any value previously assigned to this keyword is overwritten.

For text mode device drivers, the unattend.exe 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.

For plug-and-play and executable device drivers, the unattend.exe 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.

Usage

The unattend.exe 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]
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

Return codes

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

Examples

The following examples illustrate how to use the unattend.exe utility.
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 the 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 the text mode device drivers from the c:\w2\$oem$\textmode directory to the answer file.