The HWDETECT.EXE utility is used to perform basic hardware detection functions that are typically obtained by using SMBIOS and a PCI scan.
This utility contains options that can be used to dump all of the hardware information to an output file, or it can be used to query hardware information and return values that set the errorlevel environment variable or the return code in Windows PE.
HWDETECT performs basic hardware scan functions and more complex PCI device detection options. The basic hardware scan functions can only be used singularly. The PCI device detection functions may be used in combination with each other to produce a query based on multiple restrictions. You can only use the hwdetect.exe utility basic hardware scan functions one at a time. The PCI-device detection functions can be combined or used more than once on the same command line.
hwdetect [/s|/p|/i|/m:type] [/vid:vendor_id] [/did:device_id] [/svid:sub_vendor_id]
[/sdid:sub_device_id] [bn:bus_number] [/dn:device_number] [/add:num]
Parameter | Description |
---|---|
Basic hardware scan functions | |
|
Determines if the target server is an IBM® eServer™ or IBM eServer xSeries server. The return values
are:
|
|
Displays all hardware information for the target
server in a variable=value format. The return value is 0 when successful.
You can use the > output-redirect option to save the output to an output file. For example, hwdetect /p > filename |
|
Displays all hardware information for the target
server in an INI-file format. The return value is 0 when successful.
You can use the > output-redirect option to save the output to an output file. |
|
Compares the machine type of the target xSeries server to the specified
machine type, type. The return values are:
|
Parameter | Description |
---|---|
PCI-device detection functions | |
|
Determines whether there is a PCI adapter in the target server that matches the specified vendor ID, where vendor_id is a hexadecimal value. The return value is the number of matching adapters in the target server, or 0 if there are no matches. |
|
Determines whether there is a PCI adapter in the target server that matches the specified device ID, where device_id is a hexadecimal value. The return value is the number of matching adapters in the target server, or 0 if there are no matches. |
|
Determines whether there is a PCI adapter in the target server that matches the specified sub-vendor ID, where subvendor_id is a hexadecimal value. The return value is the number of matching adapters in the target server, or 0 if there are no matches. |
|
Determines whether there is a PCI adapter in the target server that matches the specified sub-device ID, where subdevice_id is a hexadecimal value. The return value is the number of matching adapters in the target server, or 0 if there are no matches. |
|
Causes the PCI scan to begin at the specified bus number, instead of starting at bus 0, by default. This parameter is only valid when more than one /vid, /did, /svid, or /sdid parameter is specified on the command line. |
|
Causes the PCI scan to begin at the specified device number, instead of starting at device number 0, by default. This parameter is only valid when the /bn parameter is specified on the command line. |
|
Adds an integer number, num, to the return value before exiting. This is useful to obtain a sum of different PCI adapters, with different PCI IDs, in a target server. The return value is the resultant sum of all other return values plus num. |
Example | Description |
---|---|
|
Determines if the target server is an IBM server or not, and branches accordingly to perform equipment-specific steps |
|
Determines if the target server is either a machine type 8676 or machine type 8669 server, and branches accordingly to call a system-specific batch file or displays a message of non-support for other machine types |
|
Creates an output file that lists the hardware configuration for the target server, so that the clini.exe utility can search for a specific PCI adapter from a vendor and set en environment variable accordingly |
|
Determines if there is at least one IBM ServeRAID 6i/6i+/6M PCI adapter in the target server, and calls a batch file to process adapter-specific tasks |
|
Determines the total number of IBM ServeRAID adapters in the target server, assuming there are no more than three of each type: IBM ServeRAID 4, IBM ServeRAID 5, and IBM ServeRAID 6/6i/6M |
|
Displays hardware configuration information about the target server. The >hwdetect.out parameter is a Windows output-redirect option that causes the output from the hwdetect.exe utility to be saved in the specified file. |
[System]
Machine_Type=8674
Model_Number=42X
Serial_Number=78Z9506
Product_Name=eserver xSeries 330
BIOS_version=1.04
BIOS_Build_Level=EME112A
BIOS_DATE=06/28/2002
BIOS_Manufacturer=IBM
BIOS_Language=US
Number_Of_Enclosures=1
Enclosure_Type.0=23
Processor_Slots=2
Active_Processors=1
Processor_Family.0=17
Processor_Speed_MHz.0=1400
Processor_X64 = TRUE
Total_Enabled_Memory_Mb=256
ROM_Diagnostics_Build_Level=EME112A
ISMP_Build_Level=BR8T30A
RSA_Build_Level=GEE834A
System_UUID = 8030E01060F010B010605090D0A020F0
Blade_Chassis_UUID = 0F020A0D0900F00F020A0D0900F00F02
Blade_Slot = 02
[PCI]
Total_Number_Devices=10
Bus_Number.0=0
Device_Number.0=1
Function_Number.0=0
Class_Code.0=0000
Revision.0=0
Header_Type.0=0
Vendor_ID.0=5333
Device_ID.0=8A22
Subvendor_ID.0=1014
Subdevice_ID.0=01C5
Bus_Number.1=0
Device_Number.1=2
Function_Number.1=0
Class_Code.1=0000
Revision.1=0
Header_Type.1=0
Vendor_ID.1=8086
Device_ID.1=1229
Subvendor_ID.1=1014
Subdevice_ID.1=105C
System_Machine_Type = 8674
System_Model_Number = 42X
System_Serial_Number = 78Z9506
…
PCI_Bus_Number.0 = 0
PCI_Device_Number.0 = 1
...