Set wshNetwork = CreateObject( "WScript.Network" ) On Error Resume Next wshNetwork.AddPrinterConnection "LPT1", "\\Server\HPLJ4", False If Err Then WScript.Echo "Error " & Err.Number & " while trying to connect to HPLJ4" WScript.Echo "(" & Err.Description & ")" End If On Error Goto 0 Set wshNetwork = Nothing