Virtual printer driver INF configuration for v4 print drives


I am trying to create virtual print driver with WDK and print driver v4. I want to have virtual printer installed in system, display my own UI when printing - in ideal case a .NET win or wpf form. In the end, virtual printer will contact web service and will send there XPS file + XML containing metadata entered in UI.

I tryed to use v4 driver. So far, I tryed to modify printer project in Visual Studio 2013, here is my inf file:

Signature="$Windows NT$"

DefaultDestDir = 66000

1 = %DiskName%,,,""




ManufacturerName="My company"
PrinterName="Test print driver"
DiskName="MyV4PrintDriver Installation Disk"



I have test PC to deploy driver to (Win 8.1 in HyperV). Visual studio returns error on deployment. Unfortunatelly, log information in C:\DriverTest\Logs is not very usefull - says "Error HRESULT E_FAIL has been returned from call to a COM component"

I also tryed to install driver manually by running command:

rundll32 printui.dll,PrintUIEntry /ia /f "D:\Driver\MyV4PrintDriver.inf" /m "Test print driver"

But I am receiving 0x80004005 - Unspecified error.

Log files %windir%\inf\setupapi.* does not contain any error message too. - zip with logs from running deploy by Visual Studio and by running command are here

My question is: - Does anybody have any idea what could possibly be wrong? - Is my syntax of INF file correct, especially part with hardware ID? - I have no HWID since i am installing virtual printer:

  • Driver package is signed with test certificate, but running

    signtool verify /v /c myv4printdriver.inf

gives an error - "A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider". My test certificate is installed on test machine in trusted root certificates..

  • which log should I enable / check or which tool should I use, in order to see better error message or find some possible info about what is wrong?
asked on Stack Overflow Oct 9, 2014 by Jan Novák • edited Oct 20, 2014 by Jan Novák

1 Answer


The SetupApi logs will provide more information, whether or not it'll give you enough to solve the issue, I'm not sure. I've had a similar issue and although the logs are comprehensive, they didn't help on this occasion.

Either way though, you need to enable a few registries. See here for more details: - Sorry, just re-read the post. Looks like you've looked at the logs. I can't tell the verbosity settings from your post, so you could review to see if your SetupAPI logs are set to their most verbose to see if you can get additional information out. You can see the settings here:

Essentially, you need to change the value at this registry:


Also, from the last error you report, since it's a v4 driver, it sounds more than likely that it's due to Windows 8 signed driver enforcement rules. It requires a certificate to be installed and trusted. If it's not, it'll fail to install the driver.

Assuming you just want to get things working for testing purposes, there are two options here, you can either:

Bcdedit.exe -set TESTSIGNING ON

  • Install the certificate your using on the target device
answered on Stack Overflow Mar 19, 2015 by Andy • edited Jan 29, 2018 by Andy

User contributions licensed under CC BY-SA 3.0