Automatic Windows printer creation?

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Jan 20 04:26:24 EST 2005


[Roger Upole]
| 
| You can probably do it through WMI.  (class is Win32_Printer)
| WMI works well with win32com, and there's also a wrapper module
| 
| http://tgolden.sc.sabren.com/python/wmi.html
| 
| for simplified access.
| I imagine getting all the device parameters and port
| configuration right will be messy, though.
| 

And here's a handy link (warning: long URL):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/
wmi_tasks__printers_and_printing.asp

(I got that by googling for Win32_Printer and
then for AddPrinterConnection).

But... you'd better be using XP or 2K3 because,
almost comically, each of the examples is prefixed
by a "<method to be used> does not work on Windows 2000,
Windows NT, Windows 98, Windows 95".

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list