Using the SetupAPI Log File
In Windows XP, the SetupAPI.log found under %Windir% is a plain text log file that you can use to troubleshoot issues with installing devices. Beginning with Windows Vista, this log is moved to %Windir%\Inf and consists of two separate log files: SetupAPI.app.log and SetupAPI.dev.log. Each log file is made up of distinct sections, with each section representing one device install.
<Log Header>
>>> Section header
Device Driver install section 1
<<< End Section
>>> Section header
Device Driver install section 2
<<< End Section
>>> Section header
Device Driver install section 3
<<< End Section
...
The INF file for the device driver controls device installation, and the SetupAPI logs record a series of entries corresponding to each instruction in the INF file, along with whether the action succeeded or failed. When parsing these logs to troubleshoot device installation issues, a good place to start is looking for problem descriptions such as "device did not install" or "wrong driver installed" or a message saying "Exit status: FAILURE".
The following example illustrates a device installation problem reported in the SetupAPI logs.
>>> [Device Install (Hardware initiated) - USB\VID_045E&PID_00BD\{0D51C6EB-7E08-D342- 9E60-177B6A619B96}] >>> Section start 2006/08/17 13:40:16.348 ump: Creating Install Process: DrvInst.exe 13:40:16.348 ndv: Retrieving device info... ndv: Setting device parameters... ndv: Building driver list... dvi: {Build Driver List} 13:40:16.645 dvi: Searching for hardware ID(s): dvi: usb\vid_045e&pid_00bd&rev_0100 dvi: usb\vid_045e&pid_00bd dvi: Searching for compatible ID(s): dvi: usb\class_ff&subclass_ff&prot_ff dvi: usb\class_ff&subclass_ff dvi: usb\class_ff dvi: Enumerating INFs from path list 'C:\Windows\INF' inf: Searched 0 potential matches in published INF directory inf: Searched 34 INFs in directory: 'C:\Windows\INF' dvi: {Build Driver List - exit(0x00000000)} 13:40:16.818 ndv: Selecting best match... dvi: {DIF_SELECTBESTCOMPATDRV} 13:40:16.819 dvi: No class installer for 'Microsoft© Fingerprint Reader' dvi: No CoInstallers found dvi: Default installer: Enter 13:40:16.821 dvi: {Select Best Driver} !!! dvi: Selecting driver failed(0xe0000228) dvi: {Select Best Driver - exit(0xe0000228)} !!! dvi: Default installer: failed! !!! dvi: Error 0xe0000228: There are no compatible drivers for this device. dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 13:40:16.824 ndv: {Core Device Install} ndv: Device install status=0xe0000203 ndv: Performing device install final cleanup... ndv: Queueing up error report since device installation failed... ndv: {Core Device Install - exit(0xe0000203)} ump: Server install process exited with code 0xe0000203 13:40:16.832 <<< Section end 2006/08/17 13:40:16.837 <<< [Exit status: FAILURE(0xe0000203)]
The problem reported is failure to install the Microsoft Fingerprint Reader, and the cause of the problem is reported in the error message "There are no compatible drivers for this device."
By default, Windows Vista and later versions log device behavior in the SetupAPI logs at a more verbose level than in previous versions of Windows. You can use the following DWORD registry value to configure the verbosity level for these logs:
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\LogLevel
The default setting for this value is 0x2000ffff. For information on how to configure logging levels for the SetupAPI logs, see the white paper, "Debugging Device Installation in Windows Vista," found at http://www.microsoft.com/whdc/driver/install/diagnose.mspx.
In this tutorial:
- Managing Devices and Services
- Understanding Device Installation and Management
- Device Enhancements in Windows 7
- Display Enhancements in Windows 7
- Understanding Device Installation
- Driver Store and Driver Packaging
- Driver Staging vs Installation
- Driver Staging and Installation Process
- Detailed Installation Process
- Managing Driver Packages
- Using PnPutil.exe
- Using Dism.exe
- Driver Signing
- Driver Ranking
- Installing and Using Devices
- Enhancements to the Device Installation Experience in Windows 7
- Scenario 1: Driver found in Driver Store
- Scenario 2: Driver found on Windows Update
- Scenario 3: Driver in Driver Store, But Better Driver on Windows Update
- Scenario 5: No Driver Can Be Found for the device
- Scenario 6: Vendor -supplied media is available
- Scenario 7: Additional Device Software is Available For Download from vendor
- Configuring Device Installation Settings
- Using the Devices And Printers Folder
- Understanding Device Stage
- Understanding the Device Experience Architecture
- Device Containers
- Device display object
- Device Metadata System
- Managing Device Installation Using Group Policy
- Managing Device Installation Behavior
- Managing Driver Installation Behavior
- Blocking Installation of Removable Devices
- Managing Device Redirection Behavior
- Troubleshooting Device Installation
- Using Windows Error Reporting
- Using the SetupAPI Log File
- Using Driver INF Files
- Using Device Manager Error Codes
- Using Driver Verifier
- Repairing Driver Store Corruption
- Repairing Index File Corruption
- Understanding Power Management
- Power Management Enhancements in Windows 7
- New Power Policies in Windows 7
- Configuring Power Management Settings
- Configuring Power Management Settings Using the Power Options Utility in Control Panel
- Configuring Power Management Settings Using Group Policy
- Configuring Power Management Settings Using the Powercfg Utility
- Understanding Services
- Service Enhancements in Windows 7
- Managing Services
- Managing Services Using Task Manager
- Managing Services Using the Sc.exe Command