2

The following .inf file was adapted from Microsoft WinUSB Installation Guide

The hardware key USBPRINT\DatamaxM4308-MarkII013B, the Vendor and PID should be correct (copied from the official driver .inf file)

When trying to install the Driver on Vista 32bit I get "Operation could not be completed (error 0x00000003)" Windows eventviewer does not log any of my attempts to install the driver.

C:\Windows\inf\setupapi.dev.log logs the following:

Opened PNF: 'C:\Windows\INF\winusb.inf' ([strings.0409] <src=drvstore>)

cmi:      File::CopyFileUsingSymbolicLink(C:\Windows\system32\DriverStore\Temp\{42263e41-28c1-4fbc-a15e-36e516ea8ab1}\Package\winusb.sys, \\?\C:\Windows\system32\DriverStore\FileRepository\datamax.inf_4d12d90f\winusb.s
cmi:      CopyFile from C:\Windows\system32\DriverStore\Temp\{42263e41-28c1-4fbc-a15e-36e516ea8ab1}\Package\winusb.sys to \\?\C:\Windows\system32\DriverStore\FileRepository\datamax.inf_4d12d90f\winusb.sys failed 2
cmi:      CopyFile(source=C:\Windows\system32\DriverStore\Temp\{42263e41-28c1-4fbc-a15e-36e516ea8ab1}\Package\winusb.sys, destination=\\?\C:\Windows\system32\DriverStore\FileRepository\datamax.inf_4d12d90f\winusb.sys, 

What am I doing wrong? Do i need to copy the winusb.sys to the driver folder structure? I thought this was done automatically by using the CoInstaller?

The folder structure is as follows:

-DriverFolder
            |
            Datamax.inf
            Datamax.cat
            + amd64
                  |
                  WdfCoInstaller01009.dll
                  winusbcoinstaller2.dll
            + i386
                  |
                  WdfCoInstaller01009.dll
                  winusbcoinstaller2.dll

Datamax.Inf:

[Version]
Signature = "$Windows NT$"
Class = Printer
ClassGuid={4D36E979-E325-11CE-BFC1-08002BE10318}
Provider = %ProviderName%
CatalogFile=Datamax.cat
DriverVer=02/08/2012,1.0.0.1

; ================== Class section ==================

[ClassInstall32]
Addreg=MyDeviceClassReg

[MyDeviceClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1

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

[Manufacturer]
%ProviderName% = MyDevice_WinUSB,NTx86,NTamd64

[MyDevice_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USBPRINT\DatamaxM4308-MarkII013B, USB\VID_0B0B&PID_106E

[MyDevice_WinUSB.NTamd64]
%USB\MyDevice.DeviceDesc% =USBPRINT\DatamaxM4308-MarkII013B, USB\VID_0B0B&PID_106E

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

;[1]
[USBPRINT\DatamaxM4308-MarkII013B]
Include=winusb.inf
Needs=WINUSB.NT

;[2]
[USBPRINT\DatamaxM4308-MarkII013B.Services]
Include=winusb.inf
Needs=WINUSB.NT.Services

;[3]
[USBPRINT\DatamaxM4308-MarkII013B.Wdf]
KmdfService=WINUSB, WinUSB_Install

[WinUSB_Install]
KmdfLibraryVersion=1.9

;[4]
[USBPRINT\DatamaxM4308-MarkII013B.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{FDA075ED-3109-4B76-8D70-CD4E65F3817C}"

;[5]
[USBPRINT\DatamaxM4308-MarkII013B.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"

[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

; ================= Source Media Section =====================
;[7]

[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64

[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1
WdfCoInstaller01009.dll=1

[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll=2
WdfCoInstaller01009.dll=2

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

[Strings]
ProviderName="MyWinUsbTest"
USB\MyDevice.DeviceDesc="Test using WinUSB only"
WinUSB_SvcDesc="WinUSB Test"
DISK_NAME="My Install Disk"
ClassName="Printer"
David Strahm
  • 263
  • 4
  • 10

1 Answers1

2

From my experience, 0x00000003 means that there was an access denied exception. The process needs to be running as administrator if on Vista or above.