

- #VBSCRIPT PRINT TO PRINTER HOW TO#
- #VBSCRIPT PRINT TO PRINTER PASSWORD#
- #VBSCRIPT PRINT TO PRINTER WINDOWS#
This method provides ability to establish connection to MS-DOS printer connection.
#VBSCRIPT PRINT TO PRINTER WINDOWS#
Set collectionofPrinter=WSHNet.EnumPrinterCollectionsĪddPrinterConnection() method is used to setup printer connection to remote non windows printers. Elements get added to the array in pair as printer and port. This collection is an indexed array(index starting from zero).

Syntax of EnumPrinterConnection() method objListofPrinters=WSHNetwork.EnumPrinterConnectionĮnumPrinterConnection() method returns a collection of printer objects. The WSHNetwork object provides EnumPrinterConnection() method to get information about all current printers connected over a particular network. WSHNet.RemoveNetworkDrive "L" Network Printer Enumerating Network Printer

RemoveNetworkDrive() method removes a shared network drive from the computer system. Note- An attempt to map a nonshared network drive will generate an error. Here D drive is shared over the network and mapped. WSHNet.MepNetworkDrive "L","MyFileServer\D" Set WSHNet= WScript.CreateObject("WScript.Network")
#VBSCRIPT PRINT TO PRINTER PASSWORD#
#VBSCRIPT PRINT TO PRINTER HOW TO#
UNC stands for Universal Naming Convention How to map connection to network drives?

The first item in the collection is always in the index-0. Hence we need to iterate over it to get individual items. MyObjDriveList=MyWSHNetwork.EnumNetworkDrivesĮnumNetworkDrives() return a collection. We can use the WSHNEtwork object’s EnumNetworkDrives() method to retrieve information about the connections on the mapped network drive connections. Msgbox "ComputerName" & MyWSHNetwork.ComputerName EnumNetworkDrives() Msgbox "UserDomain" & MyWSHNetwork.UserDomain Msgbox "UserName" & MyWSHNetwork.UserName Set MyWSHNetwork= WScript.CreateObject("WScript.Network")
