Home NT WSH
WshNetwork.AddWindowsPrinterConnection

MAP a Network (remote) Printer

Syntax 
      myObject.AddWindowsPrinterConnection(strLocalName UNC_Printer_Name)


Example

   Dim net
   Set net = CreateObject("WScript.Network")    
   net.AddWindowsPrinterConnection "\\ServerName\PrinterName"

or
   net.AddWindowsPrinterConnection "LPT1", "\\ServerName\PrinterName"

"God made everything out of nothing, but the nothingness shows through" - Paul Valery

Related commands:

Printer, add printer - WshNetwork.AddPrinterConnection

Equivalent Windows NT command:

NET VIEW - to view a list of printers
NET PRINT - View and Delete print jobs
PRNCNFG - Display, configure or rename a printer
PRNDRVR - Add, delete or list printer drivers.
PRNMNGR - Add, delete, or list printers / connections, set the default printer.



Back to the Top

Simon Sheppard
SS64.com