Archive for the ‘Sample Code – WScript.Network’ Category


Enumerate Printers – WshNetwork

‘=============================================================== ‘ ‘ NAME: EnumPrinters01.vbs ‘ ‘ AUTHOR: Neal Walters ‘ DATE : 2/27/2005 ‘ ‘ http://VBScript-Training.com ‘=============================================================== Set WshNetwork = WScript.CreateObject(“WScript.Network”) Set oDrives = WshNetwork.EnumNetworkDrives Set oPrinters = WshNetwork.EnumPrinterConnections WScript.Echo “Network drive mappings:” For i = 0 to oDrives.Count – 1 Step 2 WScript.Echo “Drive ” & oDrives.Item(i) & ” = ” & oDrives.Item(i+1) [...]

Read More...