Ok, my lovely test driver builds and installs fine for Win7 and Vista SP1. Good so far - but now, I need to get it to load in WinPE.
I figure that “drvload” is the right way… so I “drvload hdaudtestdrv.inf”… it says success… nope! Driver not installed. Ok, I know about devcon, let’s try that… so “devcon install hdaudtestdrv.inf ROOT”… nope, devcon failed. So, “devcon status ROOT*”… but wait! There’s an entry “ROOT\HDAUDTESTCLASS\0000” that says “Device is currently stopped”. Ok, SOMETHING happened… but not what I wanted to happen. Oh, for more fun, “devcon remove ROOT\HDAUDTESTCLASS\0000” fails with “No devices were removed”.
Peering into setupapi.dev.log, I see the following output:
--------- begin copy and paste from setupapi.dev.log ---------
>> [Device Install (UpdateDriverForPlugAndPlayDevices) - ROOT]
>> Section start 2010/09/22 10:56:25.262
cmd: devcon install hdaudtestdrv.inf ROOT
dvi: Set selected driver complete.
dvi: {Build Driver List} 10:56:25.294
dvi: Searching for hardware ID(s):
dvi: root
cpy: Policy is set to make all digital signatures equal.
dvi: Processing a single INF: ‘f:\src\hdaudtestdrv.inf’
inf: Opened INF: ‘f:\src\hdaudtestdrv.inf’ ([strings])
dvi: {Build Driver List - exit(0x00000000)} 10:56:25.294
dvi: {DIF_SELECTBESTCOMPATDRV} 10:56:25.294
dvi: No class installer for ‘Unknown driver software package’
dvi: No CoInstallers found
dvi: Default installer: Enter 10:56:25.294
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)} 10:56:25.309
<<< Section end 2010/09/22 10:56:25.309
<<< [Exit status: SUCCESS]
---------------- end copy and paste ----------------------
Ouch! It doesn’t like what I told it, although it did something. More interesting perhaps is the section where drvload tried to do its thing:
-------------------- begin copy and paste from setupapi.dev.log ---------------------
>> [Device Install (DiInstallDriver) - hdaudtestdrv.inf]
>> Section start 2010/09/22 10:53:57.593
cmd: drvload hdaudtestdrv.inf
inf: {SetupCopyOEMInf: F:\src\hdaudtestdrv.inf} 10:53:57.593
sto: {Import Driver Package: F:\src\hdaudtestdrv.inf} 10:53:57.624
sto: Importing driver package into Driver Store:
sto: Driver Store = X:\windows\System32\DriverStore (Online | 6.1.7600)
sto: Driver Package = F:\src\hdaudtestdrv.inf
sto: Architecture = x86
sto: Locale Name = neutral
sto: Flags = 0x00000000
sto: Copying driver package files to ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}’.
inf: Opened INF: ‘F:\src\hdaudtestdrv.inf’ ([strings])
inf: Opened INF: ‘F:\src\hdaudtestdrv.inf’ ([strings])
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘F:\src’
flq: SourceFilename - ‘hdaudtestdrv.inf’
flq: TargetDirectory- ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘F:\src’
flq: SourceFilename - ‘HDAudTestDrv.sys’
flq: TargetDirectory- ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {_commit_file_queue}
flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=2
flq: {_commit_copy_subqueue}
flq: subqueue count=2
flq: source media:
flq: SourcePath - [F:\src]
flq: SourceFile - [hdaudtestdrv.inf]
flq: Flags - 0x00000000
flq: {_commit_copyfile}
flq: CopyFile: ‘F:\src\hdaudtestdrv.inf’
flq: to: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\SETF3DF.tmp’
flq: MoveFile: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\SETF3DF.tmp’
flq: to: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\hdaudtestdrv.inf’
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: ‘F:\src\HDAudTestDrv.sys’
flq: to: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\SETF3E0.tmp’
flq: MoveFile: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\SETF3E0.tmp’
flq: to: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\HDAudTestDrv.sys’
flq: {_commit_copyfile exit OK}
flq: {_commit_copy_subqueue exit OK}
flq: {_commit_file_queue exit OK}
pol: {Driver package policy check} 10:53:57.671
pol: {Driver package policy check - exit(0x00000000)} 10:53:57.671
sto: {Stage Driver Package: X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\hdaudtestdrv.inf} 10:53:57.671
inf: Opened INF: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\hdaudtestdrv.inf’ ([strings])
inf: Opened INF: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\hdaudtestdrv.inf’ ([strings])
sto: Copying driver package files:
sto: Source Path = X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}
sto: Destination Path = X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000010
flq: SourceRootPath - ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}’
flq: SourceFilename - ‘hdaudtestdrv.inf’
flq: TargetDirectory- ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000010
flq: SourceRootPath - ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}’
flq: SourceFilename - ‘HDAudTestDrv.sys’
flq: TargetDirectory- ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {_commit_file_queue}
flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=2
flq: {_commit_copy_subqueue}
flq: subqueue count=2
flq: source media:
flq: SourcePath - [X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}]
flq: SourceFile - [hdaudtestdrv.inf]
flq: Flags - 0x00000000
flq: {_commit_copyfile}
flq: CopyFile: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\hdaudtestdrv.inf’
flq: to: ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}\SETF40E.tmp’
flq: MoveFile: ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}\SETF40E.tmp’
flq: to: ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}\hdaudtestdrv.inf’
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: ‘X:\TEMP{28351d56-3c35-794f-00d4-97378b5d8553}\HDAudTestDrv.sys’
flq: to: ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}\SETF40F.tmp’
flq: MoveFile: ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}\SETF40F.tmp’
flq: to: ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}\HDAudTestDrv.sys’
flq: {_commit_copyfile exit OK}
flq: {_commit_copy_subqueue exit OK}
flq: {_commit_file_queue exit OK}
sto: {DRIVERSTORE_IMPORT_NOTIFY_VALIDATE} 10:53:57.702
!!! sto: Driver package does not contain a catalog file, but error is ignored in WinPE.
sto: {DRIVERSTORE_IMPORT_NOTIFY_VALIDATE exit(0x00000000)} 10:53:57.717
sto: Verified driver package signature:
sto: Digital Signer Score = 0xFF000000
sto: Digital Signer Name =
sto: {DRIVERSTORE_IMPORT_NOTIFY_BEGIN} 10:53:57.717
inf: Opened INF: ‘X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}\hdaudtestdrv.inf’ ([strings])
sto: Create system restore point:
sto: Description = Device Driver Package Install: Dell, Inc.
sto: Time = 0ms
sto: Status = 0x0000007E (FAILURE)
sto: {DRIVERSTORE_IMPORT_NOTIFY_BEGIN: exit(0x00000000)} 10:53:57.733
sto: Importing driver package files:
sto: Source Path = X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}
sto: Destination Path = X:\windows\System32\DriverStore\FileRepository\hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16
sto: {Copy Directory: X:\windows\System32\DriverStore\Temp{63d543f2-12b5-3568-43fc-ca47cc6ac80d}} 10:53:57.733
sto: Target Path = X:\windows\System32\DriverStore\FileRepository\hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16
sto: {Copy Directory: exit(0x00000000)} 10:53:57.733
sto: {Index Driver Package: X:\windows\System32\DriverStore\FileRepository\hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16\hdaudtestdrv.inf} 10:53:57.733
idb: Registered driver store entry ‘hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16’.
idb: Published ‘hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16\hdaudtestdrv.inf’ to ‘X:\windows\INF\oem65.inf’
idb: Published driver store entry ‘hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16’.
sto: Published driver package INF ‘oem65.inf’ was changed.
sto: Active published driver package is ‘hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16’.
sto: {Index Driver Package: exit(0x00000000)} 10:53:57.811
sto: {DRIVERSTORE_IMPORT_NOTIFY_END} 10:53:57.811
ndv: No system restore point was set earlier.
sto: {DRIVERSTORE_IMPORT_NOTIFY_END: exit(0x00000000)} 10:53:57.811
sto: {Stage Driver Package: exit(0x00000000)} 10:53:57.811
ndv: Doing device matching lookup!
sto: Driver package was staged to Driver Store. Time = 203 ms
sto: Imported driver package into Driver Store:
sto: Filename = X:\windows\System32\DriverStore\FileRepository\hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16\hdaudtestdrv.inf
sto: Time = 250 ms
sto: {Import Driver Package: exit(0x00000000)} 10:53:57.873
inf: Opened INF: ‘F:\src\hdaudtestdrv.inf’ ([strings])
inf: Driver Store location: X:\windows\System32\DriverStore\FileRepository\hdaudtestdrv.inf_x86_neutral_18fc1c508ffc5a16\hdaudtestdrv.inf
inf: Published Inf Path: X:\windows\INF\oem65.inf
inf: Opened INF: ‘F:\src\hdaudtestdrv.inf’ ([strings])
inf: OEM source media location: F:\src<br> inf: {SetupCopyOEMInf exit (0x00000000)} 10:53:57.905
inf: Opened INF: ‘F:\src\hdaudtestdrv.inf’ ([strings])
<<< Section end 2010/09/22 10:53:57.983
<<< [Exit status: SUCCESS]
------------------------ end copy and paste --------------------------------
It sure looks like drvload tried its best to get things going, then just… stopped… after opening the INF file.
Now, this same driver and INF loads on Vista SP1. WdfVerifier says that my WinPE stick has WDF 1.9 installed, so I know it’s not a WDF versioning issue (driver is built with WDF 1.5). So, to make sure all the info is available, here’s my INF file:
------------------- begin hdaudtestdrv.inf --------------------------
[Version]
DriverVer=09/22/2010,6.0.6000.16386
signature=“$CHICAGO$”
Class=HDAudioTestClass
ClassGuid={df5dbce2-c328-4499-9e90-283c5766af51}
Provider=%Mfg%
[SourceDisksNames]
1=%DiskId%
[SourceDisksFiles]
HDAudTestDrv.sys = 1
[ClassInstall32]
Addreg=HDAudioTestClass
[HDAudioTestClass]
HKR,%ClassName%
HKR,Icon,103 ; Empty
HKR,DeviceCharacteristics,0x10001,0x00000100 ; FILE_DEVICE_SECURE_OPEN
[DestinationDirs]
SYS.CopyList=10,system32\drivers
[Manufacturer]
%Mfg%=Testing
[Testing]
%DeviceDesc% = TestingHDAudTestDriverInstall, Root\TestingHDAudTestDrv
[TestingHDAudTestDriverInstall]
CopyFiles=SYS.CopyList
[SYS.CopyList]
HDAudTestDrv.sys
[TestingHDAudTestDriverInstall.Services]
AddService = HDAudTest,%SPSVCINST_ASSOCSERVICE%,TestingHDAudTestDriver_Service_Inst
[TestingHDAudTestDriver_Service_Inst]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_AUTO_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
LoadOrderGroup = “Base”
ServiceBinary = %12%\HDAudTestDrv.sys
[Strings]
Mfg = “Testing, Inc.”
DeviceDesc = “HD Audio Test Driver”
DiskId = “Install disk (1)”
ClassName = “Testing HDAudio Test Devices”
;
; The “standard” defines
;
SPSVCINST_TAGTOFRONT = 0x00000001
SPSVCINST_ASSOCSERVICE = 0x00000002
SPSVCINST_DELETEEVENTLOGENTRY = 0x00000004
SPSVCINST_NOCLOBBER_DISPLAYNAME = 0x00000008
SPSVCINST_NOCLOBBER_STARTTYPE = 0x00000010
SPSVCINST_NOCLOBBER_ERRORCONTROL = 0x00000020
SPSVCINST_NOCLOBBER_LOADORDERGROUP = 0x00000040
SPSVCINST_NOCLOBBER_DEPENDENCIES = 0x00000080
SPSVCINST_NOCLOBBER_DESCRIPTION = 0x00000100
COPYFLG_WARN_IF_SKIP = 0x00000001
COPYFLG_NOSKIP = 0x00000002
COPYFLG_NOVERSIONCHECK = 0x00000004
COPYFLG_FORCE_FILE_IN_USE = 0x00000008
COPYFLG_NO_OVERWRITE = 0x00000010
COPYFLG_NO_VERSION_DIALOG = 0x00000020
COPYFLG_OVERWRITE_OLDER_ONLY = 0x00000040
COPYFLG_REPLACEONLY = 0x00000400
COPYFLG_REPLACE_BOOT_FILE = 0x00001000
COPYFLG_NOPRUNE = 0x00002000
SERVICE_KERNEL_DRIVER = 0x00000001
SERVICE_FILE_SYSTEM_DRIVER = 0x00000002
SERVICE_BOOT_START = 0x00000000
SERVICE_SYSTEM_START = 0x00000001
SERVICE_AUTO_START = 0x00000002
SERVICE_DEMAND_START = 0x00000003
SERVICE_DISABLED = 0x00000004
SERVICE_ERROR_IGNORE = 0x00000000
SERVICE_ERROR_NORMAL = 0x00000001
SERVICE_ERROR_SEVERE = 0x00000002
SERVICE_ERROR_CRITICAL = 0x00000003
-------------------- end hdaudtestdrv.inf ------------------
This is really puzzling me. I ran dbgview and didn’t see any of the debug output from my driver, and my user-mode console test app can’t open the device, either.
Does anyone have any idea why this INF and driver works fine in a full OS but won’t load in WinPE? As far as I can tell I’m not doing anything that isn’t! available in WinPE… the issue must be something in my INF file but I’ll be darned if I can figure it out.
I’ll keep experimenting but I don’t hold out much hope that I can figure this one out without assistance. Geez do I feel stupid!!
…ed…