usbser.sys and WinUSB.sys

Dear Team,

I am aware of the fact that WinUSB is native to Vista but not XP. When I install XP with SP2 on the new system, I even did not found usbser.sys

So if I want to distribute the package for above two drivers to the custom devices, do I need to include all the required files like WinUSB.sys, WinUSB CoInstaller, WDFCoinstaller and usbser.sys.

WDK Docs states that Coinstallers will generate the required files in XP.

When I include just WinUSB and WDFCoinstallers, XP reports that it does not find WinUSB.sys file.

Regards.

Uday Bhaskar wrote:

So if I want to distribute the package for above two drivers to the
custom devices, do I need to include all the required files like
WinUSB.sys, WinUSB CoInstaller, WDFCoinstaller and usbser.sys.

No, you don’t. The WinUSB coinstaller, if invoked properly (which it seems you are not doing), will unpack all the necessary files.

usbser.sys isn’t present on a fresh system either, but it lives in Driver.cab. This page shows how to reference it, even on a system where it hasn’t been unpacked yet:

http://msdn2.microsoft.com/en-us/library/bb332198.aspx

> WDK Docs states that Coinstallers will generate the required files in XP.

And if you use the WDK6000RTM, please DO read the release notes.

There’s a section about co-installers that’s not in the WDK6000RTM
documentation.

Thanks for the responses.

Regarding WinUSB.sys, I understood that we need not give WinUSB.sys if I use the coinstaller correctly.

I tried with the below INF and getting the following error:

#E151 Coinstaller 1 of 2 failed. Error 267: The directory name is invalid.

Somebody kindly suggest what is pointing wrongly in the INF.

==========================================================

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

[Version]
Signature = “$Windows NT$”
Class = MyDeviceClass
ClassGuid = {11111111-2222-3333-4444-555555555555}
Provider = %ProviderName%
DriverVer=03/25/2005,0.0.0.1
;CatalogFile = MyWinUSBInstall.cat

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

[Manufacturer]
%ProviderName% = MyDevice_WinUSB.NTx86

[MyDevice_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_1111&PID_2222

[ClassInstall32]
AddReg=SampleClass_RegistryAdd

[SampleClass_RegistryAdd]
HKR,%ClassName%
HKR,Icon,“-10”

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

[USB_Install]
Include=winusb.inf
Needs=WINUSB.NT

[USB_Install.Services]
Include=winusb.inf
AddService=WinUSB,0x00000002,WinUSB_ServiceInstall

[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys

[USB_Install.Wdf]
KmdfService=WINUSB, WinUsb_Install

[WinUSB_Install]
KmdfLibraryVersion=1.5

[USB_Install.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,DeviceInterfaceGUIDs,0x00010000,“{55555555-4444-3333-2222-111111111111}”

[USB_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles.NTx86

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

[CoInstallers_CopyFiles.NTx86]
WinUSBCoInstaller.dll
WdfCoInstaller01005.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

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

[Strings]
ProviderName=“MyCompany”
USB\MyDevice.DeviceDesc=“My Device using WinUSB only”
WinUSB_SvcDesc=“WinUSB driver”
ClassName=“MyClass”

===============================================================

Regards.

xxxxx@gmail.com wrote:

Somebody kindly suggest what is pointing wrongly in the INF.

Which WDK are you using?

If it’s the WDK6000RTM, read the release notes. They contain an INF
sample bug fix for the XP coinstaller.

Yes. I need not distribute winusb.sys awith the distribution. There was a
problem in inf file and when used properly the coinstaller is creating
winusb on the system.

Its really helpful to read the release notes which clearly mentions the
point of installing umdf drivers on XP. The same thing is mentioned at the
below link also:

http://blogs.msdn.com/peterwie/archive/2007/01/10/fixing-the-umdf-usb-samples-to-install-both-on-xp-vista.aspx

My original posting included usbser.sys along with winusb.sys. I will
update the status regarding usbser.sys after doing my homework.

Thanks for the responses.

Regards.

On Sun, Mar 9, 2008 at 3:52 AM, Hagen Patzke wrote:

> xxxxx@gmail.com wrote:
> > Somebody kindly suggest what is pointing wrongly in the INF.
>
> Which WDK are you using?
>
> If it’s the WDK6000RTM, read the release notes. They contain an INF
> sample bug fix for the XP coinstaller.
>
> —
> 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
>

USBSer.sys also when invoked properly as suggested is loading correctly even
on the freshly OS installed system.
Thanks for the guidance.

Regards.

On Fri, Mar 14, 2008 at 4:15 PM, Bhaskar wrote:

> Yes. I need not distribute winusb.sys awith the distribution. There was
> a problem in inf file and when used properly the coinstaller is creating
> winusb on the system.
>
> Its really helpful to read the release notes which clearly mentions the
> point of installing umdf drivers on XP. The same thing is mentioned at the
> below link also:
>
>
> http://blogs.msdn.com/peterwie/archive/2007/01/10/fixing-the-umdf-usb-samples-to-install-both-on-xp-vista.aspx
>
> My original posting included usbser.sys along with winusb.sys. I will
> update the status regarding usbser.sys after doing my homework.
>
> Thanks for the responses.
>
> Regards.
>
>
> On Sun, Mar 9, 2008 at 3:52 AM, Hagen Patzke wrote:
>
> > xxxxx@gmail.com wrote:
> > > Somebody kindly suggest what is pointing wrongly in the INF.
> >
> > Which WDK are you using?
> >
> > If it’s the WDK6000RTM, read the release notes. They contain an INF
> > sample bug fix for the XP coinstaller.
> >
> > —
> > 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
> >
>
>