[Samba] windows print migrator + "add printer command"

Gerald (Jerry) Carter jerry at samba.org
Thu Jan 12 15:39:51 GMT 2006

Hash: SHA1

Martin Zielinski wrote:

> 1st, the add_printer_hook is called by a "update_printer" function.
> This function is called really frequently.
> Using an add printer command and not commenting this line out of the
> samba code slowed down everything in a massive way.

ot really.  We only call the add printer script on a SetPriter()
when only when on of the fields passed to the script has changed.
Not when device mode, printer data, or a security descriptor is
changed.  It's been like this for years now.

> 2nd, (and the true reason) - the add printer command is not really
> functional without port handling.
> E.g. CUPS wants a device uri like "socket://" to know
> the destination of the printjob.
> You could use the "location" or "description" in the add printer wizard
> as a workaround. But that's not really a nice way.

Do you have any suggestions on how to better handle this?
I've considered reworking Samba's printer ports.  But the Win32
api doesn't allow for adding ports remotely (except via the
registry).  There's supposedly an IOCTL for the spooler api
but I've not dug into it.  Metze mentioned something several
months ago.

> So to make your "lpadmin option1 ..." line really functional, 
> you'll also need an "enumports comand" and the ability to
> create new ports and keep them in sync with the cups printers.

cheers, jerry
Alleviating the pain of Windows(tm)      ------- http://www.samba.org
Centeris                         -----------  http://www.centeris.com
"There's an anonymous coward in all of us."               --anonymous
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the samba mailing list