On Error Resume Next
Dim objNetwork, objPrinter
Set objNetwork = CreateObject("Wscript.Network")
objPrinter=inputbox("Please type the name of the printer: ", "Install Printer", "\\PrinterServer\Printer001")
objNetwork.AddWindowsPrinterConnection objPrinter
'MsgBox err.number
If err.number=70 Then
msgbox "You are not authenticated to the print server. You need to run PrinterServerConnect", 16, "Printer Not Installed"
err.clear
ElseIf err.number=-2147023095 Then
msgbox "Print queue name is invalid: " & objPrinter, 16, "Printer Not Installed"
err.clear
ElseIf err.number=0 Then
msgbox "You can select the printer " & objPrinter & " from the print menu", 64, "Printer Installed"
err.clear
End If
set objNetwork=nothing
set oWshShell=nothing
1 comment:
supreme shirt
steph curry shoes
golden goose shoes
golden goose
golden goose outlet
offwhite
kd 12 shoes
moncler
off white
golden goose outlet
Post a Comment