*Updated formatting - 4/13/10*

Introduction

This is the second blog in a series of articles which discusses the troubleshooting and diagnosis of driver installation issues in Windows Embedded Standard 7 (Standard 7). Previously we presented the different phases of setup and a brief introduction to SetupAPI logging and the SetupAPI.dev.log file. We will now start off with the format of the SetupAPI.dev.log file.

Format of the SetupAPI.dev.log file

The SetupAPI.dev.log file is composed of entries which consist of a text log header and zero or more text log sections.

Text Log Header

Here is an example of a text log header.

[Device Install Log]
OS Version = 6.1.7600
Service Pack = 0.0
Suite = 0x0140
ProductType = 1
Architecture = x86

[BeginLog]

Text Log Sections

The text log sections which follow the text log header record events during a single device installation. Each text log section is a contiguous sequence of log entries that provide information about a particular installation operation. Text log sections appear in the log in the order in which they are created.

Each text log section is broken up into three areas:

1. Text Log Section Header – these are made up of two entries.

a. The first entry begins with a “>>>” prefix followed by a title. Optionally the title is followed by a “-“ and instance identifier. Below is an example.

>>> [Setup online Device Install (Hardware initiated) - pci\ven_8086&dev_284b&subsys_01da1028&rev_02\3&172e68dd&0&d8]

b. The second entry begins with “>>> Section start” followed by a timestamp (yyyy/mm/dd hh:mm:ss.sss, sss = milliseconds). See below for an example.

>>> Section start 2010/01/18 01:22:11.960

2. Text Log Section Body – contains zero or more log entries that apply to the operation that is associated with a text log section. The format of a section body log entry is entry prefix, timestamp, event category, indentation field and formatted message.

a. Entry Prefix – indicates whether the log entry is an error, warning or informational message. Below is a table of entry prefix types.

Entry Prefix

Type of message

"!!!  "

An error message

"!    "

A warning message

"     "

Information message other than an error message or a warning message

b. Timestamp (yyyy/mm/dd hh:mm:ss.sss, sss = milliseconds)

c. Event Category – indicates the category of the SetupAPI operation that made the log entry. Below is a table of the event categories.

Event Category

SetupAPI operation

"...: "

Vendor-supplied operation

"bak: "

Backup data

"cci: "

Class installer or co-installer operation

"cpy: "

Copy files

"dvi: "

Device installation

"flq: "

Manage file queues

"inf: "

Manage INF files

"ndv: "

New device wizard

"prp: "

Manage device and driver properties

"reg: "

Manage registry settings

"set: "

General setup

"sig: "

Verify digital signatures

"sto: "

Manage the driver store

"ui : "

Manage user interface dialog boxes

"ump: "

User-mode PnP manager

d. Indentation Field – these are just filled in space characters which are used to make the text log section body output easier to read. This helps to group related SetupAPI operations in the log output.

e. Formatted Message – contains the specific information that applies to the log entry.

Below is an example snippet from a text log section body. Note: these are informational messages since the log entries do not begin with “!!! ” or “!! ”.

ump: Creating Install Process: DrvInst.exe 01:22:11.960
ndv: Retrieving device info...
ndv: Setting device parameters...
ndv: Searching Driver Store and Device Path...
dvi: {Build Driver List} 01:22:11.960
dvi: Searching for hardware ID(s):
dvi:  pci\ven_8086&dev_284b&subsys_01da1028&rev_02
dvi:  pci\ven_8086&dev_284b&subsys_01da1028
vi:  pci\ven_8086&dev_284b&cc_040300
dvi:  pci\ven_8086&dev_284b&cc_0403
dvi: Searching for compatible ID(s):
dvi:  pci\ven_8086&dev_284b&rev_02
dvi:  pci\ven_8086&dev_284b
dvi:  pci\ven_8086&cc_040300
dvi:  pci\ven_8086&cc_0403
dvi:  pci\ven_8086
dvi:  pci\cc_040300
dvi:  pci\cc_0403
cpy: Policy is set to make all digital signatures equal.
dvi: Enumerating INFs from path list 'C:\Windows\inf'
inf: Opened PNF: 'C:\Windows\System32\DriverStore\FileRepository\hdaudbus.inf_x86_neutral_349139f09f579763\hdaudbus.inf' ([strings.0409])
dvi: Created Driver Node:
dvi: HardwareID - PCI\CC_0403

3. Text Log Section Footer – this closes a text log section, it consists of two entries.

a. The first entry begins with “<<< Section end” followed by a timestamp. Below is an example.

<<< Section end 2010/01/18 01:22:14.721

b. The second entry consists of “<<< [Exit status: (status)]”. The format of status is “SUCCESS” or “FAILURE(0xhhhhhhhh)”, where hhhhhhhh is an 8-digit hexadecimal field. If the status is not present, the format is simply “<<< [Exit]”. See below for an example.

<<< [Exit status: SUCCESS]

Device driver setup issue scenario

To illustrate using the SetupAPI.dev.log for driver installation analysis, consider that we installed a basic image using IBW on a device with a smart card reader attached and have chosen to “Automatically detect devices” (the default) in the “Find and select device drivers” screen. However, upon first boot we plug in a smart card into the reader but notice that the light of the reader turns on then off and we are notified that Windows failed to load a driver for this device. Note: we are in the first boot session after the Windows Welcome Phase. Bringing up the “C:\WINDOWS\INF\SetupAPI.dev.log” in a text editor we notice the below.

>>> [Device Install (Hardware initiated) - SCFILTER\CID_417374726964\6&26b04b4d&0&OMNIKEY_AG_Smart_Card_Reader_USB_0_SCFILTER_CID_417374726964]
>>> Section start 2010/01/28 09:44:19.945
ump: Creating Install Process: DrvInst.exe 09:44:19.945
ndv: Retrieving device info...
ndv: Setting device parameters...
ndv: Searching just Driver Store...
dvi: {Build Driver List} 09:44:19.969
dvi: Searching for hardware ID(s):
dvi: scfilter\cid_417374726964
cpy: Policy is set to make all digital signatures equal.
dvi: Enumerating INFs from path list 'C:\Windows\INF'
inf: Searched 0 potential matches in published INF directory
inf: Searched 18 INFs in directory: 'C:\Windows\INF'
dvi: {Build Driver List - exit(0x00000000)} 09:44:20.044
ndv: Selecting best match from just Driver Store...
dvi: {DIF_SELECTBESTCOMPATDRV} 09:44:20.045
dvi: No class installer for 'Smart Card'
dvi: No CoInstallers found
dvi: Default installer: Enter 09:44:20.047
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)} 09:44:20.048
ndv: Skipping Windows Update because no internet connection!
ndv: Searching Driver Store and Device Path...
dvi: {Build Driver List} 09:44:20.063
dvi: Searching for hardware ID(s):
dvi: scfilter\cid_417374726964
cpy: Policy is set to make all digital signatures equal.
dvi: Enumerating INFs from path list 'C:\Windows\inf'
inf: Searched 0 potential matches in published INF directory
inf: Searched 18 INFs in directory: 'C:\Windows\inf'
dvi: {Build Driver List - exit(0x00000000)} 09:44:20.139
ndv: Selecting best match from Driver Store (including Device Path)...
dvi: {DIF_SELECTBESTCOMPATDRV} 09:44:20.140
dvi: No class installer for 'Smart Card'
dvi: Default installer: Enter 09:44:20.140
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)} 09:44:20.142
ndv: {Core Device Install} 09:44:20.143
! ndv: Installing NULL driver!
dvi: Set selected driver complete.
dvi: {DIF_ALLOW_INSTALL} 09:44:20.144
dvi: No class installer for 'Smart Card'
dvi: Default installer: Enter 09:44:20.144
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 09:44:20.145
dvi: {DIF_INSTALLDEVICE} 09:44:20.145
dvi: No class installer for 'Smart Card'
dvi: Default installer: Enter 09:44:20.145
! dvi: Installing NULL driver!
dvi: Writing common driver property settings.
dvi: {Restarting Devices} 09:44:20.153
dvi: Restart: SCFILTER\CID_417374726964\6&26B04B4D&0&OMNIKEY_AG_SMART_CARD_READER_USB_0_SCFILTER_CID_417374726964
dvi: Restart complete.
dvi: {Restarting Devices exit} 09:44:20.192
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICE - exit(0x00000000)} 09:44:20.193
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)} 09:44:20.194
ump: Server install process exited with code 0xe0000203 09:44:20.195
<<< Section end 2010/01/28 09:44:20.198
<<< [Exit status: FAILURE(0xe0000203)]

The above text log section indicates that there is no driver for the “OMNIKEY AG smart card reader”. Here are the important entries from the above text log section.

! 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.

Notice that within these entries several of them are prefixed with “!“ which means these are warnings. In this case, setup (reported to SetupAPI by dvi: Device installation) failed to find any drivers for this device. In the event that a driver is not present, setup will utilize Windows Update (WU) to try and find a driver. However, setup (reported to SetupAPI by ndv: New device wizard) failed to utilize WU because there is no internet connection. Actually we have internet connectivity; the issue is WU support is not present in the image.

ndv: Skipping Windows Update because no internet connection!

Another issue is present as well; we are missing the device class installer for the smart card driver (reported to SetupAPI by dvi: Device installation). For specific device setup classes (such as smart card), there is a required device class installer which is responsible for setup operations specific to this device setup class. Observe the below entry from the above text log section.

dvi: No class installer for 'Smart Card'

We have several issues with the driver installation for the smart card reader which include: no smart card driver present, no WU support and a missing smart card device class installer.

Armed with these clues, we consult the Standard 7 documentation and discover the following. In Standard 7, smart card functionality is provided within the “Credentials and Certificate Management” package, so we need to add this package to our image. This package contains the missing device class installer as well as other required non-driver smart card components. We also need to include all of the dependencies (direct and optional) for this package. Within this package dependency tree are several other smart card drivers (which have not been auto detected by IBW) and support for WU. If we go ahead and re-build our image using IBW by selecting the “Credentials and Certificate Management” package and making sure we include all dependencies (direct and optional), we should be good to go.

After installing and booting up into our image, we now have the smart card reader functional. If we look into the “C:\WINDOWS\INF\SetupAPI.dev.log” we notice the below text log section.

>>> [Device Install (Hardware initiated) - SCFILTER\CID_417374726964\6&26b04b4d&0&OMNIKEY_AG_Smart_Card_Reader_USB_0_SCFILTER_CID_417374726964]
>>> Section start 2010/01/28 16:05:57.100
ump: Creating Install Process: DrvInst.exe 16:05:57.100
ndv: Retrieving device info...
ndv: Setting device parameters...
ndv: Searching just Driver Store...
dvi: {Build Driver List} 16:05:57.115
dvi: Searching for hardware ID(s):
dvi: scfilter\cid_417374726964
cpy: Policy is set to make all digital signatures equal.
dvi: Enumerating INFs from path list 'C:\Windows\INF'
inf: Searched 0 potential matches in published INF directory
inf: Searched 31 INFs in directory: 'C:\Windows\INF'
dvi: {Build Driver List - exit(0x00000000)} 16:05:57.193
ndv: Selecting best match from just Driver Store...
dvi: {DIF_SELECTBESTCOMPATDRV} 16:05:57.193
dvi: No class installer for 'Smart Card'
dvi: No CoInstallers found
dvi: Default installer: Enter 16:05:57.193
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)}
16:05:57.209
ndv: Searching Windows Update for drivers... 16:05:57.240
ndv: Acquired WU search serialization mutex. 16:05:57.240
ndv: About to release WU search serialization mutex. 16:05:58.379
ndv: Found driver on Windows Update, downloading - 0.3 MB... 16:05:58.379
dvi: {Build Driver List} 16:06:08.831
dvi: Searching for hardware ID(s):
dvi: scfilter\cid_417374726964
cpy: Policy is set to make all digital signatures equal.
dvi: Enumerating INFs from path list 'c:\windows\temp\dmiwu\{5bdb8b26-77f4-41fb-979d-c148650e3cd9}'
sig: {_VERIFY_FILE_SIGNATURE} 16:06:08.831
sig: Key = Gemalto.MiniDriver.NET.inf
sig: FilePath = c:\windows\temp\dmiwu\{5bdb8b26-77f4-41fb-979d-c148650e3cd9}\Gemalto.MiniDriver.NET.inf
sig: Catalog = c:\windows\temp\dmiwu\{5bdb8b26-77f4-41fb-979d-c148650e3cd9}\delta.cat
sig: Success: File is signed in catalog.
sig: {_VERIFY_FILE_SIGNATURE exit(0x00000000)} 16:06:08.862
dvi: Created Driver Node:
dvi: HardwareID - SCFILTER\CID_417374726964
dvi: InfName - c:\windows\temp\dmiwu\{5bdb8b26-77f4-41fb-979d-c148650e3cd9}\Gemalto.MiniDriver.NET.inf
dvi: DevDesc - Gemalto Minidriver for .NET Smart Card
dvi: DrvDesc - Gemalto Minidriver for .NET Smart Card
dvi: Provider - Gemalto
dvi: Mfg - Gemalto
dvi: ModelsSec - Minidriver.NTx86.6.1
dvi: InstallSec - Minidriver32_61_Install
dvi: ActualSec - Minidriver32_61_Install.NT
dvi: Rank - 0x00ff0000
dvi: Signer - Microsoft Windows Hardware Compatibility Publisher
dvi: Signer Score - WHQL
dvi: DrvDate - 09/30/2009
dvi: Version - 8.1.0.8
inf: Searched 1 INFs in directory: 'c:\windows\temp\dmiwu\{5bdb8b26-77f4-41fb-979d-c148650e3cd9}'
dvi: {Build Driver List - exit(0x00000000)} 16:06:08.862
ndv: Selecting best match from Windows Update... 16:06:08.862
dvi: {DIF_SELECTBESTCOMPATDRV} 16:06:08.862
dvi: Using exported function 'ScClassInstaller' in module 'C:\Windows\system32\sccls.dll'.
dvi: Class installer == sccls.dll,ScClassInstaller
dvi: No CoInstallers found
dvi: Class installer: Enter 16:06:08.862
dvi: Class installer: Exit
 (Extra lines detailing driver installation omitted)
<<< Section end 2010/01/28 16:06:10.251
<<< [Exit status: SUCCESS]

The above text log section indicates that there is no driver for the “OMNIKEY AG smart card reader” as we have seen before. However, WU is now being used to find and download a driver. Below are the important entries from the above text log section.

ndv: Selecting best match from just Driver Store...
dvi: {DIF_SELECTBESTCOMPATDRV} 16:05:57.193
dvi: No class installer for 'Smart Card'
dvi: No CoInstallers found

dvi: Default installer: Enter 16:05:57.193
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)} 16:05:57.209
ndv: Searching Windows Update for drivers... 16:05:57.240
ndv: Acquired WU search serialization mutex. 16:05:57.240
ndv: About to release WU search serialization mutex. 16:05:58.379
ndv: Found driver on Windows Update, downloading - 0.3 MB... 16:05:58.379

The driver is found from WU, the device class installer is detected/used and the driver is installed with success; see the below entries from the above text log section.

ndv: Selecting best match from Windows Update... 16:06:08.862
dvi: {DIF_SELECTBESTCOMPATDRV} 16:06:08.862
dvi: Using exported function 'ScClassInstaller' in module 'C:\Windows\system32\sccls.dll'.
dvi: Class installer == sccls.dll,ScClassInstaller
dvi: No CoInstallers found
dvi: Class installer: Enter 16:06:08.862
dvi: Class installer: Exit
 (Extra lines detailing driver installation omitted)
<<< Section end 2010/01/28 16:06:10.251
<<< [Exit status: SUCCESS]

Conclusion

Driver installation issues can be identified and solved (in many cases) by looking at the SetupAPI.dev.log. For very challenging driver installation issues, the information provided can be a good starting point and is a great input source for support requests. For further info on the details of SetupAPI logging, follow this link: SetupAPI logging.

The next article in this series (Diagnosis of Driver Setup Issues in Windows Embedded Standard 7 – part 3) will enumerate common driver installation issues in Standard 7 and solutions for them.

- Mark