rpcclient adddrivers and WERR_UNKNOWN_PRINTER_DRIVER

Ryan Dibley rdibley at SoftHome.net
Sun Sep 17 00:58:45 PDT 2006


I give up!  I've set up CUPS and Samba to share my printer.  (HP Deskjet 970ce)  I've installed the vendor drivers locally on my Windows XP machine and Samba/CUPS works great, but I'd like to install the vendor drivers into Samba to enable Point'n'Print.  I've tried a bunch of different things, and I've searched through google and as much documentation as I could find, but none of it led me to anything that works.

I first queried my Windows machine to figure out which files I need:



[Windows NT x86]
Printer Driver Info 3:
        Version: [3]
        Driver Name: [hp deskjet 970c series]
        Architecture: [Windows NT x86]
        Driver Path: [\\MYPC\print$\W32X86\3\hpz2ku04.dll]
        Datafile: [\\MYPC\print$\W32X86\3\hpf97004.dat]
        Configfile: [\\MYPC\print$\W32X86\3\hpzntp04.dll]
        Helpfile: [\\MYPC\print$\W32X86\3\hpfuih04.hlp]

        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzr3204.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzrpp04.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzimb04.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzpcl04.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzcon04.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzcfg04.exe]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzeng04.exe]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzime04.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzjui04.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzpre04.exe]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzstc04.exe]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpztbi04.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpztbu04.exe]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpztbx04.exe]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzlnt04.dll]
        Dependentfiles: [\\MYPC\print$\W32X86\3\hpzcoi04.dll]

        Monitorname: [hpzlnt04]
        Defaultdatatype: []



In this case, "MYPC" is my Windows machine.  So I copied these files into the W32X86 directory under the \\localhost\print$ directory.  I then ran the following command (hopefully the formatting doesn't get messed up here):



rpcclient -Uroot -c 'adddriver "Windows NT x86" "hp deskjet 970c series:hpz2ku04.dll:hpf97004.dat:    \
                                                 hpzntp04.dll:hpfuih04.hlp:NULL:RAW:                  \
                                                 hpz2ku04.dll,hpf97004.dat,hpzntp04.dll,hpfuih04.hlp, \
                                                 hpzr3204.dll,hpzrpp04.dll,hpzimb04.dll,hpzpcl04.dll, \
                                                 hpzcon04.dll,hpzcfg04.exe,hpzeng04.exe,hpzime04.dll, \
                                                 hpzjui04.dll,hpzpre04.exe,hpzstc04.exe,hpztbi04.dll, \
                                                 hpztbu04.exe,hpztbx04.exe,hpzlnt04.dll,hpzcoi04.dll" ' localhost



It returns with an error message:



result was WERR_UNKNOWN_PRINTER_DRIVER



I removed the HP drivers from my Windows machine and installed the drivers Windows installs by default for my printer.  I repeated the process, but it didn't work either.  Result of my query of the Windows machine:



[Windows NT x86]
Printer Driver Info 3:
        Version: [3]
        Driver Name: [HP DeskJet 970Cse]
        Architecture: [Windows NT x86]
        Driver Path: [\\MYPC\print$\W32X86\3\UNIDRV.DLL]
        Datafile: [\\MYPC\print$\W32X86\3\HPFDJ97E.GPD]
        Configfile: [\\MYPC\print$\W32X86\3\UNIDRVUI.DLL]
        Helpfile: [\\MYPC\print$\W32X86\3\UNIDRV.HLP]

        Dependentfiles: [\\MYPC\print$\W32X86\3\HPFUD50.DLL]
        Dependentfiles: [\\MYPC\print$\W32X86\3\UNIRES.DLL]
        Dependentfiles: [\\MYPC\print$\W32X86\3\HPFDJ50.INI]
        Dependentfiles: [\\MYPC\print$\W32X86\3\HPFUI50.DLL]
        Dependentfiles: [\\MYPC\print$\W32X86\3\HPFIMG50.DLL]
        Dependentfiles: [\\MYPC\print$\W32X86\3\HPF900AL.DLL]
        Dependentfiles: [\\MYPC\print$\W32X86\3\HPFDJ970.GPD]
        Dependentfiles: [\\MYPC\print$\W32X86\3\HPFDJ97X.GPD]
        Dependentfiles: [\\MYPC\print$\W32X86\3\HPFDJ200.HLP]
        Dependentfiles: [\\MYPC\print$\W32X86\3\HPFNAM50.GPD]
        Dependentfiles: [\\MYPC\print$\W32X86\3\STDNAMES.GPD]

        Monitorname: []
        Defaultdatatype: []



I then copied the files over to the W32X86 directory as before, and ran rpcclient:



rpcclient -Uroot -c 'adddriver "Windows NT x86" "hp deskjet 970c series:UNIDRV.DLL:HPFDJ97E.GPD:      \
                                                 UNIDRVUI.DLL:UNIDRV.HLP:NULL:RAW:                    \
                                                 HPFUD50.DLL,UNIRES.DLL,HPFDJ50.INI,HPFUI50.DLL,      \
                                                 HPFIMG50.DLL,HPF900AL.DLL,HPFDJ970.GPD,HPFDJ97X.GPD, \
                                                 HPFDJ200.HLP,HPFNAM50.GPD,STDNAMES.GPD" ' localhost



Which returns the same error message:



result was WERR_UNKNOWN_PRINTER_DRIVER



I've noticed that in all of the examples I've found on the web of people using rpcclient and adddriver, the "Data File Name" is a .ppd file.  Neither set of drivers I tried had any .ppd files.  I tried using the hpijs driver for my printer (from linuxprinting.org) in place of the "Data File Name", but that didn't work either.  Is it just a coincidence that all of the examples have .ppd data file names, or is there something more to it?  There seems to be no mention of such a requirement in the documentation I've read, and it seems a little odd that the file would have to be a .ppd since it is going to be copied to a Windows machine anyway.

I've also tried the Windows Add Printer Wizard approach, but even when logging in as root, it won't allow me to update the driver.  It's my guess that something may have changed in Windows since the Kurt Pfeifle's howto was written.

Does anybody have any suggestions?  I'm sure I've forgotten to mention some details, so ask away!  I have my doubts that I'm the first to run into this, but I've tried and failed to find anyone else who's run into this and solved it.

Thanks in advance,

Ryan




More information about the cups mailing list