我在Windows 7上映射打印机的脚本失败并显示错误800703F0
,而在Windows XP上运行的相同脚本没有问题。
怎么了?
Impresora01 = "\\mistral\Piso 2 Sucursal 958 Lexmark MX711"
ImpresoraDATACARD = "DATA"
Call Agregar_Impresora()
WScript.Quit 0
Sub Agregar_Impresora()
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection Impresora01
WshNetwork.SetDefaultPrinter Impresora01
For i=1 To WshNetwork.EnumPrinterConnections.Count -1 Step 2
if left(WshNetwork.EnumPrinterConnections(i),4) = impresoraDATACARD Then
WshNetwork.SetDefaultPrinter WshNetwork.EnumPrinterConnections(i)
End If
Next
Set WshNetwork=nothing
End Sub`