[Samba] installing printer in a logon script

Paul Gienger pgienger at ae-solutions.com
Fri Nov 5 18:58:28 GMT 2004

>>>> Connect to the server and enter the "Printers and Faxes" folder.
>>>> Right click, choose Server Properties.
>>>> Go into the Drivers tab and add the driver, just like as if it was a
>>>> Windows server.
>>> hint: look at the subject (installing printer in a script).
>>> it has to be done *fully* automatically, there is no place for going 
>>> there and clicking here.
>> You need to do this to install the server copy of the printer 
>> driver.  When you run your rundll command with the /in flag, it looks 
>> for the driver as it has been installed using (more or less) the 
>> procedure above.  This is how it's done, not with what you said about 
>> 'putting the driver in /blah/X32HP200C'.  When you do the install 
>> command from a login script there is no 'going there and clicking 
>> here', just a status box that disappears all by itself.
> No, it doesn't disappear by itself, even if I'm logged into a domain.
> I agree, if the driver was installed *before* - now Windows knows that 
> it has it.
> But if it's installed for the *first* time, I have this window prompt.

It really sounds like you're not understanding what we're telling you.  
You need to store the printer driver on the samba server so that when 
you issue the rundll command, with the /in switch, your client knows 
what you're talking about.  To do this, go to a windows machine that is 
already on your network, try your personal station, seems to work well 
for me.  Follow through the part that I sent the address to.  Really.  
When you are done, you should be able to run (from your server)
rpcclient servername
and then once logged in do an enumdrivers and see them listed.  You 
should also be able to do an enumprinters and see more interesting 
information.  If these commands don't work, stop and re-examine your 
setup.  Any number of things could be wrong so perhaps tell us what you 
get from those commands.

When you are done, you should be able to walk over to any machine, issue 
your rundll command from the command line and all that will happen is 
that a box will come up saying that it is installing the printer <name> 
from <host> (or possibly the ip depending on your version of samba) and 
it should just go away.  Now if you're using 3.0.7 (I believe) there is 
a known bug in these routines that will cause some issue with your 
naming.  You'll have to play around with your rundll command and the 
printer names to get it right.  If you get here, post your enumprinters 
and enumdrivers output from above and maybe a valid statement can be 
made for you.

Paul Gienger                    Office: 701-281-1884
Applied Engineering Inc.
Systems Architect               Fax:    701-281-1322
URL: www.ae-solutions.com       mailto: pgienger at ae-solutions.com

More information about the samba mailing list