Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for login_connect_network_printer.vbs

(view source code of login_connect_network_printer.vbs as plain text)

  1. Set wshNetwork = CreateObject( "WScript.Network" )
  2. On Error Resume Next
  3. wshnetwork.AddWindowsPrinterConnection "\\CompanyServer\LaserJet Marketing"
  4. If Err Then
  5. 	WScript.Echo "Error " & Err.Number & " while trying to connect to LaserJet Marketing"
  6. 	WScript.Echo "(" & Err.Description & ")"
  7. End If
  8. On Error Goto 0
  9. Set wshNetwork = Nothing

page last modified: 2024-04-16; loaded in 0.0065 seconds