WshNetwork.EnumPrinterConnections

The EnumPrinterConnections method returns the current network drive mappings as a WshCollection object. Items in this collection are local names and remote names.

Syntax

WshNetwork.EnumPrinterConnections = objWshCollection
 

Example

Set WshNetwork = Wscript.CreateObject("Wscript.Network")
Set oPrinters = WshNetwork.EnumPrinterConnections

Wscript.Echo oPrinters.Item(0) = "LPT1:"
Wscript.Echo oPrinters.Item(1) \\Server\Printer1"

See Also

WshNetwork.AddPrinterConnection method, WshNetwork.RemovePrinterConnection method, WshCollection object