Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for login_disconnect_network_printer.vbs

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

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

page last uploaded: 2021-01-27, 16:12