What is the problem with my simple .inf file?

To all,

I have a working application using WinUSB only. It works completely OK,
and I am only using some of the calls in setupapi.dll and winusb.dll.
My only problem is to get my device associated with WinUSB on
end user machines. I am only concerned with Vista, but I want it to
work both on 32 bit and 64 bit Vista. There seems to be a lot of
confusion about 64-bit Vista, but it is not for Itanium hardware, it is
for Athlon64 and Intel EMT64 which is close to 100% of everything that
is sold today.

If I include winusb.sys in my driver files, it will work, but it was
pointed out to me earlier today that WinUSBCoInstaller should do the
job by itself. I have read Peter Wieland’s article about how you can
fix all this for Win XP, which is not really the issue here. I just
want it to work for Vista.

My .inf file looks like this:





; ================ Version section =================



[Version]

Signature = “$Windows NT$”

Class = CompevoUSBDevices

ClassGuid = {285bb37f-8b4e-48c3-a369-6d683ab1a2b4}

Provider = %ProviderName%

DriverVer = 05/22/2007, 6.0.1.0



; ========== Manufacturer/Models sections ===========



[Manufacturer]

%ProviderName% = Visagraph_WinUSB,NTx86,NTia64,NTamd64



[Visagraph_WinUSB.NTx86]

%DeviceDescriptor% = USB_Install, USB\VID_16C0&PID_294a



[Visagraph_WinUSB.NTamd64]

%DeviceDescriptor% = USB_Install, USB\VID_16C0&PID_294a



; ================== Installation ==================



[ClassInstall32]

AddReg=_AddReg_ClassInstall



; registry entries required for class

[_AddReg_ClassInstall]

HKR,“%ClassDescriptor%”

HKR,Icon,“-20”



[USB_Install]

Include = WinUSB.inf

Needs = WinUSB.NT



[USB_Install.Wdf]

KmdfService = WinUSB, WinUSB_Install



[USB_Install.HW]

AddReg = Dev_AddReg



[Dev_AddReg]

HKR,DeviceInterfaceGUIDs,0x00010000,“{285bb37f-8b4e-48c3-a369-6d683ab1a2b4}”



[USB_Install.CoInstallers]

AddReg = CoInstallers_AddReg

CopyFiles = CoInstallers_CopyFiles



[CoInstallers_AddReg]

HKR, , CoInstallers32, 0x00010000, “WinUSBCoInstaller.dll”,
“WdfCoInstaller01005.dll, WdfCoInstaller”



[CoInstallers_CopyFiles]

WinUSBCoInstaller.dll

WdfCoInstaller01005.dll



[SourceDisksNames]

1 = %MediaDescription%



[SourceDisksFiles]

WinUSBCoInstaller.dll = 1, x86

WdfCoInstaller01005.dll = 1, x86

[SourceDisksFiles.amd64]

WinUSBCoInstaller.dll = 1, amd64

WdfCoInstaller01005.dll = 1, amd64

[DestinationDirs]

DefaultDestDir = 12

CoInstallers_CopyFiles = 11

WinUSB_CopyFiles = 12



; ==================== Strings =====================



[Strings]

ProviderName = “Compevo AB”

ClassDescriptor = “Compevo USB devices”

DeviceDescriptor = “Visagraph USB”

MediaDescription = “Visagraph Software CD”

WINUSB_SvcDesc = “WinUsb Driver”





---------------------------------------------------------



I have WinUSBCoInstaller.dll and WdfCoInstaller01005.dll in both x86
and amd64 versions

in separate subdirectories in same directory as .inf file. No other
files.





winusb.inf from c:\Windows\inf (64-bit Vista):



; WinUsb.inf

; Microsoft Windows WinUsb Driver INF

; Copyright (c) Microsoft Corporation





[SourceDisksNames]

3426=windows cd



[SourceDisksFiles]

winusb.sys = 3426



[Version]

Signature=“$Windows NT$”

Provider=%MS%

pnplockdown=1 ; Third Party Protected

DriverVer=06/21/2006,6.0.6000.16386



[DestinationDirs]

DefaultDestDir = 12

WINUSB_CoInstaller_CopyFiles = 11



[DefaultInstall]

CopyFiles=WINUSB.CopyFiles



[WINUSB.NT]

CopyFiles=WINUSB.CopyFiles

AddReg=WINUSB.AddReg



[WINUSB.AddReg]

HKR,DevLoader,*ntkern

HKR,NTMPDriver,winusb.sys



[WINUSB.NT.Services]

Addservice = WINUSB, 0x00000002, WINUSB.AddService



[WINUSB.NT.UMDFServices]

Addservice = WINUSB, 0x00000000, WINUSB.AddService



[WINUSB.AddService]

DisplayName = %WINUSB_SvcDesc%

ServiceType = 1 ; SERVICE_KERNEL_DRIVER

StartType = 3

ErrorControl = 1 ; SERVICE_ERROR_NORMAL

ServiceBinary = %12%\WinUSB.SYS



[WINUSB.CopyFiles]

winusb.sys,0x0100 ; Microsoft Protected



;

; — Coinstaller section for kmdf —

;

;[WINUSB.NT.CoInstallers]

;AddReg=WINUSB_CoInstaller_AddReg

;CopyFiles=WINUSB_CoInstaller_CopyFiles



;[WINUSB_CoInstaller_AddReg]

;HKR,CoInstallers32,0x00010000,
“WdfCoInstaller01000.dll,WdfCoInstaller”



;[WINUSB_CoInstaller_CopyFiles]

;WdfCoInstaller01000.dll



;[WINUSB_Device.NT.Wdf]

;KmdfService = WINUSB, WINUSB_wdfsect

;[WINUSB_wdfsect]

;KmdfLibraryVersion = 1.0





[Strings]

;

; Not localizable

; None currently



;

;Localizable

;



WINUSB_SvcDesc = “WinUsb Driver”





MS=“Microsoft”









Excerpt from setupapi.dev:





ndv: Committing file queue…

flq: {_COMMIT_FILE_QUEUE}

flq: CommitQ DelNodes=0 RenNodes=0 BackNodes=0
CopyNodes=3

flq: {SPFILENOTIFY_STARTQUEUE}

flq: {SPFILENOTIFY_STARTQUEUE -
exit(0x00000001)}

flq: {SPFILENOTIFY_STARTSUBQUEUE}

flq: {SPFILENOTIFY_STARTSUBQUEUE -
exit(0x00000001)}

flq: SPFILENOTIFY_NEEDMEDIA:

flq: Description - [windows cd]

flq: SourcePath - [C:\Windows\INF]

flq: SourceFile - [winusb.sys]

flq: Flags - 0x00000000

flq: {SPFILENOTIFY_NEEDMEDIA}

flq: {SPFILENOTIFY_NEEDMEDIA -
exit(0x00000000)}

!!! flq: SPFILENOTIFY_NEEDMEDIA: returned
FILEOP_ABORT.

flq: {SPFILENOTIFY_ENDQUEUE}

flq: {SPFILENOTIFY_ENDQUEUE -
exit(0x00000001)}

! bak: Install failed, attempting to restore
original files.

flq: {_COMMIT_FILE_QUEUE exit(0x00000002)}

ndv: Device install status=0x00000002





To me, it looks like winusb.inf is trying to copy winusb.sys from
windows cd. I have tried with a Vista windows cd in d:, but this
doesn’t change anything. Maybe this is a 64-bit Vista problem.

I am sure that this is easy to fix.

Best regards

Kurt Nyström

Kurt Nyström wrote:

I have a working application using WinUSB only. It works completely
OK, and I am only using some of the calls in setupapi.dll and
winusb.dll. My only problem is to get my device associated with
WinUSB on end user machines. I am only concerned with Vista, but I
want it to work both on 32 bit and 64 bit Vista. There seems to be a
lot of confusion about 64-bit Vista, but it is not for Itanium
hardware, it is for Athlon64 and Intel EMT64 which is close to 100% of
everything that is sold today.

That’s good, because WinUSB is currently not available for Itaniums.

If I include winusb.sys in my driver files, it will work, but it was
pointed out to me earlier today that WinUSBCoInstaller should do the
job by itself. I have read Peter Wieland’s article about how you can
fix all this for Win XP, which is not really the issue here. I just
want it to work for Vista.

Have you included the amd64 version of WinUDBCoInstaller.dll in your
amd64 driver package?


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

Thanks Tim for your interest.

Yes, I have taken both WinUSBCoInstaller and WdfCoInstaller from
WinDDK6000 redist folder. The amd64 versions are in the amd64 folder
and the x86 versions are in the x86 folder, both folders are in the
same folder as my inf file.

Do you have any explanation to the statements in the winusb.inf

[SourceDiskNames]

3426=windows cd

[SourceDiskFiles]

winusb.sys = 3426

From what I understand of inf files, which maybe is not enough, the
winusb.inf is trying to copy winusb.sys to folder 12
(windows\system32\drivers), but it can’t find the file because there is
no path to the source file. Can it be that winusb.inf is different on
64-bit and 32-bit Vista?

Tim Roberts wrote:

Kurt Nyström wrote:

I have a working application using WinUSB only. It works completely
OK, and I am only using some of the calls in setupapi.dll and
winusb.dll. My only problem is to get my device associated with
WinUSB on end user machines. I am only concerned with Vista, but I
want it to work both on 32 bit and 64 bit Vista. There seems to be a
lot of confusion about 64-bit Vista, but it is not for Itanium
hardware, it is for Athlon64 and Intel EMT64 which is close to 100% of
everything that is sold today.

That’s good, because WinUSB is currently not available for Itaniums.

If I include winusb.sys in my driver files, it will work, but it was
pointed out to me earlier today that WinUSBCoInstaller should do the
job by itself. I have read Peter Wieland’s article about how you can
fix all this for Win XP, which is not really the issue here. I just
want it to work for Vista.

Have you included the amd64 version of WinUDBCoInstaller.dll in your
amd64 driver package?

Kurt Nyström wrote:

Do you have any explanation to the statements in the winusb.inf

[SourceDiskNames]
3426=windows cd
[SourceDiskFiles]
winusb.sys = 3426

From what I understand of inf files, which maybe is not enough, the
winusb.inf is trying to copy winusb.sys to folder 12
(windows\system32\drivers), but it can’t find the file because there
is no path to the source file. Can it be that winusb.inf is different
on 64-bit and 32-bit Vista?

Well, I guess I have to admit to some confusion here. I wasn’t aware
that Vista loaded winusb.sys from its CD. I thought it was unpacked
from the coinstaller DLL unconditionally. Now, those two INF directives
are strictly decorative unless there is a CopyFiles section that also
mentions winusb.sys. Is that the case?


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

Thanks Tim for your answer.

There is a CopyFiles section that copies winusb.sys. I have included at
end of this post the complete winusb.inf that comes with Vista.

Also, the winusb.sys is not present on the Vista CD. It is probably
hidden inside some cab file, so this won’t work either.

Please, Microsoft guys that are on the list, you know the answer to
this. To me it seems that all this with driver

installation has become so complicated so that nobody really
understands it. Please prove that somebody does.

Kurt Nyström

Tim Roberts wrote:

Kurt Nyström wrote:

Do you have any explanation to the statements in the winusb.inf

[SourceDiskNames]
3426=windows cd
[SourceDiskFiles]
winusb.sys = 3426

From what I understand of inf files, which maybe is not enough, the
winusb.inf is trying to copy winusb.sys to folder 12
(windows\system32\drivers), but it can’t find the file because there
is no path to the source file. Can it be that winusb.inf is different
on 64-bit and 32-bit Vista?

Well, I guess I have to admit to some confusion here. I wasn’t aware
that Vista loaded winusb.sys from its CD. I thought it was unpacked
from the coinstaller DLL unconditionally. Now, those two INF directives
are strictly decorative unless there is a CopyFiles section that also
mentions winusb.sys. Is that the case?

; WinUsb.inf

; Microsoft Windows WinUsb Driver INF

; Copyright (c) Microsoft Corporation

 

 

[SourceDisksNames]

3426=windows cd

 

[SourceDisksFiles]

winusb.sys         = 3426

 

[Version]

Signature=“$Windows NT$”

Provider=%MS%

pnplockdown=1                       ; Third Party Protected

DriverVer=06/21/2006,6.0.6000.16386

 

[DestinationDirs]

DefaultDestDir = 12

WINUSB_CoInstaller_CopyFiles = 11

 

[DefaultInstall]

CopyFiles=WINUSB.CopyFiles

 

[WINUSB.NT]

CopyFiles=WINUSB.CopyFiles

AddReg=WINUSB.AddReg

 

[WINUSB.AddReg]

HKR,DevLoader,*ntkern

HKR,NTMPDriver,winusb.sys

 

[WINUSB.NT.Services]

Addservice = WINUSB, 0x00000002, WINUSB.AddService

 

[WINUSB.NT.UMDFServices]

Addservice = WINUSB, 0x00000000, WINUSB.AddService

 

[WINUSB.AddService]

DisplayName    = %WINUSB_SvcDesc%

ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER

StartType      = 3

ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL

ServiceBinary  = %12%\WinUSB.SYS

 

[WINUSB.CopyFiles]

winusb.sys,0x0100                 ; Microsoft Protected

 

;

; — Coinstaller section for kmdf —

;

;[WINUSB.NT.CoInstallers]

;AddReg=WINUSB_CoInstaller_AddReg

;CopyFiles=WINUSB_CoInstaller_CopyFiles

 

;[WINUSB_CoInstaller_AddReg]

;HKR,CoInstallers32,0x00010000,
“WdfCoInstaller01000.dll,WdfCoInstaller”

 

;[WINUSB_CoInstaller_CopyFiles]

;WdfCoInstaller01000.dll

 

;[WINUSB_Device.NT.Wdf]

;KmdfService = WINUSB, WINUSB_wdfsect

;[WINUSB_wdfsect]

;KmdfLibraryVersion = 1.0

 

 

[Strings]

;

; Not localizable

; None currently

 

;

;Localizable

;

 

WINUSB_SvcDesc = “WinUsb Driver”

 

 

MS=“Microsoft”