Windows Vista 32 Problem with Inf File

Hi:

Is there any special thing installing inf files for a KMDF Driver in Windows Vista 32 bits?
I can install my driver in Windows XP-32, Windows 7-32, Windows Vista-64 and Windows 7-64, but i am no able to install on windows Vista 32 bits.
Could be anything about the Catalog file?, i run windows vista 32 disabling driver signature enforcement but the error persist.

This is the inf i am using:

[Version]
Signature=“$WINDOWS NT$”
Class=USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
Provider=%MANUFACTURER%
;CatalogFile=wdf_usb.cat // comment

DriverVer=04/16/2011,1.0

[Manufacturer]
%MANUFACTURER%=DeviceList,ntx86,ntamd64,ntamd64.6.0

[DestinationDirs]
DefaultDestDir = 12
MyDevice_CoInstaller_CopyFiles = 11

;------------------------------------------------------------------------------
; 32 bits / Windows XP / Vista / 7
;------------------------------------------------------------------------------

[DriverInstall32.ntx86]
CopyFiles=DriverCopyFiles.ntx86

[DriverCopyFiles.ntx86]
dynambus.sys,0x20
lower_usb.sys

[DriverInstall32.ntx86.hw]
AddReg=DriverInstall32.ntx86.AddReg

[DriverInstall32.ntx86.CoInstallers]
CopyFiles=MyDevice_CoInstaller_CopyFiles
AddReg=MyDevice_CoInstaller_AddReg

[Driver64WV.ntamd64.Wdf]
KmdfService = %DRIVERFILENAME%, MyDevice_wdfsect

[DriverInstall32.ntx86.AddReg]
HKR,DeviceCharacteristics,0x10001,0x0100
HKR,Security,“D:P(A;;GA;;;BA)(A;;GA;;;SY)”
HKR,“UpperFilters”,0x00010008,“lower_usb”

[DriverInstall32.ntx86.Services]
AddService = dynambus, %SPSVCINST_ASSOCSERVICE%, DriverService32.ntx86
AddService = lower_usb, filterpdo_Service_Inst

[DriverService32.ntx86]
DisplayName = %busenum.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\dynambus.sys
LoadOrderGroup = Extended Base

[filterpdo_Service_Inst]
DisplayName = %busupper.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\lower_usb.sys
LoadOrderGroup = Filter

;------------------------------------------------------------------------------
; 64 bits / Windows XP / Vista / 7
;------------------------------------------------------------------------------

[Driver64WV.ntamd64]
CopyFiles=DriverCopyFilesWV.ntamd64

[DriverCopyFilesWV.ntamd64]
dynambusV.sys,0x20
lower_usbV.sys

[Driver64WV.ntamd64.HW]
AddReg=Driver64WV.ntamd64.AddReg

[Driver64WV.ntamd64.CoInstallers]
CopyFiles=MyDevice_CoInstaller_CopyFiles
AddReg=MyDevice_CoInstaller_AddReg

[Driver64WV.ntamd64.Wdf]
KmdfService = %DRIVERFILENAME%, MyDevice_wdfsect

[Driver64WV.ntamd64.AddReg]
HKR,DeviceCharacteristics,0x10001,0x0100
HKR,Security,“D:P(A;;GA;;;BA)(A;;GA;;;SY)”
HKR,“UpperFilters”,0x00010008,“lower_usbv”

[Driver64WV.ntamd64.Services]
AddService=%DRIVERFILENAME%, 0x00000002, DriverService64WV.ntamd64
AddService = lower_usbv, , uppfilt_Service_InstWV

[DriverService64WV.ntamd64]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%%DRIVERFILENAME%.sys

[uppfilt_Service_InstWV]
DisplayName = “Filter PDO FSL”
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\lower_usbV.sys

;------------------------------------------------------------------------------
; VID/PID Settings
;------------------------------------------------------------------------------

[SourceDisksFiles.amd64]
WdfCoInstaller01009.dll = 1,\WINDOWS\inf\64
dynambusV.sys = 1,\WINDOWS\inf\64
lower_usbV.sys = 1,\WINDOWS\inf\64

[SourceDisksNames]
1 = %DiskId1%,“”

[SourceDisksFiles.x86]
dynambus.sys = 1,\WINDOWS\inf\32
lower_usb.sys = 1,\WINDOWS\inf\32
WdfCoInstaller01009.dll = 1,\WINDOWS\inf\32

[DeviceList.ntx86]
%DEV_DESCRIPTION%=DriverInstall32,USB\VID_15A2&PID_005A

[DeviceList.ntamd64.6.0]
%DEV_DESCRIPTION%=Driver64WV, USB\VID_15A2&PID_005A

[DeviceList.ntamd64]
%DEV_DESCRIPTION%=Driver64WV, USB\VID_15A2&PID_005A
;------------------------------------------------------------------------------
; 32 bits / 64 bits
;------------------------------------------------------------------------------

[MyDevice_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”

[MyDevice_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll

[MyDevice_wdfsect]
KmdfLibraryVersion = 1.9

;------------------------------------------------------------------------------
; String Definitions
;------------------------------------------------------------------------------

[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
MSFT = “MSFT”
DiskId1 = “Disk #1
busenum.SVCDESC = “FDO_FSL”
busupper.SVCDESC = “Filter_PDO_FSL”
MFGNAME=“FSL-MSG-IMM”
DEV_DESCRIPTION=“USB2SER Remote WakeUp”
MANUFACTURER=“MANUFACTURER”
DRIVERFILENAME =“dynambusV”
SERVICE=“BUS DRIVER”


SETUPAPI.APP


>> [Build Driver List - USB\VID_15A2&PID_005A\VERSION_1.0]
>> Section start 2011/04/29 00:01:35.721
cmd: “C:\Windows\system32\mmc.exe” “C:\Windows\System32\devmgmt.msc” /S
dvi: Searching for hardware ID(s):
dvi: usb\vid_15a2&pid_005a&rev_0100
dvi: usb\vid_15a2&pid_005a
dvi: Searching for compatible ID(s):
dvi: usb\class_02&subclass_02&prot_01
dvi: usb\class_02&subclass_02
dvi: usb\class_02
dvi: Enumerating INFs from path list ‘C:\Windows\inf’
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\faxcn001.inf_d0b4aa61\faxcn001.inf’ ([strings.0409] )
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\hpoa1nd.inf_7cd93505\hpoa1nd.inf’ ([strings.0409] )
inf: Opened PNF: ‘C:\Windows\System32\DriverStore\FileRepository\usbport.inf_4d107f9d\usbport.inf’ ([strings.0409] )
inf: Opened PNF: ‘C:\Windows\System32\DriverStore\FileRepository\usbstor.inf_bb2778a0\usbstor.inf’ ([strings.0409] )
inf: Opened PNF: ‘C:\Windows\System32\DriverStore\FileRepository\usb.inf_c89fac9c\usb.inf’ ([strings.0409] )
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\brmfcumd.inf_771fa3ea\brmfcumd.inf’ ([strings.0409] )
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\v_mscdsc.inf_89cf1458\v_mscdsc.inf’ ([strings.0409] )
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\brmfcsto.inf_956882ac\brmfcsto.inf’ ([strings.0409] )
inf: Opened PNF: ‘C:\Windows\System32\DriverStore\FileRepository\bus_cdc_32_64.inf_f9d32a0f\bus_cdc_32_64.inf’ ([strings] )
sig: {_VERIFY_FILE_SIGNATURE} 00:01:35.908
sig: Key = bus_cdc_32_64.inf
sig: FilePath = C:\Windows\System32\DriverStore\FileRepository\bus_cdc_32_64.inf_f9d32a0f\bus_cdc_32_64.inf
! sig: No installed catalogs matching catalog name ‘’ were found that validated the file.
! sig: Error 1168: Element not found.
sig: {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 00:01:35.908
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\usbprint.inf_35521f61\usbprint.inf’ ([strings.0409] )
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\nulhpopr.inf_15fa7a9c\nulhpopr.inf’ ([strings.0409] )
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\usbcir.inf_8be273a0\usbcir.inf’ ([strings.0409] )
inf: Searched 12 potential matches in published INF directory
sig: {_VERIFY_FILE_SIGNATURE} 00:01:36.002
sig: Key = BUS_CDC_32_64.inf
sig: FilePath = C:\Windows\inf\BUS_CDC_32_64.inf
! sig: No installed catalogs matching catalog name ‘’ were found that validated the file.
! sig: Error 1168: Element not found.
sig: {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 00:01:36.017
inf: Searched 29 INFs in directory: ‘C:\Windows\inf’
<<< Section end 2011/04/29 00:01:36.080
<<< [Exit status: SUCCESS]

cci: NCI: 6to4svc.dll asking for write lock.
cci: NCI: 6to4svc.dll acquired write lock.
cci: NCI: Write lock released.

Thanks for your help.

Well, first of all, there IS no signature enforcement in 32-bit Windows… so that’s not your problem.

Also, it looks to ME like your INF worked according to the log:

<<< [Exit status: SUCCESS]

It looks like your catalog file name is MISSING (note the name in the log is ‘’)?

Just remove the catalog file line from the INF.

Did you run your INF through ChkInf?

Peter
OSR

I keep seeing posts that state there is no signing requirements for 32 bit
Windows. If you use PsSetCreateProcessNotifyRoutineEx the driver must be
signed, even for a 32 bit driver.
Search for the /INTEGRITYCHECK linker option. This option is required if you
use this function.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Friday, April 29, 2011 9:19 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Windows Vista 32 Problem with Inf File

Well, first of all, there IS no signature enforcement in 32-bit Windows…
so that’s not your problem.

Also, it looks to ME like your INF worked according to the log:

<<< [Exit status: SUCCESS]

It looks like your catalog file name is MISSING (note the name in the log is
‘’)?

Just remove the catalog file line from the INF.

Did you run your INF through ChkInf?

Peter
OSR


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

If i remove the catalog line the chkinf shows these:

Line 6: (E22.1.1081) Directive: CatalogFile required (and must not be blank) in section [Version] for WHQL digital signature.

And if i add the line there is no error neither warnings in the chkinf, but in both cases the installation fails.

As i said i can run the inf in the windows XP and 7-32 bits with no problem, the only one that gives me problem is windows Vista 32 bits, that is why i ask if there is something special i have to add in the inf file to the windows Vista 32 bits.

Thanks

On 04/29/2011 06:12 PM, xxxxx@hotmail.com wrote:

And if i add the line there is no error neither warnings in the chkinf, but in both cases the installation fails.

chkinf itself does not test/check the CAT file.

If a CAT file is referenced in the INF file, the installer checks if
the CAT file it is present and matches your binaries.

You have to create a CAT file with inf2cat, then sign it with
signtool.exe. There are walkthroughs on MSDN about how to do this.

Thanks, i checked the inf2cat program and it gives me the next warnings:

22.9.8 Possible Windows XP/Windows Server 2003 file redistribution violation (\32\usbser.sys –> usbser.sys). File not copied by installation inf so this is a warning only

22.9.8 Possible Windows Vista/Windows Server 2008 file redistribution violation (\32\usbser.sys –> usbser.sys). File not copied by installation inf so this is a warning only

22.9.8 Possible Windows XP/Windows Server 2003 file redistribution violation (\32\usbser.sys –> usbser.sys). File not copied by installation inf so this is a warning only

22.9.8 Possible Windows Vista/Windows Server 2008 file redistribution violation (\32\usbser.sys –> usbser.sys). File not copied by installation inf so this is a warning only.

So that means that i have to include the usbser.sys in my current INF file??

xxxxx@hotmail.com wrote:

Thanks, i checked the inf2cat program and it gives me the next warnings:

22.9.8 Possible Windows XP/Windows Server 2003 file redistribution violation (\32\usbser.sys –> usbser.sys). File not copied by installation inf so this is a warning only

22.9.8 Possible Windows Vista/Windows Server 2008 file redistribution violation (\32\usbser.sys –> usbser.sys). File not copied by installation inf so this is a warning only

22.9.8 Possible Windows XP/Windows Server 2003 file redistribution violation (\32\usbser.sys –> usbser.sys). File not copied by installation inf so this is a warning only

22.9.8 Possible Windows Vista/Windows Server 2008 file redistribution violation (\32\usbser.sys –> usbser.sys). File not copied by installation inf so this is a warning only.

So that means that i have to include the usbser.sys in my current INF file??

No, it certainly does not. Are you aware of the difference between an
error and a warning?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>No, it certainly does not. Are you aware of the difference between an

error and a warning?

Yes, but i want to discard any possible warning or error to find the way to install the driver on Windows Vista 32, because i do not find a reason why the same inf files section and .sys files works right on Windows XP 32-bits, Windows 7-32-bits, but in Windows Vista-32bits fails.
On what i know it should work, or do you know any possible reason why it fails?

Error Code(39).

xxxxx@hotmail.com wrote:

Is there any special thing installing inf files for a KMDF Driver in Windows Vista 32 bits?
I can install my driver in Windows XP-32, Windows 7-32, Windows Vista-64 and Windows 7-64, but i am no able to install on windows Vista 32 bits.

HOW are you installing this, exactly?

Given this section:

[SourceDisksFiles.x86]
dynambus.sys = 1,\WINDOWS\inf\32
lower_usb.sys = 1,\WINDOWS\inf\32
WdfCoInstaller01009.dll = 1,\WINDOWS\inf\32

The device manager is going to expect the following directory structure
for your driver package:

  • bus_cdc_32_64.inf
  • windows\
  • inf\
  • 32\
  • dynambus.sys
  • lower_usb.sys
  • WdfCoInstaller01009.dll
  • 64\
  • dynambusV.sys
  • lower_usbV.sys
  • WdfCoInstaller01009.dll

Do you see what I mean? In the same folder as the INF file, it will
expect to find a folder called “windows”. Inside that, it will expect
to find a folder called “inf”. The folder names in SourceDisksFiles
sections are always relative to the folder that contains the INF.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>Do you see what I mean? In the same folder as the INF file, it will

expect to find a folder called “windows”. Inside that, it will expect
to find a folder called “inf”. The folder names in SourceDisksFiles
sections are always relative to the folder that contains the INF.

Yes, i did it for have an easy install, so when the device is connected choose the recommended option and not do it step by step in the advanced mode(search for the inf file).
I can install the driver for XP 32-bits and 7-32 bits with this inf, but i am no able to install on Windows Vista 32 bits.
My question is why? ,if Windows XP,Vista,7 access to the same section and the same .sys, Windows Vista 32 can not be installed.

Did you check if there are any clues in %systemroot%\setupact.log?

Kris

On Mon, May 2, 2011 at 10:09 PM, Krzysztof Uchronski wrote:
> Did you check if there are any clues in %systemroot%\setupact.log?

Also did you make sure that you are not trying to load 64 bit binary
on your 32 bit system?
And if you run out of ideas I would also check whether hooking up KD +
.kdfiles helps. This is really monkey-check but if it doesn’t work
then you can most likely exclude problems with
signing/certificates/etc.

Kris

At 20:54 02/05/2011, xxxxx@hotmail.com wrote:

>No, it certainly does not. Are you aware of the difference between an
>error and a warning?

Yes, but i want to discard any possible warning or error to find the
way to install the driver on Windows Vista 32, because i do not find
a reason why the same inf files section and .sys files works right
on Windows XP 32-bits, Windows 7-32-bits, but in Windows Vista-32bits fails.
On what i know it should work, or do you know any possible reason
why it fails?

Error Code(39).

There’s another common cause of code 39 (Driver not loaded due to
corrupt or missing binary) which is nothing to do with the INF file
or signing issues.

Does the install copy your sys files to system32\drivers ?

If so, try running Depends.exe on your driver binary ? You may find
that there’s an exported function you expect in ntoskrn or other
system library that isn’t where you expect it to be on that version of Windows.

Mark.

xxxxx@hotmail.com wrote:

Yes, i did it for have an easy install, so when the device is connected choose the recommended option and not do it step by step in the advanced mode(search for the inf file).

I’m not sure what that means. Did you put the INF file in the root of
your disk, and then put the files in subdirectories of \windows\inf?
That is such an incredibly bad idea that I can’t imagine you would have
done it.

If you are just testing, then who cares how many steps it takes? Vista
will remember the location you last used for driver installs.

I can install the driver for XP 32-bits and 7-32 bits with this inf, but i am no able to install on Windows Vista 32 bits.
My question is why? ,if Windows XP,Vista,7 access to the same section and the same .sys, Windows Vista 32 can not be installed.

I don’t know, because you never tell us all of the facts. For example,
this could be something as simple as a KMDF version issue, if you have
the co-installer stuff messed up, or if you didn’t copy the co-installer
DLL properly. Windows 7 ships with KDMF 1.9. You might have installed
something else on your XP system that brought it up to 1.9. Vista ships
with 1.7, so your install will require a reboot to upgrade KMDF.

You need to look at setupapi.app.log and setupapi.dev.log from the
\Windows\Inf directory and see what they tell you. Post the entire
applicable sections from those file, if you need to.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>There’s another common cause of code 39 (Driver not loaded due to

corrupt or missing binary) which is nothing to do with the INF file
or signing issues.

This looks more like my problem.

Does the install copy your sys files to system32\drivers ?

Yes.

If so, try running Depends.exe on your driver binary ? You may find
that there’s an exported function you expect in ntoskrn or other
system library that isn’t where you expect it to be on that version of Windows.

I checked the Depends.exe and there is a section where 2 fields are in read that in difference from Windows XP those fields are correct (green) :

WDFLDR.SYS - WdfVersionBindClass
WdfVersionUnbindClass

Does anything about this could cause that problem??

Thanks.

xxxxx@hotmail.com wrote:

I checked the Depends.exe and there is a section where 2 fields are in read that in difference from Windows XP those fields are correct (green) :

WDFLDR.SYS - WdfVersionBindClass
WdfVersionUnbindClass

Does anything about this could cause that problem??

What does it say to YOU? This is an enormous hint, and it says that my
previous comment was correct. Those two functions were not present in
the 1.7 version of KMDF that shipped with Vista. That means that you
are not running KMDF co-installer properly, so you are not upgrading to
the 1.9 version of KMDF that you need.

Going back to your INF file, you missed an obvious error:

[DriverInstall32.ntx86.CoInstallers]
CopyFiles=MyDevice_CoInstaller_CopyFiles
AddReg=MyDevice_CoInstaller_AddReg

[Driver64WV.ntamd64.Wdf]
KmdfService = %DRIVERFILENAME%, MyDevice_wdfsect

That section name is wrong. It should b e
[DriverInstall32.ntx86.Wdf]. You just cut-and-pasted this from the
64-bit section without checking. Further, you can’t use
%DRIVERFILENAME% here, because that’s the 64-bit driver name. Here, you
need

[DriverInstall32.ntx86.Wdf]
KmdfService = dynambus, MyDevice_wdfsect


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Tim:

Your right now i can install it.
As you said the KMDF version for windows Vista is 1.7 by default, but is there any way to update KMDF version to 1.9 without the INF file?, because my intention is to install the driver as “Recomended” copying the inf file in Windows/Inf, but if i try to do it as Recommended the installation fails because it needs to be rebooted to update to 1.9 KMDF version, in the other case if i install it in advance mode windows can ask for reboot the machine so the installation goes successfully.

Thanks for all

xxxxx@hotmail.com wrote:

Your right now i can install it.
As you said the KMDF version for windows Vista is 1.7 by default, but is there any way to update KMDF version to 1.9 without the INF file?, because my intention is to install the driver as “Recomended” copying the inf file in Windows/Inf, but if i try to do it as Recommended the installation fails because it needs to be rebooted to update to 1.9 KMDF version, in the other case if i install it in advance mode windows can ask for reboot the machine so the installation goes successfully.

Look, if you want to install a driver, you follow the rules. People who
don’t follow the rules cause the kind of chaos that gives driver writers
a bad name. You NEVER copy an INF file directly to \Windows\INF. You
must allow Windows to do that, through the normal installation APIs.

So, what is the overall problem here? Is the problem that your device
gets matched by a standard driver and you need to override it? There
are ways to handle that. For example, “devcon update” will do that, and
you have the source for devcon if you want to copy the code to your own
installer.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

My problem is not copying the files, the problem is the next:

When i plug my device a Wizard appear with 2 options:
Install the software automatically.
Install from a specific location.

If i choose advance, then i search the inf file, the driver completes the installation and Windows ask for reboot the Computer with a successfully installation.

But i want an easier installation, so i copy the inf file to Windows/inf (i will search about devcon to do it as it must), i choose install the software as Recommended, so windows search in /windows/inf/, it find the inf file but in the Windows Vista case, where a KMDF version is older that the neccesary (1.9) it must aks for a reboot to install the KMDF 1.9 as was declared in the INF, but in this case (“Recommended”) it does not ask for a reboot, so it fails. So my question is, Can i update KMDF version to 1.9 in Vista before installing my driver? or any other option to install the driver automatically?

Thanks.

xxxxx@hotmail.com wrote:

My problem is not copying the files, the problem is the next:

When i plug my device a Wizard appear with 2 options:
Install the software automatically.
Install from a specific location.

If i choose advance, then i search the inf file, the driver completes the installation and Windows ask for reboot the Computer with a successfully installation.

But i want an easier installation, so i copy the inf file to Windows/inf … So my question is, Can i update KMDF version to 1.9 in Vista before installing my driver? or any other option to install the driver automatically?

I wish you had said some of this a long time ago. The RIGHT answer is
for you to “pre-install” your driver, using an application like “devcon
dp_add” or “DPInst”. That copies your driver package into the “driver
store”, and the driver store is one of the places that gets searched
when you choose “install the software automatically”.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.