Windows Setup and Device Installation Logging
Updated: December 4, 2001
The Microsoft Windows Setup and Device Installer Services DLL, also known as SetupAPI, includes the Windows routines that control Setup and device installation. The Setup routines--which have the prefix Setup--handle INF file processing, error handling, disk prompting, file queuing, logging, and so forth. These routines are "General Setup Functions" described in the Device Installation section of the Windows Driver Kit (WDK) and are also documented in the Microsoft Platform SDK.
The information in this article applies for Windows 2000 and Windows XP.
The device installation functions have the prefix SetupDi, and are described in the Device Installation section of the WDK. These functions handle all aspects of device driver installation. The public declarations for both groups of functions are in the public header file Setupapi.h, which is included in the WDK.
SetupAPI logs its actions to the Setupapi.log file. This log file provides valuable information for troubleshooting and debugging Setup, device installation, and related issues. The information stored in the log file includes errors, warnings, and related information, including time information.
SetupAPI allows the logging level to be set to log errors only or to include warnings and other information. It also allows the logging level to choose the grade of information logged. The developer can modify the verbosity of logging as required for specific issues, or turn off logging altogether. The developer can also choose to log the information to a debugger as well as to the log file.
SetupAPI logs two sets of information to the log file:
By default, the log file is stored in %SystemRoot%\setupapi.log. To debug Windows Setup, the developer can either:
For detailed information about this capability, see "Troubleshooting Device and Driver Installations" in the Windows Driver Kit (WDK).
Call to action for Windows device installation: