Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for login_set_default_printer.vbs

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

  1. Set wshNetwork = CreateObject( "WScript.Network" )
  2. On Error Resume Next
  3. wshNetwork.SetDefaultPrinter "\\Server\HP LaserJet 4"
  4. If Err Then
  5. 	WScript.Echo "Error " & Err.Number & " while trying to make HP LaserJet 4 the default printer"
  6. 	WScript.Echo "(" & Err.Description & ")"
  7. End If
  8. On Error Goto 0
  9. Set wshNetwork = Nothing

page last uploaded: 2021-01-27