Reader to Reader - 17 Dec 1999

\[Editor's Note: Email your scripting solutions (400 words or less) to Reader to Reader at [email protected] Please include your script and phone number. We'll edit submissions for style, grammar, and length. If we print your contribution, you receive $100.\]

Microsoft has taken another baby step toward fixing the bugs with the printer methods in Windows Scripting Host (WSH) 2.0. Microsoft added the AddWindowsPrinterConnection method to connect Windows NT printers. In addition, Microsoft fixed the EnumPrinterConnections method so that the method now includes all Windows printers and printers that connect to LPT devices.

However, Microsoft didn't fix the RemovePrinterConnection method. This method still doesn't work on Windows printers in an NT network. You can't look to Microsoft's Windows Management Instrumentation (WMI) for a workaround because you can't use this API to add or remove printers.

Fortunately, other sources offer COM objects to support printer connections. For example, WshPrint is a free COM object that includes a full set of methods for adding, removing, and enumerating printer connections. You can find WshPrint and other useful scriptable COM objects at

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.