To all,
I have made several posts here, and I don’t know if I have offended
anyone or that you feel that the subject has no interest, but I have not
received much answers. Thanks to Tim Roberts, that actually answered.
The latest development is this. I have a very nice, reduced .inf file
that I think could be the example how to use winusb.sys with Vista and
the included winusb.sys. You at Microsoft are welcome to use it. You
seems to need it, since you don’t have anything to present to your poor,
unlucky customers. It is very remarkable, especially since you in a lot
of documents seems to push for this solution.
The only problem with this inf is that to make it work, there has to be
a winusb.sys file in the Windows\Inf directory. I assume that this is
something that Microsoft made wrong, either that there is a problem in
the shipped winusb.inf or that winusb.sys is inadvertently misssing from
the inf directory. I have been using Vista 64 Ultimate OEM.
However, the winusb.sys is present at several places. In my version of
Vista, it is present in three directories in
Windows\System32\DriverStore\FileRepository. One is winusb.inf_356c8860.
Please note that winusb.sys is different on 32-bit and 64-bit Vista.
The remaining problem for me now is how I am going to do this for my
customers.
I have some options:
- Make a program that I run in my setup that copies the damn file to
the correct place. - Ship my system with 32-bit and 64-bit versions copies of winusb.sys
taken from Vista systems (they can’t be downloaded from Microsoft and I
don’t really know if I am allowed to distribute them.) - Make my customers copy the driver manually and tell them that
Microsoft shipped this driver with your system, but unfortunately they
forgot to make it usable, so we have to do it thisway.
Please, somebody at Microsoft, this is your product - try to make it work!
; ================ Version section =================
[Version]
Signature = “$Windows NT$”
Class = YOUR_CLASS
ClassGuid = {YOUR_CLASS_GUID}
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_XXXX&PID_YYYY
[Visagraph_WinUSB.NTamd64]
%DeviceDescriptor% = USB_Install, USB\VID_XXXX&PID_YYYY
; ================== Installation ==================
[ClassInstall32]
AddReg=_AddReg_ClassInstall
[_AddReg_ClassInstall]
HKR,“%ClassDescriptor%”
HKR,Icon,“-20”
[USB_Install]
Include = WinUSB.inf
Needs = WinUSB.NT
[USB_Install.Services]
Include = WinUSB.inf
AddService = WinUSB, 0x000001fa, WinUSB.AddService
[USB_Install.HW]
AddReg = Dev_AddReg
[Dev_AddReg]
HKR,DeviceInterfaceGUIDs,0x00010000,“{YOUR_CLASS_GUID}”
; ==================== Strings =====================
[Strings]
ProviderName = “YOU”
ClassDescriptor = “YOUR CLASS DESCRIPTOR”
DeviceDescriptor = “YOUR DEVICE DESCRIPTOR”
WINUSB_SvcDesc = “WinUsb Driver”
One comment: In AddService, I have used both flags 0x2 and 0x1fa. No
difference.
If somebody is interested, if the winusb.sys is not present in the
Windows\inf directory,
I get the following: (excerpt from setupapi.dev)
ndv: Committing file queue…
flq: {_COMMIT_FILE_QUEUE}
flq: CommitQ DelNodes=0 RenNodes=0 BackNodes=0
CopyNodes=1
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
ndv: Performing device install final cleanup…
! ndv: Queueing up error report since device
installation failed…
ndv: {Core Device Install - exit(0x00000002)}
ump: Server install process exited with code 0x00000002
14:58:09.048
ump: {Plug and Play Service: Device Install exit(00000002)}
ndv: Device Install failed for new device…installing NULL
driver.
dvi: {Plug and Play Service: Device Install for
USB\VID_16C0&PID_294A\05070172}
ump: Creating Install Process: DrvInst.exe 14:58:18.143
! ndv: Installing NULL driver!
dvi: Set selected driver complete.
pol: Device installation is subject to policy
dvi: {DIF_ALLOW_INSTALL} 14:58:18.814
dvi: No class installer for ‘Visagraph USB’
dvi: No CoInstallers found
dvi: Default installer: Enter 14:58:18.814
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 14:58:18.814
dvi: {DIF_INSTALLDEVICE} 14:58:18.814
dvi: No class installer for ‘Visagraph USB’
dvi: Default installer: Enter 14:58:18.814
! dvi: Installing NULL driver!
dvi: Writing common driver property settings.
dvi: {Restarting Devices} 14:58:18.845
dvi: Restart: USB\VID_16C0&PID_294A\05070172
dvi: Restart complete.
dvi: {Restarting Devices exit} 14:58:19.781
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICE - exit(0x00000000)} 14:58:19.781
ump: Server install process exited with code 0x00000000
14:58:19.797
ump: {Plug and Play Service: Device Install exit(00000000)}
ndv: {Update Driver Software Wizard exit(00000002)}
<<< Section end 2007/06/25 14:58:25.896
<<< [Exit status: FAILURE(0x00000002)]