Windows 7 / Getting Started

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&copy; 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.

[Previous] [Contents] [Next]

In this tutorial:

  1. Managing Devices and Services
  2. Understanding Device Installation and Management
  3. Device Enhancements in Windows 7
  4. Display Enhancements in Windows 7
  5. Understanding Device Installation
  6. Driver Store and Driver Packaging
  7. Driver Staging vs Installation
  8. Driver Staging and Installation Process
  9. Detailed Installation Process
  10. Managing Driver Packages
  11. Using PnPutil.exe
  12. Using Dism.exe
  13. Driver Signing
  14. Driver Ranking
  15. Installing and Using Devices
  16. Enhancements to the Device Installation Experience in Windows 7
  17. Scenario 1: Driver found in Driver Store
  18. Scenario 2: Driver found on Windows Update
  19. Scenario 3: Driver in Driver Store, But Better Driver on Windows Update
  20. Scenario 5: No Driver Can Be Found for the device
  21. Scenario 6: Vendor -supplied media is available
  22. Scenario 7: Additional Device Software is Available For Download from vendor
  23. Configuring Device Installation Settings
  24. Using the Devices And Printers Folder
  25. Understanding Device Stage
  26. Understanding the Device Experience Architecture
  27. Device Containers
  28. Device display object
  29. Device Metadata System
  30. Managing Device Installation Using Group Policy
  31. Managing Device Installation Behavior
  32. Managing Driver Installation Behavior
  33. Blocking Installation of Removable Devices
  34. Managing Device Redirection Behavior
  35. Troubleshooting Device Installation
  36. Using Windows Error Reporting
  37. Using the SetupAPI Log File
  38. Using Driver INF Files
  39. Using Device Manager Error Codes
  40. Using Driver Verifier
  41. Repairing Driver Store Corruption
  42. Repairing Index File Corruption
  43. Understanding Power Management
  44. Power Management Enhancements in Windows 7
  45. New Power Policies in Windows 7
  46. Configuring Power Management Settings
  47. Configuring Power Management Settings Using the Power Options Utility in Control Panel
  48. Configuring Power Management Settings Using Group Policy
  49. Configuring Power Management Settings Using the Powercfg Utility
  50. Understanding Services
  51. Service Enhancements in Windows 7
  52. Managing Services
  53. Managing Services Using Task Manager
  54. Managing Services Using the Sc.exe Command