locked
Printer V4 driver INF service issue RRS feed

  • Question

  • I am trying to build printer v4 driver using below system configuration

    OS: Windows 10 pro

    Microsoft Visual Studio Professional 2019 (Professional)
    Version 16.5.4

    WDK version: 10.0.18346.1000

    All required c\c++ packages are installed.

    I am referring the link to build printer driver building basic v4 printer driver 

    I follow all the steps mentioned in link.



    But as I build the solution it give error "Hardware 'Fabrikam' does not have an associated service using install section 'DriverInstall'."

    I add the service section "addservice = ,0x2". but it give error

    Error 8611 (DE22.23.8611) INF contains banned directive ADDSERVICE which is not allowed in this INF

    So I confused how to resolve this issue. 

    My inf

    [Version]
    Signature="$Windows NT$"
    Class=Printer
    ClassGuid={4D36E979-E325-11CE-BFC1-08002BE10318}
    Provider=%ManufacturerName%



    CatalogFile=MyV4PrintDriver.cat
    ClassVer=4.0
    DriverVer=01/01/2020,1.0.0.0

    [Manufacturer]
    %ManufacturerName%=Standard,NT$ARCH$
    Thanks in advance.
    [Standard.NT$ARCH$]
    "Fabrikam 1234= DriverInstall, LPTENUM\Fabrik9000_sdfjkals

    [DriverInstall]
    CopyFiles=DriverFiles

    [DriverInstall.Services]
    AddService=,0x2

    [DriverFiles]
    MyV4PrintDriver.gpd
    MyV4PrintDriver-manifest.ini
    MyV4PrintDriverRenderFilter-PipelineConfig.xml
    MyV4PrintDriverRenderFilter.dll

    [DestinationDirs]
    DefaultDestDir = 66000

    [SourceDisksNames]
    1 = %DiskName%,,,""

    [SourceDisksFiles]
    MyV4PrintDriver.gpd=1
    MyV4PrintDriver-manifest.ini=1
    MyV4PrintDriverRenderFilter-PipelineConfig.xml=1
    MyV4PrintDriverRenderFilter.dll=1

    [Strings]
    ManufacturerName="Fabrikam" ;TODO: Replace with your manufacturer name
    DiskName="MyV4PrintDriver Installation Disk"






    Wednesday, April 22, 2020 10:13 AM

All replies

  • Obviously fixed in InsiderPreviewWDK: 
    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/b241bb8c-ec2c-4c51-bac1-d82742a8e2f7/hardware-hardwareid-does-not-have-an
    associated-service-using-install-section-driverinstall?forum=wdk
    (Having no personal experience, I cannot tell, if installation will have some 'unwanted sideeffects'). 
    Workaround: you may probably want to skip automatic infgate execution in Post-Build-Events.
    Driver should build then. 
    To make use of extended diagnostics features of infgate:
    https://docs.microsoft.com/en-us/windows-hardware/drivers/print/v4-driver-inf#inf-restrictions
    you certainly can run it manually afterwards - ignoring above error for the time being. 

    With kind regards
    Wednesday, April 22, 2020 11:00 AM
  • Thanks for your valuable guidance.

    As suggested I ignore the error by setting post-buldevent of infgate.exe.

    It working now, But as I trying to deploying code my target machine get rebooted and I got timeout issue.

    I raise issue https://social.msdn.microsoft.com/Forums/en-US/bceffe3e-d82d-4127-a261-2af8eefd58c7/printer-v4-driver-deployment-target-machine-reboot-issue?forum=wdk

    So please check you can guide for this issue.

    Thanks in advance.

    Thursday, April 23, 2020 11:04 AM