I'm a software developer a printer manufacturer. Recently asked a driver. So i start digging for tutorials, samples, articles.
First thing i do, i downloaded the Windows Driver Kit 7600.16385.1. I install it, build it with some sample drivers (For example, generic/text only). I changed the manufacturer section in the inf file and worked fine. But i asked to do more specific driver, getting data from any application that can print and send it to our printer.
At this point i do some extra digging, installing Visual Studio 2013 and winddk 8.1. I try the v4 printer driver sample out of the box. I managed to build it (Inf to cat acting strange, so i disabled it project properities). Then i try the installing a printer with new driver. Driver software wasn't installed at all. I get through inf syntax, found some erros and fix it the problem. After then I keep getting 0x00000002 error. I managed to solve problem, then i getting 0x0000003 error.
So, i write down a inf intaller c# project, managed to install driver. Driver was showing up in printer drivers section, but i try the install a new printer, installation keep getting failed with error 0x0000003. I do some search about error, i found it's path_not_found error. I check my inf file, doing some syntax checking. I put some effort there, but i keep getting error 0x0000003.
What i do for solving the problem?
In forums, people say it's a priviledge problem causing this error in windows credentials. I setup new admin account and install the driver. But when try the setup a printer error is same.
I investigate windows logs under windows folder: setupapi.dev.log and setupact.log. In this section i find 0x0000002 errors, but not found 0x000003 errors. This is not helpful for me.
Some people in the forums says may be pre installed drivers and printer causing problems. I uninstall the drivers and printers under system32 driverstore. Also uninstall the printer sevices and printers section under control panel. Result is same.
I found channel9, it's microsoft development network some sort of. I found some video tutorials and slides about development. I watched HW-328T, HW-238T, HW-979P, HW-981P, HW-903T, HW-322T. This videos gave me some insight, but nothing more.
So i keep digging problem, using eventwiever tool by windows. Found HRESULT 0x80070003 error. It's a printer spooler error log says. I restart the spooler, error continued, i restart service and restart the computer, error continues.
I try the old entries of my driver Registry Editor. Result is same. I managed to get admin privilidges of windows folder, it didn't make difference.
I try the install new printer using command line with admin privlidges, result is same.
Numerous attemps for installing on 64 bit and 32 bit windows.
Also i try using GPD, PPD types.
My Code Samples.
INF File
[Version]
Signature="$Windows NT$"
Class=Printer
ClassGuid={4D36E979-E325-11CE-BFC1-08002BE10318}
Provider=%ManufacturerName%
CatalogFile=Ali.cat
ClassVer=4.0
DriverVer=08/01/2012,1.0.0.0
[DestinationDirs]
DefaultDestDir = 66000
[Manufacturer]
%ManufacturerName%=Ali,NTia64,NTamd64
[Ali]
"Ali V1" = Ali.GPD
[Ali.NTia64]
"Ali V1" = Ali.GPD
[Ali.NTamd64]
"Ali V1" = Ali.GPD
[SourceDisksNames.amd64]
1= %DiskName%,,,
[SourceDisksFiles.amd64]
Ali.gpd = 1
[SourceDisksNames.ia64]
1= %DiskName%,,,
[SourceDisksFiles.ia64]
Ali.gpd = 1
[Strings]
ManufacturerName="Ali"
DiskName="Ali Installation Disk"
My C# Function Code for installing inf files
if (SetupCopyOEMInf(inf_path, "", 2, 0x0000400, null, 0, 0, null))
Thanks in advance.
Note: if needed, i can post gpd file also.
It would appear that you do not have a copy section in the INF file that should look something like:
[Ali.GPD]
CopyFiles=@Ali.gpd
The Inf file requires this to know what files to copy. Here is the relevant MSDN doc on this topic.
Hope this helps.