locked
v4 Printer Driver can not Installed

    Question

  • In Visual studio 11 Developer preview, I created a v4 Printer Driver.
    However, Windows 8 Developer preview "Advanced Printer Setup",  in v4 Printer Driver can't installed.
    Cause something?
    "INF" problem or a description of the file?
    Tuesday, January 24, 2012 4:31 AM

Answers

  • If you're deploying the driver manually, say, via the Add Printer Wizard, that certificate will still show up as untrusted. You can install the certificate as trusted by running the following commands, where CertName.cer is the certificate that was used to sign your driver. Visual Studio will output that in the Win8BetaDebug directory under your project's directory. This will allow you to install the driver on your local machine.

        .\CertMgr.exe -add CertName.cer -c -s -r localMachine root
        .\CertMgr.exe -add CertName.cer -c -s -r localMachine TrustedPublisher

    You can also use Visual Studio to deploy your driver to a test machine. It takes care of all the certificate management on your behalf. MSDN has a good writeup on this. http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx. For print drivers, you can deploy these to the local machine as long as you change your debugger to use Debugging Tools for Windows - Remote Debugger.

    One more thing to be aware of: in your package project configuration, you'll want to change the settings for INF2Cat to make sure you're creating cat files that are compliant with Win7, Vista, or XP. By default, INF2Cat thumbprints drivers with sha256, which is not understood on earlier versions of Windows. To do this, just append "vista_x86;" or "vista_x64" to the beginning of the Windows Version List entry under General Inf2Cat settings.

    Wednesday, March 7, 2012 12:29 AM

All replies

  • Hi Rhino,

    It's difficult to say what the issue was without more details. I have a few ideas though:

     

    1. The v4 print driver template does not generate a functional v4 print driver INF (since we don't know what files go with which devices), so you'll need to create one. The "Developing v4 print drivers" whitepaper describes how to make a v4 print driver INF.

    2. You may also need to test sign the driver in order to get it to install.

    If neither of these work, you can check the following log files for more details as to what happened: 

    setupapi.app.log                          %windir%\inf\setupapi.app.log
    setupapi.dev.log                          %windir%\inf\setupapi.dev.log
    windowsupdate.log                         %windir%\WindowsUpdate.log
    device config event log                  %windir%\System32\winevt\Logs\Microsoft-Windows-Kernel-PnP%4Configuration.evtx

     

    Thanks!

    Justin [MSFT]

    Tuesday, January 24, 2012 9:10 PM
  • Even self signed  driver is giving same error.

    Step1: Windows 8 Preview Visual Studio 11 Beta create new sample v4 driver project.

    Step 2: Self sign cat file

    Step3: install from deploy folder

    >>>  [SetupCopyOEMInf - C:\Users\Rajeev\Desktop\dev\Fuego\Win8betaDebug\Fuego Package\Fuego.inf]

    >>>  Section start 2012/03/01 15:43:37.667
          cmd: pnputil  -a Fuego.inf
         sto: {Import Driver Package: C:\Users\Rajeev\Desktop\dev\Fuego\Win8betaDebug\Fuego Package\Fuego.inf} 15:43:37.669
         sto:      Driver Store   = C:\WINDOWS\System32\DriverStore [Online] (6.2.8250)
         sto:      Driver Package = C:\Users\Rajeev\Desktop\dev\Fuego\Win8betaDebug\Fuego Package\Fuego.inf
         sto:      Architecture   = amd64
         sto:      Flags          = 0x00000000
         inf:      Provider       = EFI
         inf:      Class GUID     = {4d36e979-e325-11ce-bfc1-08002be10318}
         inf:      Class Version  = 4.0
         inf:      Driver Version = 03/01/2012,6.2.8250.0
         inf:      Catalog File   = Fuego.cat
         inf:      Version Flags  = 0x00000001
         flq:      Copying 'C:\Users\Rajeev\Desktop\dev\Fuego\Win8betaDebug\Fuego Package\Fuego.cat' to 'C:\Users\Rajeev\AppData\Local\Temp\{7e29de2c-071a-7a4e-87a3-9b362885214a}\Fuego.cat'.
         flq:      Copying 'C:\Users\Rajeev\Desktop\dev\Fuego\Win8betaDebug\Fuego Package\Fuego.inf' to 'C:\Users\Rajeev\AppData\Local\Temp\{7e29de2c-071a-7a4e-87a3-9b362885214a}\Fuego.inf'.
         pol:      {Driver package policy check} 15:43:37.739
         pol:      {Driver package policy check - exit(0x00000000)} 15:43:37.739
         sto:      {Stage Driver Package: C:\Users\Rajeev\AppData\Local\Temp\{7e29de2c-071a-7a4e-87a3-9b362885214a}\Fuego.inf} 15:43:37.740
         inf:           {Query Configurability: C:\Users\Rajeev\AppData\Local\Temp\{7e29de2c-071a-7a4e-87a3-9b362885214a}\Fuego.inf} 15:43:37.742
         inf:                Driver package 'Fuego.inf' is configurable.
         inf:           {Query Configurability: exit(0x00000000)} 15:43:37.744
         flq:           Copying 'C:\Users\Rajeev\AppData\Local\Temp\{7e29de2c-071a-7a4e-87a3-9b362885214a}\Fuego.cat' to 'C:\WINDOWS\System32\DriverStore\Temp\{28c391f9-d8d7-014e-9332-5332d761ad0b}\Fuego.cat'.
         flq:           Copying 'C:\Users\Rajeev\AppData\Local\Temp\{7e29de2c-071a-7a4e-87a3-9b362885214a}\Fuego.inf' to 'C:\WINDOWS\System32\DriverStore\Temp\{28c391f9-d8d7-014e-9332-5332d761ad0b}\Fuego.inf'.
         sto:           {DRIVERSTORE IMPORT VALIDATE} 15:43:37.751
         sig:                {_VERIFY_FILE_SIGNATURE} 15:43:37.757
         sig:                     Key      = Fuego.inf
         sig:                     FilePath = C:\WINDOWS\System32\DriverStore\Temp\{28c391f9-d8d7-014e-9332-5332d761ad0b}\Fuego.inf
         sig:                     Catalog  = C:\WINDOWS\System32\DriverStore\Temp\{28c391f9-d8d7-014e-9332-5332d761ad0b}\Fuego.cat
    !    sig:                     Verifying file against specific (valid) catalog failed! (0x800b0109)
    !    sig:                     Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
         sig:                {_VERIFY_FILE_SIGNATURE exit(0x800b0109)} 15:43:37.769
         sig:                {_VERIFY_FILE_SIGNATURE} 15:43:37.769
         sig:                     Key      = Fuego.inf
         sig:                     FilePath = C:\WINDOWS\System32\DriverStore\Temp\{28c391f9-d8d7-014e-9332-5332d761ad0b}\Fuego.inf
         sig:                     Catalog  = C:\WINDOWS\System32\DriverStore\Temp\{28c391f9-d8d7-014e-9332-5332d761ad0b}\Fuego.cat
    !    sig:                     Verifying file against specific Authenticode(tm) catalog failed! (0x800b0109)
    !    sig:                     Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
         sig:                {_VERIFY_FILE_SIGNATURE exit(0x800b0109)} 15:43:37.773
    !!!  sig:                Driver package catalog file certificate does not belong to Trusted Root Certificates, and Code Integrity is enforced.
    !!!  sig:                Driver package failed signature validation. Error = 0xE0000247
         sto:           {DRIVERSTORE IMPORT VALIDATE: exit(0xe0000247)} 15:43:37.775
    !!!  sig:           Driver package failed signature verification. Error = 0xE0000247
    !!!  sto:           Failed to import driver package into Driver Store. Error = 0xE0000247
         sto:      {Stage Driver Package: exit(0xe0000247)} 15:43:37.777
         sto: {Import Driver Package: exit(0xe0000247)} 15:43:37.781
    !!!  inf: Failed to import driver package into driver store
    !!!  inf: Error 0xe0000247: A problem was encountered while attempting to add the driver to the store.
    <<<  Section end 2012/03/01 15:43:37.822
    <<<  [Exit status: FAILURE(0xe0000247)]
    Friday, March 2, 2012 2:52 AM
  • Have you tried this on the Consumer Preview release?
    Saturday, March 3, 2012 2:40 AM
    Moderator
  • Yes on consumer Preview release.
    Monday, March 5, 2012 6:36 PM
  • If you're deploying the driver manually, say, via the Add Printer Wizard, that certificate will still show up as untrusted. You can install the certificate as trusted by running the following commands, where CertName.cer is the certificate that was used to sign your driver. Visual Studio will output that in the Win8BetaDebug directory under your project's directory. This will allow you to install the driver on your local machine.

        .\CertMgr.exe -add CertName.cer -c -s -r localMachine root
        .\CertMgr.exe -add CertName.cer -c -s -r localMachine TrustedPublisher

    You can also use Visual Studio to deploy your driver to a test machine. It takes care of all the certificate management on your behalf. MSDN has a good writeup on this. http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx. For print drivers, you can deploy these to the local machine as long as you change your debugger to use Debugging Tools for Windows - Remote Debugger.

    One more thing to be aware of: in your package project configuration, you'll want to change the settings for INF2Cat to make sure you're creating cat files that are compliant with Win7, Vista, or XP. By default, INF2Cat thumbprints drivers with sha256, which is not understood on earlier versions of Windows. To do this, just append "vista_x86;" or "vista_x64" to the beginning of the Windows Version List entry under General Inf2Cat settings.

    Wednesday, March 7, 2012 12:29 AM