Previous | Next

Safe Detection, Safe Recovery, and Verification

This section provides technical details about the features that ensure safe hardware detection, recovery from Setup problems, and configuration verification in Windows 98 Setup.

Safe Detection in Windows 98 Setup

Devices and buses are grouped as classes in Windows 98 for purposes of detecting and installing device drivers and managing system resources. Windows 98 differentiates between devices and drivers that comply with the Plug and Play specification and earlier versions of devices and drivers (referred to in the Microsoft Windows 98 Resource Kit as legacy devices). Because of this differentiation, Windows 98 Setup detects hardware components and devices in two ways:

After Setup detects a device, it adds configuration information to the registry and installs the appropriate device drivers. The same procedures used during Setup for detecting Plug and Play or legacy hardware devices are also used to detect or configure new devices after Windows 98 has been installed.

Windows 98 supports detection of base computer components, such as communications ports and processor type, and provides more robust detection of computer devices, such as display adapters, pointing devices, hard disk controllers, floppy-disk controllers, and network adapters.

Windows 98 Setup also tries to detect any hardware resource conflicts early in the installation process. This helps to avoid the problems that occur when such hardware resources as Interrupt Requests (IRQs), I/O addresses, and direct memory access (DMA) are used by more than one device.

To avoid computer failure during the detection process, Windows 98 uses a safe detection method to search for hints from configuration files, read-only memory (ROM) strings, or drivers loaded in memory to determine whether the computer contains each class of hardware. If no such hints are found, the detection process skips detection of the entire class. If hints are found, the detection process seeks information from specific I/O ports.

Windows 98 automatically reads the command lines in Config.sys to find hints for device class detection. Then Windows 98 loads detection modules based on information in the Msdet.inf file, which lists the hardware to be detected and points to specific INF files for each device class (for example, Scsi.inf for SCSI host adapters). Device information from the INF files is written to the registry.

For more information about the format of these files, see Appendix C, "Windows 98 INF Files."

Windows 98 can also read a particular Config.sys device= line for resource information to be avoided (that is, protected) during the detection process. This is useful if Windows 98 Setup cannot detect or support a certain device when it is known that the detection process can cause such a device to fail. For example, the detection process could render a fax modem inoperative because scanning the I/O port might confuse the device driver. Windows 98 can read the device= line in Config.sys for this model and protect the associated I/O region from other detection modules.

Windows 98 Setup asks you to confirm which classes should be skipped in the detection process. If you know that the computer has a device in one of those classes, you can force Setup to detect that device class.

Safe detection exists for four classes of devices: network adapters, SCSI controllers, proprietary CD-ROM adapters, and sound cards.

Safe Detection of Network Adapters

Windows 98 Setup performs the following kinds of steps for safe detection of network adapters:

Safe Detection of SCSI Controllers

When trying to detect SCSI adapters, Windows 98 Setup checks for device drivers in Config.sys and then scans ROM strings from the SCSI adapter for manufacturers’ names. If known drivers or known strings are found, the corresponding detection procedure for that class is used; otherwise, the entire class is skipped. A list of the known strings and drivers that Windows 98 Setup checks is stored internally in a detection dynamic-link library (DLL). (For more information about the SCSI devices and drivers that Windows 98 supports, see the Manufacturers and Models lists in the Add New Hardware option in Control Panel.)

Different SCSI devices require different methods for safe detection. For example, a SCSI card is typically used with a combination of hard disks, CD-ROM drives, tape backup drives, scanners, and similar devices. For everything to work (except the hard disk), some sort of device driver must be loaded in Config.sys.

For hard disk drives, however, the driver usually is not loaded in Config.sys, but INT 13 ROM is enabled. Therefore, safe detection for SCSI class devices looks for a ROM string with a manufacturer’s name.

Safe Detection of Proprietary Adapters for CD-ROM

Windows 98 supports Mitsumi, SONY, and Panasonic proprietary adapters for CD-ROM. Because drivers for these devices are loaded in Config.sys, safe detection first scans Config.sys for the drivers that are present. If a device= line for such a driver is found, the corresponding detection module is loaded for that type of device.

Safe Detection of Sound Cards

Safe detection scans Config.sys and reads System.ini for hints about sound cards. If known drivers are not found, the entire class is skipped.

If Windows 98 does not have detection code for certain hardware, the equipment manufacturer can force a device to be detected by adding information about it in the Msdet.inf file. Windows 98 detection behaves as if it has detected the device and installs the device according to the INF information provided by the equipment manufacturer.

Windows 98 Setup does not detect sound cards by scanning I/O ports; instead, it checks only Config.sys and System.ini and performs detection as prescribed in Msdet.inf. Detection of sound cards by scanning I/O ports can cause the computer to stall. This is because detection calls a driver specific to a device class to send a signal to an I/O port. The driver expects a predetermined response, such as a signature from the adapter’s ROM. If the wrong driver sends a signal to an I/O port address occupied by a different device class, the computer can stall.

Safe Recovery with Setup Log Files

Windows 98 Setup creates several log files: Bootlog.txt, Detlog.txt, Netlog.txt, and Setuplog.txt, as well as Detcrash.log, should Setup fail. The following sections describe these files.

Basically, the computer might stop or stall at three points during Windows 98 Setup: before, during, or after hardware detection.

Setuplog.txt: The Setup Log File

The Setuplog.txt file is an ASCII text file that contains Windows 98 Setup information created during the installation process. While Windows 98 is being installed, corresponding entries are written to Setuplog.txt, listing information about the specific steps, their sequence, and the error conditions encountered. This file is used by Setup for recovery in case of setup failure, and it can also be used for troubleshooting errors that occur during the installation process.

Setup uses the information in Setuplog.txt to ensure that the installation does not fail twice because of the same problem. If you restart Windows 98 Setup after a setup process fails, Setup reviews the contents of Setuplog.txt to determine which steps completed successfully. If Setuplog.txt indicates that a process started but does not indicate that the process completed, that part of the installation process is skipped, and the next part is processed. Even if Setup encounters devices that cause several installation attempts, the installation process will always progress and skip the modules that failed.

Setuplog.txt is stored on the computer’s root directory. Information is added to the file according to the order of the steps of the installation process. If an error occurs during installation, you can determine the probable cause of the error by examining the entries at the end of Setuplog.txt.

Information in Setuplog.txt is divided into the following basic categories:

Tip

The [OptionalComponents], [System], and [NameAndOrg] sections can be copied from Setuplog.txt on a computer with a complete installation of Windows 98 and then added to equivalent sections in Msbatch.inf, as described in Chapter 3, "Custom Installations." Notice, however, that these sections in Setuplog.txt do not include networking information.

Table 5.1 shows entries in the Setuplog.txt file to check for information about the Setup process. Because entries are added to Setuplog.txt in the order that the related actions occur during Setup, you might be able to find a probable cause of any error by examining the entries at the end of the file.

Table 5.1 Summary of Setuplog.txt entries

Setuplog.txt entry Description
InstallType Type of installation
InstallDir Directory where Windows 98 is installed
detection Detection status
RunningApp Applications running during installation
RootFilesRenamed Files renamed in the root directory
error Errors logged during installation
failed Failures that occurred during installation
[OptionalComponents] Optional components installed
[System] System hardware configuration
batch settings Installation parameters (Msbatch.inf settings)
Registry Registry initialization status
filename Verification that a specific file was loaded during Setup
[Choose Directory] Location and type of Windows files
[FileCopy] Files copied during Setup
[Restart] Issues to be completed after the computer is restarted

Detlog.txt: The Hardware Detection Log File

The Detlog.txt file contains a record of whether a specific hardware device was detected and identifies the parameters for the detected device.

During Windows 98 Setup, after Setup restarts your computer for the first time, it begins hardware detection, which can also occur when you use the Add New Hardware option in Control Panel to add a new device. Both Windows 98 Setup and Device Manager use Sysdetmg.dll, which contains all the detection modules for each device class and specific devices.

Windows 98 loads detection modules based on information in Msdet.inf that points to specific INF files for each device class, from which information is retrieved and written to the registry. The device class installers are DLLs that work with Device Manager to install, configure, and remove devices or classes of devices in the system. Device Manager generates a list of compatible drivers for the device from the appropriate INF file. For information about using Device Manager to configure device drivers, and for information about the device classes used to identify logical device types, such as display, keyboard, and network adapters, see Chapter 24, "Device Management."

By creating an updated Detlog.txt file every time the detection process runs, the detection module tracks the detected devices and the I/O port addresses used. Any existing Detlog.txt is renamed Detlog.old. If the detection process causes Setup to stall or the computer to lock up, a binary file named Detcrash.log is created. Detlog.txt is an ASCII text file created only for users to read; Windows 98 Setup reads the binary information in Detcrash.log. Any changes made to Detlog.txt are not passed to Detcrash.log.

The Detlog.txt file can be found in the root directory of the startup drive after Windows 98 is installed. The entries in Detlog.txt are placed in the order of the hardware information discovered as each step of the detection process is carried out. Table 5.2 briefly describes entries that appear in Detlog.txt.

Table 5.2 Summary of Detlog.txt entries

Detlog.txt Entry Description
Beginning of Detlog.txt:
Parameters="xxxxxx" Shows the switches specified in the Setup command line (that is, setup /p xxxxxx). For example:

Parameters "", Flags=01002233

WinVer = ######## Shows that environment detection is run. The MS-DOS version is in the high word, and the Windows version is in the low word. For example:

WinVer=0614030b,

AvoidMem =
#####h-#####h
If present, indicates the address range specified as upper memory blocks (UMBs), which detection avoids. For example:

AvoidMem=cd4a0-cd50f

DetectClass: Skip Class Media Indicates that detection found no hints that the computer might have a particular device, so it skipped that class. For example, DetectClass: Skip Class Media indicates that no sound entries appear in the configuration files, so detection skips all the sound card detection modules. For DetectClass: Skip Class Adapter, detection skips searching for proprietary CD-ROM adapters such as SONY, Mitsumi, and Panasonic. DetectClass: Skip Class Net indicates that detection was skipped for network adapters.
DetectClass Override: If one or more skip class entries appear in Detlog.txt, the Analyzing Your Computer screen appears in Setup to confirm skipping those classes, so you can override the decision. Related DetectClass Override lines appear in Detlog.txt for the classes checked.
Custom Mode: Describes your selection for the devices you tell Windows 98 not to detect. For example:

CustomMode: resetting class ADAPTER
; Don't detect EtherLinkIII
CustomMode: DETECTELNK3=0

Devices verified = Indicates the number of devices verified from the registry. If the number is 0, it usually means there was no existing registry, or the registry was empty.
Detecting system devices:
Checking for: Specifies that detection began looking for that device. The entry is followed by a description of the device or class being sought. When detection is checking for such a device as the Programmable Interrupt Controller, the Checking for: entry is followed by a QueryIOMem: entry specifying the Caller, rcQuery, and I/O range checked. If a device is detected, a Detected: entry is added specifying the device resource information. For example:

Checking for: Programmable Interrupt Controller
QueryIOMem: Caller=DETECTPIC, rcQuery=0
IO=20-21,a0-a1
Detected: *PNP0000\0000 =
[1] Programmable Interrupt Controller
IO=20-21,a0-a1
IRQ=2

Detecting network adapters:
Checking for: This section lists the attempts to detect network adapters. For example:

Checking for: Network Cards using Novell
ODI Driver
Checking for: EISA Network Cards

Protocol.ini Section If detection finds Protocol.ini, it saves the [net_card] section in Detlog.txt. For example:

Checking for: Network Cards using
Microsoft Windows For Workgroups
; path to WFW protocol.INI
WFW: path=d:\w311\protocol.ini
; protocol.ini mac driver section
Protocol.ini: [MS$EE16]
Protocol.ini: DriverName=EXP16$

NCD: detecting network adapter Indicates that detection has found a network adapter using safe detection (usually Protocol.ini), but the system has information for verifying this adapter. If this adapter is verified, a Detected line follows. For example:

NCD: detecting network adapter *pnp812d
QueryIOMem: Caller=DETECTWFW, rcQuery=0
IO=300-30f


The hardware detection process continues examining computer hardware. The "|" symbol in the IO= line (for example, IO=200-201 | 3e0-3e1) indicates a range of I/O entries that are checked during the detection process. In the Detlog.txt file, you will find a QueryIOMem: and an IO= line for each I/O address checked.

For most devices, multiple I/O addresses are checked, which can result in a detailed and redundant device detection list. The I/O address ranges checked during detection are grouped on one I/O line. Multiple addresses on an IO= line are separated by commas. For example:

Checking for: ATI Ultra Pro/Plus (Mach 32) Display Adapter
QueryIOMem: Caller=DETECTMACH32, rcQuery=0
    IO=3b0-3bb,3c0-3df
QueryIOMem: Caller=DETECTMACH32, rcQuery=0
    Mem=a0000-affff

If the system stalls during hardware detection, you can determine the probable cause of the error by examining the last entries in Detlog.txt. You can use the information in this file to determine specific error conditions occurring in the hardware detection and reconfigure or replace the specific adapter or device. Table 5.3 shows specific kinds of entries to check in Detlog.txt for information about the results of the hardware detection process.

Table 5.3 Detlog.txt entries to check for troubleshooting

Detlog.txt Entry Description
detected Detected devices
AvoidMem Address ranges of UMBs avoided during detection
error Errors logged during system detection
WinFlags Setup mode used
Protocol.ini Protocol.ini information that was saved during system upgrade
CustomMode Hardware that was removed from detection in the custom Analyzing Your Computer dialog box
Devices verified Devices found in the registry (if the value is 0, there was no existing registry, or the registry was empty)

Some additional notes on Detlog.txt and hardware detection:

The hardware that has been tested and shown to be compatible with Windows 98 appears in the Manufacturers and Models lists in the Add New Hardware option in Control Panel.

Netlog.txt: The Network Setup Log File

Netlog.txt describes the detection results for network components during Windows 98 Setup. For information about Netdet.ini, the file that Setup uses to determine how to install networking components on computers running NetWare clients, see Chapter 17, "Windows 98 on Third-Party Networks."

Table 5.4 describes typical entries in a Netlog.txt file after you run Windows 98 Setup the first time. In this example, Client for Microsoft Networks is installed with the Internet Packet Exchange/Sequenced Packet Exchange (IPX/SPX)-compatible protocol, and both are bound to an Intel EtherExpress network adapter.

Table 5.4 Summary of Netlog.txt entries

Netlog.txt entry Description
ClassInstall (0x6) on Intel EtherExpress 16 or 16TP at Enum\Root\*PNP812D\0000 Network installation begins.
Examining class NET Network detection is searching for network software of four class types: NET (network adapters), NETTRANS (protocols), NETCLIENT (clients), and NETSERVICES (such services as file and printer sharing).
Upgrade 2.00025000=VREDIR A network client was found on the computer.
Upgrade to: VREDIR The version of the network client was upgraded to the version included in Windows 98.
NdiCreate (Client for Microsoft Networks) OK Setup successfully created an internal object representing the network client.
NdiCreate (Intel EtherExpress 16 or 16TP) Setup successfully created an internal object representing the network adapter.
CreateNetwork, Batch=0 Setup referenced a batch file.
NdiCreate (IPX/SPX-compatible Protocol) Setup successfully created an internal object representing the IPX/SPX-compatible protocol.
ClassInstall (0x6) end
ClassInstall (0x9) on Intel EtherExpress 16 or 16TP at Enum\Root\*PNP812D\0000 Protocols are about to be bound to the network adapter.
Validating IPX/SPX-compatible Protocol at Enum\Network\NWLINK
\0000, rc=0x0
The IPX/SPX-compatible protocol is added to the registry and bound to the network adapter.
ClassInstall (0x9) on Intel EtherExpress 16 or 16TP at Enum\Root\*PNP812D\0000 Clients are about to be bound to the network adapter.
Validating Client for Microsoft Networks at Enum\Network\VREDIR
\0000, rc=0x0
Client for Microsoft Networks is added to the registry and bound to the network adapter.
ClassInstall (0x9) end Setup has finished binding the protocol to the network adapter.
ClassInstall (0xa) on Intel EtherExpress 16 or 16TP at Enum\Root\*PNP812D\0000 The network setup process is concluded.
ClassInstall (0xa) end
ClassInstall (0xc) on Intel EtherExpress 16 or 16TP at Enum\Root\*PNP812D\0000
ClassInstall (0xc) end