SmartSetup Scripting Toolkit Administrator's Guide

Table Of Contents
Table 6 hwdiscovery error codes (continued)
DescriptionValue
Error creating XML file7
General error8
hwquery
Synopsis
hwquery hwdisc.dat allboards.xml [query]...
Description
The hwquery utility is executed from a script file, in conjunction with other utilities, to control the
install process. The hwquery utility uses data from the hardware discovery file in your own scripts.
The hwquery utility cannot alter environment variables directly. To set the variable, the hosting
script must use the output of hwquery. Typically, the script writes the output to an intermediate
script file that is subsequently called by the hosting script.
The hwquery utility returns a string to standard output in the following format:
set variable=XML tag value
You can redirect the output to a batch script to set the variable value.
Options
hwdisc.dat Specifies the hardware discovery XML output file.
allboards.xml Specifies the file that contains descriptions of all supported PCI devices.
query Specifies the query to perform on the hardware discovery file in the following
format:
variable=string
Where: string is case sensitive, and matches either a tag in the hardware
discovery output file or a description of a PCI device in the allboards.xml
file. If string contains spaces, enclose the string in quotation marks.
Examples
y:\utilities>hwquery y:\data_files\hwdisc.dat allboards.xml ARRAY_CTRL="Smart Array"
set ARRAY_CTRL=Smart Array 6402 Controller [A9890A]
ifhw
Synopsis
ifhw [path] [hwdiscfilename] [path] [allboards.xml] [expression]
Description
The ifhw utility is executed from a script file, in conjunction with other utilities, to control the install
process. The ifhw utility queries the hardware discovery file. Queries take the form of a logical
expression, and the result of the expression is returned as the exit status of the tool, which the
hosting script can use to conditionally perform actions.
Options
[path]hwdiscfilename Specifies the hardware discovery file to use to run the query.
hwquery 47