setupapi.dev.log C:\Windows\INF\setupapi.dev.log
SetupAPI text log for device and driver installation; essential for diagnosing a driver problem.
What it’s for
SetupAPI, the component that installs devices, has kept a device installation text log (setupapi.dev.log) and an application installation text log (setupapi.app.log) since Windows Vista. The first is the reference for understanding why a driver fails to install or why a device is not recognized.
What it contains
- One section per device or driver installation operation: start, INF files evaluated, driver selected, file copy, device start.
- The final status of each section, success or failure with the error code.
- Driver store (DriverStore) staging operations.
Risks and best practices
- Deleting it has no effect on how Windows runs, but you lose the history, so keep it until a driver diagnosis is over.
- SetupAPI logs are always in English, whatever the Windows display language.
- The detail level depends on the
LogLevelRegistry value. Raise it only for the duration of a diagnosis. - The log cites hardware IDs and serial numbers, so review it before sending it on.
Useful commands
# Last linesGet-Content "$env:windir\INF\setupapi.dev.log" -Tail 60
# Last sections that ended in failure, with the 12 lines before eachSelect-String -Path "$env:windir\INF\setupapi.dev.log" -Pattern "Exit status: FAILURE" -Context 12,0 | Select-Object -Last 3Format
ANSI text file. Each operation is framed by an opening line (>>>) and a closing line (<<<) that carries the exit status, with timestamps and indented detail lines.
Rotation and archiving
The file lives in %SystemRoot%\inf. Older versions are kept there as setupapi.dev_YYYYMMDD_HHMMSS.log.
How to read it
Find the time of the installation in question, then read the section that starts with >>> at that moment. Work backward from the Exit status line to the first lines reporting an error: file not found, signature, copy failure.