Heres a script for creating printer ports import win32com.client WBEM = win32com.client.GetObject(r"winmgmts:{impersonationLevel=impersonate}!\\" + "." + r"\root\cimv2") printer = WBEM.Get("Win32_Printer").SpawnInstance_() printer.Properties_('DeviceID').Value = 'myprinter' printer.Properties_('DriverName').Value = 'HP 2000C' printer.Properties_('Location').Value = 'myoffice' printer.Properties_('Network').Value = 'True' printer.Properties_('Shared').Value = 'True' printer.Properties_('ShareName').Value = 'myprintershare' printer.Properties_('PortName').Value = 'IP_169.254.110.14' printer.Put_()
-- http://mail.python.org/mailman/listinfo/python-list