none
"Required line not found in inf" RRS feed

  • Question

  • Hello I am  using following inf code to install winusb on my windows 7 64 bit, I am getting error "Required line not found in inf" can any one plz guide me what I am doing wrong??

    Inf file:



    [Version]
    Signature = "$Windows NT$"
    Class = USB
    ClassGUID={36fc9e60-c465-11cf-8056-444553540000}

    Provider = %ProviderName%
    DriverVer=09/13/2013,15.25.57.652
    CatalogFile="mycatfile.cat"

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

    [Manufacturer]
    %ProviderName% = MyDevice_WinUSB,NTamd64


    [MyDevice_WinUSB.NTamd64]
    %USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_03F0&PID_8911&MI_00

    ; =================== 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.7

    [USB_Install.HW]
    AddReg=Dev_AddReg

    [Dev_AddReg]
    HKR,,DeviceInterfaceGUIDs,0x10000,"{609313D8-2F4F-4FFE-BAE3-8DEC5A94BAFD}"

    [USB_Install.CoInstallers]
    AddReg=CoInstallers_AddReg
    CopyFiles=CoInstallers_CopyFiles

    [CoInstallers_AddReg]
    HKR,,CoInstallers32,0x00010000,"winusbcoinstaller.dll","WudfUpdate_01007.dll","WdfCoinstaller01007.dll,WdfCoInstaller"

    [CoInstallers_CopyFiles]
    winusbcoinstaller.dll
    WdfCoinstaller01007.dll
    WudfUpdate_01007.dll

    [DestinationDirs]
    CoInstallers_CopyFiles=11


    ; ================= Source Media Section =====================


    [SourceDisksNames]
    1 = %DISK_NAME%


    [SourceDisksFiles.NTamd64]
    winusbcoinstaller.dll=1
    WdfCoinstaller01007.dll=1
    WudfUpdate_01007.dll=1

    ; Copy Files section
    ;------------------------------------------------------------------------------
    [_CopyFiles_sys]
    winusb.sys

    ;************************************************* *****************************
    ; Destination Directories
    ;------------------------------------------------------------------------------
    [DestinationDirs]
    DefaultDestDir = 12 ;%SystemRoot%\system32\drivers
    _CopyFiles_sys = 12

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

    [Strings]
    ProviderName="HP"
    USB\MyDevice.DeviceDesc="Deskjet 1050 J410 series"
    WinUSB_SvcDesc="WinUSBDrive"
    DISK_NAME="test5_64"
    ClassName = "USB"

    Friday, September 27, 2013 8:17 AM

Answers

  • Tim: Do not delete INFs in %windir%\inf.  That can potentially break PNP state and cause problems on the system.  In the scenario you describe, the correct solution would be to either update the date and/or version in the INF and re-sign it so it will be recognized as a different driver, or first remove the old version of the driver before trying to add the updated version.

    From the log snippet posted earlier, Coinstaller2 is the source of the error:

    {DIF_INSTALLDEVICE} 11:44:34.652
         dvi:                     No class installer for 'Deskjet 1050 J410 series'
         dvi:                     CoInstaller 1: Enter 11:44:34.652
         dvi:                     CoInstaller 1: Exit
         dvi:                     CoInstaller 2: Enter 11:44:35.292
         inf:                          Opened PNF: 'C:\Windows\INF\oem31.inf' ([strings])
    !!!  dvi:                     CoInstaller 2: failed(0xe0000102)!
    !!!  dvi:                     Error 0xe0000102: The required line was not found in the INF.

    During installation, coinstaller 2 was invoked and it returned that error. The first step at identifying what is wrong is looking at which coinstaller that is. If you start from that error and head up in the log section, there should be a line that tells you what module/entrypoint corresponds to coinstaller2. For example, if coinstaller 2 is one of the WDF coinstallers, then perhaps you are missing a required WDF INF directive. 

    Tuesday, October 1, 2013 10:20 PM

All replies

  • What does %windir%\inf\setupapi.dev.log say? Run chkinf on the file as well

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, September 27, 2013 5:21 PM
  • I have checked with chkinf there is no error in inf file, I cannot find setupapi.dev.log file, but there is a file name setupapi.offline.log.   Please help
    Friday, September 27, 2013 5:32 PM
  • can you send a list of all the *.log file names in %windir%\inf ? are you running on win7 embedded or the normal SKU?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, September 27, 2013 7:01 PM
  • I found that file, following are sections showing error:

    Opened INF: 'C:\Windows\System32\DriverStore\Temp\{07596a20-8343-1846-a88f-d56ef9f6125f}\winusbdemo.inf' ([strings])
         sig:                          {_VERIFY_FILE_SIGNATURE} 11:44:15.823
         sig:                               Key      = winusbdemo.inf
         sig:                               FilePath = C:\Windows\System32\DriverStore\Temp\{07596a20-8343-1846-a88f-d56ef9f6125f}\winusbdemo.inf
         sig:                               Catalog  = C:\Windows\System32\DriverStore\Temp\{07596a20-8343-1846-a88f-d56ef9f6125f}\mycatfile.cat
    !    sig:                               Verifying file against specific (valid) catalog failed! (0x00000057)
    !    sig:                               Error 87: The parameter is incorrect.
         sig:                          {_VERIFY_FILE_SIGNATURE exit(0x00000057)} 11:44:15.839
         sig:                          {_VERIFY_FILE_SIGNATURE} 11:44:15.839
         sig:                               Key      = winusbdemo.inf
         sig:                               FilePath = C:\Windows\System32\DriverStore\Temp\{07596a20-8343-1846-a88f-d56ef9f6125f}\winusbdemo.inf
         sig:                               Catalog  = C:\Windows\System32\DriverStore\Temp\{07596a20-8343-1846-a88f-d56ef9f6125f}\mycatfile.cat
    !    sig:                               Verifying file against specific Authenticode(tm) catalog failed! (0x800b0100)
    !    sig:                               Error 0x800b0100: No signature was present in the subject.
         sig:                          {_VERIFY_FILE_SIGNATURE exit(0x800b0100)} 11:44:15.839
    !    sto:                          Driver package does not contain a signature, but user wants to install anyway.

     

     

    {_VERIFY_FILE_SIGNATURE} 11:44:34.372
         sig:           Key      = winusbdemo.inf
         sig:           FilePath = C:\Windows\System32\DriverStore\FileRepository\winusbdemo.inf_amd64_neutral_ca5551ed316da8e7\winusbdemo.inf
         sig:           Catalog  = C:\Windows\System32\DriverStore\FileRepository\winusbdemo.inf_amd64_neutral_ca5551ed316da8e7\mycatfile.cat
    !    sig:           Verifying file against specific (valid) catalog failed! (0x00000057)
    !    sig:           Error 87: The parameter is incorrect.
         sig:      {_VERIFY_FILE_SIGNATURE exit(0x00000057)} 11:44:34.387
         sig:      {_VERIFY_FILE_SIGNATURE} 11:44:34.387
         sig:           Key      = winusbdemo.inf
         sig:           FilePath = C:\Windows\System32\DriverStore\FileRepository\winusbdemo.inf_amd64_neutral_ca5551ed316da8e7\winusbdemo.inf
         sig:           Catalog  = C:\Windows\System32\DriverStore\FileRepository\winusbdemo.inf_amd64_neutral_ca5551ed316da8e7\mycatfile.cat
    !    sig:           Verifying file against specific Authenticode(tm) catalog failed! (0x800b0100)
    !    sig:           Error 0x800b0100: No signature was present in the subject.
         sig:      {_VERIFY_FILE_SIGNATURE exit(0x800b0100)} 11:44:34.387

     


    {_VERIFY_FILE_SIGNATURE} 11:44:34.434
         sig:                Key      = winusbdemo.inf
         sig:                FilePath = C:\Windows\System32\DriverStore\FileRepository\winusbdemo.inf_amd64_neutral_ca5551ed316da8e7\winusbdemo.inf
         sig:                Catalog  = C:\Windows\System32\DriverStore\FileRepository\winusbdemo.inf_amd64_neutral_ca5551ed316da8e7\mycatfile.cat
    !    sig:                Verifying file against specific (valid) catalog failed! (0x00000057)
    !    sig:                Error 87: The parameter is incorrect.
         sig:           {_VERIFY_FILE_SIGNATURE exit(0x00000057)} 11:44:34.465
         sig:           {_VERIFY_FILE_SIGNATURE} 11:44:34.465
         sig:                Key      = winusbdemo.inf
         sig:                FilePath = C:\Windows\System32\DriverStore\FileRepository\winusbdemo.inf_amd64_neutral_ca5551ed316da8e7\winusbdemo.inf
         sig:                Catalog  = C:\Windows\System32\DriverStore\FileRepository\winusbdemo.inf_amd64_neutral_ca5551ed316da8e7\mycatfile.cat
    !    sig:                Verifying file against specific Authenticode(tm) catalog failed! (0x800b0100)
    !    sig:                Error 0x800b0100: No signature was present in the subject.

     

     


    ScanQ number of copy nodes=4
         flq:                     File 'C:\Windows\system32\DRIVERS\winusb.sys' pruned from copy.
         sig:                     Using catalog 'C:\Windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Microsoft-Windows-Client-Drivers-Package~31bf3856ad364e35~amd64~~6.1.7600.16385.cat'.
         cpy:                     DrpSetRegFileProt 'C:\Windows\system32\DRIVERS\winusb.sys' Status=0 Class=Inbox Windows protected
         flq:                     File 'C:\Windows\system32\winusbcoinstaller.dll' pruned from copy.
         sig:                     Using catalog 'C:\Windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem31.CAT'.
    !    sig:                     VerifyTrustFailed for C:\Windows\system32\winusbcoinstaller.dll.
    !    sig:                     Error 87: The parameter is incorrect.
         cpy:                     DrpSetRegFileProt 'C:\Windows\system32\winusbcoinstaller.dll' Status=0 Class=OEM Legacy
         flq:                     File 'C:\Windows\system32\WdfCoinstaller01007.dll' pruned from copy.
         sig:                     Using catalog 'C:\Windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem31.CAT'.
    !    sig:                     VerifyTrustFailed for C:\Windows\system32\WdfCoinstaller01007.dll.
    !    sig:                     Error 87: The parameter is incorrect.
         cpy:                     DrpSetRegFileProt 'C:\Windows\system32\WdfCoinstaller01007.dll' Status=0 Class=OEM Legacy
         flq:                     File 'C:\Windows\system32\WudfUpdate_01007.dll' pruned from copy.
         sig:                     Using catalog 'C:\Windows\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem31.CAT'.
    !    sig:                     VerifyTrustFailed for C:\Windows\system32\WudfUpdate_01007.dll.
    !    sig:                     Error 87: The parameter is incorrect.
         cpy:                     DrpSetRegFileProt 'C:\Windows\system32\WudfUpdate_01007.dll' Status=0 Class=OEM Legacy
         flq:                    

     

     

    {DIF_INSTALLDEVICE} 11:44:34.652
         dvi:                     No class installer for 'Deskjet 1050 J410 series'
         dvi:                     CoInstaller 1: Enter 11:44:34.652
         dvi:                     CoInstaller 1: Exit
         dvi:                     CoInstaller 2: Enter 11:44:35.292
         inf:                          Opened PNF: 'C:\Windows\INF\oem31.inf' ([strings])
    !!!  dvi:                     CoInstaller 2: failed(0xe0000102)!
    !!!  dvi:                     Error 0xe0000102: The required line was not found in the INF.

    Saturday, September 28, 2013 6:40 AM
  • I have signed my catalog file properly,

    Kernel library 1.7 

    do work with win 7 64 bit right??
    Saturday, September 28, 2013 9:01 AM
  • The catalog lists your inf and all of the DLLs? From the output, it doesn't

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Saturday, September 28, 2013 5:17 PM
  • Yes I have verified it by starting my cat file, it shows all 3 dlls and my inf file with unique hash value....!! is there any other problem??

    what does this section means 

    "VerifyTrustFailed for C:\Windows\system32\WdfCoinstaller01007.dll.
    !    sig:                     Error 87: The parameter is incorrect."

    Saturday, September 28, 2013 5:50 PM
  • My catalog file is signed correctly, Even catalog file lists all the dlls and inf. Still i get same error "required line not found in inf" which line in output shows that they are not listed in catalog?? plzz help....

    Thank You :)

    Saturday, September 28, 2013 6:08 PM
  • The "required line is missing" error is coming from oem31.inf, and it thinks the [Strings] section is missing.  Is it possible you have an older copy of your INF in \windows\inf?

    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.

    Sunday, September 29, 2013 5:32 AM
  • No Tim, check my inf in first post, It includes [Strings] section at bottom, 

    Older copy inf means??? what you want to convey I can't get you??

    Thank You 

    Sunday, September 29, 2013 7:09 AM
  • Change the "\" character in USB\MyDevice.DeviceDesc to be a period, underscore, or something else

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting.

    Monday, September 30, 2013 7:48 PM
    Moderator
  • Thank Brain,

    but it didn't worked!! i tried it. :(

    Tuesday, October 1, 2013 2:59 PM
  • When Device Manager goes to find a driver, it looks first in the list of drivers that have been used before.  If it's not found there, it goes to look in the Driver Store.  The list of drivers that have been used before is in \Windows\INF.  Your log says the error was found in \Windows\INF\oem31.inf.  That might be an older copy of your INF.  If you didn't update the version number in your INF, the system might decide it can use that one instead of going to the trouble to read your new package.

    If that IS the case, you can delete \windows\inf\oem31.* and try again.


    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.

    Tuesday, October 1, 2013 4:34 PM
  • > Change the "\" character in USB\MyDevice.DeviceDesc

    No, that's irrelevant.  If you look in \Windows\INF, you'll see that virtually every INF file in there uses the hardware ID for the description string name, and they all use backslashes.


    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.

    Tuesday, October 1, 2013 4:35 PM
  • Tim: Do not delete INFs in %windir%\inf.  That can potentially break PNP state and cause problems on the system.  In the scenario you describe, the correct solution would be to either update the date and/or version in the INF and re-sign it so it will be recognized as a different driver, or first remove the old version of the driver before trying to add the updated version.

    From the log snippet posted earlier, Coinstaller2 is the source of the error:

    {DIF_INSTALLDEVICE} 11:44:34.652
         dvi:                     No class installer for 'Deskjet 1050 J410 series'
         dvi:                     CoInstaller 1: Enter 11:44:34.652
         dvi:                     CoInstaller 1: Exit
         dvi:                     CoInstaller 2: Enter 11:44:35.292
         inf:                          Opened PNF: 'C:\Windows\INF\oem31.inf' ([strings])
    !!!  dvi:                     CoInstaller 2: failed(0xe0000102)!
    !!!  dvi:                     Error 0xe0000102: The required line was not found in the INF.

    During installation, coinstaller 2 was invoked and it returned that error. The first step at identifying what is wrong is looking at which coinstaller that is. If you start from that error and head up in the log section, there should be a line that tells you what module/entrypoint corresponds to coinstaller2. For example, if coinstaller 2 is one of the WDF coinstallers, then perhaps you are missing a required WDF INF directive. 

    Tuesday, October 1, 2013 10:20 PM
  • Thanks , It worked out :) 
    Thursday, October 3, 2013 6:37 AM