Hardware profile detection determines the computer's hardware profile. Although most desktop computers will have only one hardware profile, dockable portables typically have one hardware profile for the undocked state and another for each dock to which they connect.
Hardware profile detection runs before the CONFIG.SYS file is executed during MS-DOS startup. Hardware profile detection combines interrupt checksums, BIOS COM/LPT data, BIOS machine identification data, Plug and Play BIOS Docking Station data, and, if possible, docking station data which is unique to each OEM and builds a 2 byte value known as the current hardware profile (or the current configuration).
Each hardware profile has a "friendly name." If the current hardware profile's friendly name exactly matches a top-level menu item in a multi-configured CONFIG.SYS file, that menu item or submenu is automatically selected.
The registry uses the current hardware profile to point the predefined key HKEY_CURRENT_CONFIG to the correct location (subsidiary to the predefined key HKEY_LOCAL_MACHINE). For example, if the current hardware profile were 0x5107, HKEY_CURRENT_CONFIG would be initialized to HKEY_LOCAL_MACHINE\CONFIG\5107.