Tuesday, January 25, 2022

Adding printers - vbs script

 'CREATE NETWORK OBJECTS
Set mWSHNetwork = CreateObject("WScript.Network")
Set mExisitingMappedDrives = mWSHNetwork.EnumNetworkDrives
Set existingPrinters = mWSHNetwork.EnumPrinterConnections
Set mFileSystemObject = CreateObject("Scripting.FileSystemObject")
Set objExplorer = CreateObject("InternetExplorer.Application")
 

'PRINTERS (Ex. "\\<print server name>\<Queue Name>)
defaultPrinters = "\\<print server name>\Canon iR5000 - FC2 Left;
\\<print server name>\Canon iR5070 - Right;
\\<print server name>\RICOH MP 6001 Breakroom;
\\<print server name>\Canon iR5070 - NJ;
\\<print server name>\RICOH  MP 6001 Sales;
\\<print server name>\RICOH  MP 6001 Referral;
\\<print server name>\RICOH Aficio MP 6000 - Litigation Area "

' Printers.vbs - Windows Logon Script.
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection "\\gmi_proxy\fgoods4050"