none
Win8_x64- Printer Installation Issue

    Question

  • Hi,

    When I tried to add a postscript printer driver in Win 8 X64 (release preview) , printer is not getting added. However, same works in win8 32 bit machine (as well as Win7 x64).

    I have Inf file and ppd file located on the same folder.

    Steps:

    1. Add a Printer-> Add a local Printer -> Use existing port -> FILE (Print to file)-> Have disk ->point to inf file->Next->Type printer name->Next -> Pops up UAC dialog-> on click of Yes it comes back to same page. DOes not do anything or throws error. Keeps coming back to the same page. Printer not getting installed.

    Event log has below message:

    ----------------------------------------------------

    0
       PnPDriverImportError
       Not available
       0
       x64
       E000022F
       ABC.inf
       7cceba03a41d698f323ae5ab9a410083b2daa31e  
      
       C:\Users\rp123\AppData\Local\Temp\DMID644.tmp.log.xml c:\DSF\Temp\builds for qa\64bit\Driver\pmprintdriver\ABC.inf
       C:\ProgramData\Microsoft\Windows\WER\ReportQueue\NonCritical_x64_c0e8f08eba51da9155822f8a3fca8435fd13c7_cab_0105d654
       
       0
       d1f552c5-16ab-11e2-9b67-000c29bbf359
       20

    ----------------------------------------------------  

     Below is my Inf file:

    --------------------INF STARTS HERE-----------------

    [Version]
    Signature="$Windows NT$"
    Provider=%MS%
    ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
    Class=Printer
    DriverVer=6/07/2001,1.0.0.1

    ;
    ; Manufacturer section.
    ;
    ; This section lists all of the manufacturers
    ; that we will display in the Dialog box
    ;
    [Manufacturer]
    "Microsoft"=Microsoft, NTamd64

    ;
    ; Model sections.
    ;
    ; Each section here corresponds with an entry listed in the
    ; [Manufacturer] section, above. The models will be displayed in the order
    ; that they appear in the INF file.
    ;

    [Microsoft]
    "ABC"  = INSTALL_OEMPS


    [Microsoft.NTamd64]
    "ABC"  = INSTALL_OEMPS

    ;
    ; Installer Sections
    ;
    ; These sections control file installation, and reference all files that
    ; need to be copied. The section name will be assumed to be the driver
    ; file, unless there is an explicit DriverFile section listed.
    ;

    [INSTALL_OEMPS]

    CopyFiles=(AT)ABC.PPD

    DataFile=ABC.PPD
    DataSection=PSCRIPT_DATA
    Include=NTPRINT.INF
    Needs=PSCRIPT.OEM,PSCRIPT_DATA

    ; Copy Sections
    ;
    ; Lists of files that are actually copied. These sections are referenced
    ; from the installer sections, above. Only create a section if it contains
    ; two or more files (if we only copy a single file, identify it in the
    ; installer section, using the @filename notation) or if it's a color
    ; profile (since the DestinationDirs can only handle sections, and not
    ; individual files).
    ;

    ;
    ; Data Sections
    ;

    ; These sections contain data that is shared between devices.
    ;

    ;
    ;  Location of source files not in Layout.inf.
    ;

    [SourceDisksNames]
    100 = %OEMSample%


    [SourceDisksFiles]
    ABC.PPD       = 100


    ;
    ; Call SetupSetDirectoryId with 66000 to set the target directory at runtime
    ; (depending on which environment drivers are getting installed)
    ;

    [DestinationDirs]
    DefaultDestDir=66000

    ;
    ; Localizable Strings
    ;
    [Strings]
    MS="Microsoft"
    OEMSample="OEM Drv"

     --------------------INF ENDS HERE----------------------

    Appreciate your help in this regards,

    Ramaprasad

    Monday, October 15, 2012 9:49 AM

Answers

  • Hi,

    I figured out the issue yesterday and I was able to install the driver. It was the certificate installation problem. I resoved it.

    Now my question is  -

    What are the implications of releasing/using certificate created with MakeCert.exe  tool in the production/final release? As I understand, this tool can be used for test signing the driver. What happens, If I release the driver with the same certificate?

    Thanks,

    Ram

    Tuesday, October 30, 2012 4:07 AM

All replies

  • what does the setup api logs say the specific error is? for win8, %windir%\inf\setupapi.dev.log


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

    Tuesday, October 16, 2012 8:11 PM
    Owner
  • Hi Doron,

    I have checked the setupapi.dev.log in 2 cases

    1. Without catalog file : As expected got below error-

         sto:      {DRIVERSTORE IMPORT VALIDATE} 03:02:04.402
    !!!  sig:           Driver package does not contain a catalog file, and Code Integrity is enforced.
    !!!  sig:           Driver package failed signature validation. Error = 0xE000022F
         sto:      {DRIVERSTORE IMPORT VALIDATE: exit(0xe000022f)} 03:02:04.418
    !!!  sig:      Driver package failed signature verification. Error = 0xE000022F
    !!!  sto:      Failed to import driver package into Driver Store. Error = 0xE000022F

    2. With Catalog file: I have created catalog file using Win DDK 8/Inf2Cat tool for windows 8 environment (both 32 and 64bit). Win 8 32bit installation works file. 64bit , I got below error-

        sto:      {DRIVERSTORE IMPORT VALIDATE} 02:50:39.365
    !!!  sig:           Driver package INF file hash is not present in catalog file. Filename = ABC.inf, Error = 0xE000024B
    !!!  sig:           Driver package appears to be tampered, and Code Integrity is enforced.
    !!!  sig:           Driver package failed signature validation. Error = 0xE000024B
         sto:      {DRIVERSTORE IMPORT VALIDATE: exit(0xe000024b)} 02:50:39.365
    !!!  sig:      Driver package failed signature verification. Error = 0xE000024B
    !!!  sto:      Failed to import driver package into Driver Store. Error = 0xE000024B

    Please let me know How to fix the above error?

    Thanks,

    Ram

    Wednesday, October 17, 2012 10:22 AM
  • You must have a signed Catalog File for installing driver on x64 machines.

    Use Inf2Cat for creating catalog file and then use sign.exe tool to sign the catalog file.

    After signing the catalog file: Just go into the file properties -> Digital signatures Tab and install the certificate on your machine, if not already installed.

    Wednesday, October 17, 2012 10:49 AM
  • Hi,

    I believe you are refering to SignTool.exe located in WDK8 folder. I have followed below steps:

    1. Create catalog file using Inf2cat.exe for win8

    2. Created test certificate using makecert.exe. http://msdn.microsoft.com/en-us/library/windows/hardware/ff540213(v=vs.85).aspx

    3. Signed cat file using Signtool.exe with above certificate

    4. Install the certificate on the destination machine with bcdedit.exe testsiginingon.

    5. Install the driver.

    Gives the same error...I believe the behaviour should be prompt for the alert on the security proceed right? Why this is enforcing certificate without which driver will not install?

    Please help...

    Wednesday, October 17, 2012 12:05 PM
  • how did you install the certificate? where did you install the cert?  you can use the win8 wdk with VS2012 to build the project and it will sign it properly for you with a private cert automatically. If you use the provision and deploy feature, it will install the cert and set up the test machine properly for you as well

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

    Wednesday, October 17, 2012 5:45 PM
    Owner
  • Hi Doron,

    I have installed as mentioned in the URL : http://msdn.microsoft.com/en-us/library/windows/hardware/ff547646(v=vs.85).aspx

    Please note: I am able to install the port (ddklocalmon, ddklocalui) in Win8 64bit which was built using WDK7 by AddPort->NewPort Type->Browse to inf file ->Port gets added.

    However, when I do- Add Printer->select Printer Inf file then it fails. Please note, In printer installation I have just 3 files (PPD file, Inf file , Catlog file).

    Also,

    This works in envs like xp, win7, win 2k03, win8 32bit. for just the printer installation in Win864 do I need to use WDK8?

    Thanks,

    Ram

    Thursday, October 18, 2012 6:47 AM
  • No WDK8 isn't required... i have developed both V3 and V4 drivers that are successfully installed on win8 32 and 63 bit platforms...

    i think you haven't installed the certificate (with which you signed the catalog file) on your machine. Just follow these steps:

    1) go to File->Properties in catalog file.

    2) go to digital signatures tab, select the signature and go to details. The General Tab must say the digital signature is OK. If it doesn't go to step 3:

    3) Click View certificate and then install. Now again follow step 2 and see if the signature is OK now...

    Once signature is OK, try to install the printer. If it doesn't, then post your setupapi.dev.log logs.

    Friday, October 19, 2012 6:25 AM
  • Hi,

    I did all these. I have installed the certificate in both Trusted Root Certification Authority and Trusted publishers before installing driver. I have checked the presence of my certificate over these my certmgr.msc. Please note this is test certificate.

    But still the same error...

        sto:      {DRIVERSTORE IMPORT VALIDATE} 02:50:39.365
    !!!  sig:           Driver package INF file hash is not present in catalog file. Filename = ABC.inf, Error = 0xE000024B
    !!!  sig:           Driver package appears to be tampered, and Code Integrity is enforced.
    !!!  sig:           Driver package failed signature validation. Error = 0xE000024B
         sto:      {DRIVERSTORE IMPORT VALIDATE: exit(0xe000024b)} 02:50:39.365
    !!!  sig:      Driver package failed signature verification. Error = 0xE000024B
    !!!  sto:      Failed to import driver package into Driver Store. Error = 0xE000024B

    Any thoughts...?

    I know this is due to driver signing enforcement startup option. If I disable it then it works fine as in other version of windows. But I dont want to do this.

    Thanks,

    Ram

    Monday, October 22, 2012 8:29 AM
  • have you tried using the w8 wdk process to sign? that is the least error prone way to do this.

    WRT hack not present in the catalog file, double click on the catalog file in explorer. in the properties dialog, go to the security catalog tab and go through the tag list.  the entry details for each tag will show the file name (abc.inf).  if you are signing with both sha1 and 2, there will be two entries for each signed file.  for the inf file, the OSAttr field should at least have 2:6.2 to indicate it is valid for w8.

    did you touch the INF in any way (even opening it in notepad and saving it without changing the contents) after signing? any change will invalidate the catalog file.


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

    • Proposed as answer by 夸父 Monday, June 09, 2014 6:20 AM
    Monday, October 22, 2012 11:14 PM
    Owner
  • Hi Doron,

    As you explained, I have checked the catalog file properties -

    1. In the Security catalog tab there are 2 entries (one for .Inf file and other one is for .ppd file) as expected for thumbprint algorithm sha1.

    2. OSAttr-> 2:5.1,2:5.2,2:6.0,2:6.1,2:6.2 as expected.

    coming to your second question, I have not changed/opened inf file or ppd file after signing.

    Please advice.

    Regards,

    Ram

    Monday, October 29, 2012 4:55 AM
  • Hi,

    I have one more question -

    What are the implications of releasing/using certificate created with MakeCert.exe  tool in the production/final release? As I understand, this tool can be used for test signing the driver. What happens, If I release the driver with the same certificate?

    Thanks,

    Ram

    Monday, October 29, 2012 9:46 AM
  • Hi,

    I figured out the issue yesterday and I was able to install the driver. It was the certificate installation problem. I resoved it.

    Now my question is  -

    What are the implications of releasing/using certificate created with MakeCert.exe  tool in the production/final release? As I understand, this tool can be used for test signing the driver. What happens, If I release the driver with the same certificate?

    Thanks,

    Ram

    Tuesday, October 30, 2012 4:07 AM
  • i would start a new thread with the more generic question about the cert. the cert you create is not rooted to any known cert athority. as such, it is not possible to authentic its origins or authenticity.

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

    Tuesday, October 30, 2012 4:27 AM
    Owner