I hate INF files.
Following is an inf file for a commercial product. Not mine, but I have to
use the thing as part of my product. When I plug in the USB device that
this INF is for, the usual installer stuff happens, but it fails to copy the
sys file to system32\drivers on W2K or XP. Of course the device then
doesn’t work.
I called the vendor, and their response is “don’t use the installer, use our
bat file that just manually copies the driver and inf files into the right
places on drive C:, THEN plug in the device.” In the immortal words of
Bill Cosby, Riiiiight…
I’m sure I could debug this sucker myself if I want to devote a day or so to
it; but I’m hoping someone here likes INF files more than I do and can just
look at it and tell me which line, parameter, or section is missing or
wrong. Thanks in advance! (Oh, I need this to work on both Win98&Friends
and real operating systems. Haven’t tried it on the toys yet to see if it
works there.)
Loren
The error from setupapi.log is:
#-166 Device install function: DIF_INSTALLDEVICEFILES.
#-011 Installing section [USBDongle] from “p:\dongle\usbkey2k.inf”.
#E395 Unable to determine source information for disk ID 1.
#E065 Parsing Copyfiles section [USBDongleCopy.NT] in
“p:\dongle\usbkey2k.inf” failed. Error 0xe0000102: The required line was not
found in the INF.
The INF file is:
[Version]
Signature=“$WINDOWS NT$”
Class=USBDongle
ClassGUID={7C485487-0AF4-11d4-BA51-004005A6C1C4}
Provider=“Insert your company name here.”
[SourceDisksFiles]
USBKey.sys=1
[ClassInstall32.NT]
Addreg=HwClass.NT
[HwClass.NT]
HKR,%ClassName%
HKR,Icon,“-5”
[DestinationDirs]
DefaultDestDir=12
USBDongleCopy.NT=10,system32\drivers
[Manufacturer]
%Mfg%=MfgDeviceSection
[MfgDeviceSection]
%DeviceDesc% = USBDongle, USB\VID_07F2&PID_0001
[USBDongle]
CopyFiles=USBDongleCopy.NT
[USBDongleCopy.NT]
USBKey.sys
[USBDongle.Services]
AddService = USBDongle,%SPSVCINST_ASSOCSERVICE%,USBDongleInst
[USBDongleInst]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_MANUAL_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\USBKey.sys
[Strings]
ClassName =“USB Dongles”
DeviceDesc = “USB Dongle - Software Protection Device”
DiskId = “Install disk”
Mfg = “Put your company name here.”
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_MANUAL_START = 3
SERVICE_ERROR_NORMAL = 1