How can one modify the Win32_TCPIPPrinterPort.Queue element's MaxLen attribute from 32 to 64 characters?

When attempting to define a printer port in Windows to use the 'lpr' protocol (Win32_TCPIPPrinterPort.Protocol=2), an lpd queue name must be provided (Win32_TCPIPPrinterPort.Queue). Logically (rationally, realistically!) one would expect this element's MaxLen attribute value to be identical to that of the Win32_Printer.Name (or .DeviceId) element but, incredibly, it is not.

I must be able to define Windows printer ports with (lpd) queue names that are identical to their associated printer names which, in the Windows IT environment I must work with, are often longer than 32 characters. Can anyone provide the magic sauce? Thanks.



May 22nd, 2015 7:17pm

Use the share names for the printers rather than the printer names.

No one has touched the WMI provider code Since Windows Vista.  If you have Widows 8 use Powershell Add-PrinterPort. 

The commands have been supported for the past 3 years.

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 2:25am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics