none
WinUsb, INF fail to install on Win7 while Successfully install in Win8 RRS feed

  • Question

  • Use-case

    • Windows 2012 as the development machine ( where the INF is signed )
    • inf2cat and signtool are used to sign the INF
    • Signed INF ( along with the co-installers ) are deployed on a Win7 Ultimate machine

    Problem description

    While successfully installed on Win8*.* while right-clicking to install on Win7 I get "The INF file you selected does not support this method of installation" ( setupapi.dev.log say nothing )

    When using "devcon dp_add %INF File" the driver is successfully installed, BUT, is not associated with any of the related Hardware IDs... After devcon usage, when manually updating the driver using "Device Manager", I get "The required section was not found in the INF", setupapi.dev.log is saying the same: "CoInstaller 1: failed(0xe0000101)!, !!!  dvi: Error 0xe0000101: The required section was not found in the INF."

    What am I doing wrong? why does for Win8 the INF is successfully installed and for Win7 it fails ?

    Signing procedure

    inf2cat /driver:"$(ProjectDir)\Driver Files" /os:8_X64,7_X64
    signtool sign /p password /f "$(ProjectDir)\Driver Files\certificate.pfx" "$(ProjectDir)\Driver Files\winusbinstallation.cat"
    INF File used
    ; Use for signing: http://msdn.microsoft.com/en-us/library/windows/hardware/ff540161(v=vs.85).aspx
    ;
    ; Installs WinUsb
    ;
    
    [Version]
    Signature = "$Windows NT$"
    Class     = AndroidUsbDeviceClass
    ClassGUID = {3F966BD9-FA04-4ec5-991C-D326973B5128}
    Provider  = %ManufacturerName%
    CatalogFile = WinUSBInstallation.cat
    DriverVer=09/04/2014,13.54.20.543
    
    ; ========== Manufacturer/Models sections ===========
    
    [Manufacturer]
    %ManufacturerName% = Standard,NTamd64
    
    [Standard.NTamd64]
    %AOA_Device_2D00%		= USB_Install, USB\VID_18D1&PID_2D00
    %ADB_Device_2D01%		= USB_Install, USB\VID_18D1&PID_2D01&MI_00
    %AOA_Device_2D01%		= USB_Install, USB\VID_18D1&PID_2D01&MI_01
    %AOA_Device_2D05%		= USB_Install, USB\VID_18D1&PID_2D05&MI_00
    %ADB_Device_2D05%		= USB_Install, USB\VID_18D1&PID_2D05&MI_03
    %AudControl_Device_2D05%	= USB_Install, USB\VID_18D1&PID_2D05&MI_01
    
    ; ========== Class definition ===========
    
    [ClassInstall32]
    AddReg = ClassInstall_AddReg
    
    [ClassInstall_AddReg]
    HKR,,,,%ClassName%
    HKR,,NoInstallClass,,1
    HKR,,IconPath,%REG_MULTI_SZ%,"%systemroot%\system32\setupapi.dll,-20"
    HKR,,LowerLogoVersion,,5.2
    
    ; =================== Installation ===================
    
    [USB_Install]
    Include = winusb.inf
    Needs   = WINUSB.NT
    
    [USB_Install.Services]
    Include = winusb.inf
    Needs   = WINUSB.NT.Services
    
    [USB_Install.HW]
    AddReg=Dev_AddReg
    
    [Dev_AddReg]
    HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}"
    
    [USB_Install.CoInstallers]
    AddReg=CoInstallers_AddReg
    CopyFiles=CoInstallers_CopyFiles
    
    [CoInstallers_AddReg]
    HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01011.dll,WdfCoInstaller","WinUsbCoInstaller2.dll"
    
    [CoInstallers_CopyFiles]
    WinUsbCoInstaller2.dll
    WdfCoInstaller01011.dll
    
    [DestinationDirs]
    ; If your INF needs to copy files, you must not use the DefaultDestDir directive here.  
    CoInstallers_CopyFiles=11
    
    ; ================= Source Media Section =====================
    [SourceDisksNames]
    1 = %DiskName%
    
    [SourceDisksFiles]
    WinUsbCoInstaller2.dll=1
    WdfCoInstaller01011.dll=1
    
    
    ; =================== Strings ===================
    
    [Strings]
    ManufacturerName="NewComp Inc"
    ClassName="Universal Serial Bus devices"
    AOA_Device_2D00="Android AOA Interface (2D00)"
    AOA_Device_2D01="Android AOA Interface (2D01)"
    ADB_Device_2D01="Android ADB Interface (2D01)"
    
    AOA_Device_2D05="Android AOA Interface (2D05)"
    ADB_Device_2D05="Android ADB Interface (2D05)"
    AudControl_Device_2D05="Android Audio Interface (2D05)"
    
    REG_MULTI_SZ = 0x00010000


    Nadav Rubinstein, See my Blog @ http://www.sophin.com





    • Edited by Nadav Rub Tuesday, February 3, 2015 12:30 PM
    Tuesday, February 3, 2015 11:33 AM

Answers

  • Installation of drivers by right-clicking on an INF file is not supported

     -Brian


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

    Tuesday, February 3, 2015 8:34 PM
    Moderator
  • There were two problems, one is, as other mentioned, the fact that Win7 doesn't support INF installation by right-clicking, this however, didn't explain the devcon dp_add installation problem described in the original post, the resolution was to add the following to the INF file, while this is not required when installing on Win8, IT IS mandatory when installing @ Win7

    [USB_Install.Wdf]
    KmdfService=WINUSB, WinUsb_Install
    
    [WinUsb_Install]
    KmdfLibraryVersion=1.11
    
    I have spent half a day on hunting this down, having better logging information would greatly reduce the time it takes to resolve such problems, for example, By adding the name of the expected/missing section to the message "The required section was not found in the INF"



    Nadav Rubinstein, See my Blog @ http://www.sophin.com

    Wednesday, February 4, 2015 8:59 AM

All replies

  • Installation of drivers by right-clicking on an INF file is not supported

     -Brian


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

    Tuesday, February 3, 2015 8:34 PM
    Moderator
  • win8.1 added support for right click on the INF (it does a package import) because it is such a common user action, but previous releases didn't and you must import the package with the proper tooling

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

    Tuesday, February 3, 2015 8:38 PM
  • There were two problems, one is, as other mentioned, the fact that Win7 doesn't support INF installation by right-clicking, this however, didn't explain the devcon dp_add installation problem described in the original post, the resolution was to add the following to the INF file, while this is not required when installing on Win8, IT IS mandatory when installing @ Win7

    [USB_Install.Wdf]
    KmdfService=WINUSB, WinUsb_Install
    
    [WinUsb_Install]
    KmdfLibraryVersion=1.11
    
    I have spent half a day on hunting this down, having better logging information would greatly reduce the time it takes to resolve such problems, for example, By adding the name of the expected/missing section to the message "The required section was not found in the INF"



    Nadav Rubinstein, See my Blog @ http://www.sophin.com

    Wednesday, February 4, 2015 8:59 AM