On Error Resume Next
strComputer = "."
' Set objWMIService = GetObject("winmgmts:" _
' & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")
strPrintServer = "\\agco_haedo\p07"
If strPrintServer = ("\\agco_haedo\p07") Then
objNetwork.RemovePrinterConnection ("\\servidor\recursocompartido")
objNetwork.AddWindowsPrinterConnection ("\\servidor\recursocompartido")
End If
' Repeat above five (5) lines for each printer
No hay comentarios:
Publicar un comentario