setupapi.log is a plain-text file that contains some interesting information about various devices and service-pack installations. The file may contain serial numbers of the devices connected to Windows machine. By studying setupapi.log it may be possible to tell if a particular device has been connected to the computer during OS installation #-199 message –newsetup or connected at a later stage incl. date and time when it was connected.
The file is located in %windir%\ directory for Windows XP machines.
Microsoft has a good paper regarding this log file Troubleshooting Device Installation with the SetupAPI Log File
Harlan Carvey in his book Windows Forensic Analysis DVD Toolkit explained very well the significance of setupapi.log to forensic examiners.
Vista has two similar files setupapi.app.log and setupapi.dev.log located in %windir%\inf\ directory.
setupapi.dev.log becomes the primary log file and setupapi.app.log contains some legacy logging information.
Useful links in relation to Vista log files are: