| |
NAVPET
Posts: 2
Score: 0
Joined: 10/14/2005
Status: offline
|
The following code gives me a generic failure on line 25... I have no idea where im going wrong with this script...I think its not finding the driver on the server. the path of the server is fine....please help strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") set objDriver = objWMIService.Get("Win32_PrinterDriver") 'objDriver.SupportedPlatform = "Windows NT x86" 'objDriver.Version = "3" 'objDriverPath = "\\fs\Printers\" objDriver.Name = "OKI C5300(PCL)" objInfname = "\\fs\Printers\ok715.inf" intResult = objDriver.AddPrinterDriver(objDriver) Wscript.Echo intResult Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_ objPrinter.DriverName = "OKI C5300(PCL)" objPrinter.PortName = "IP_10.10.96.60" objPrinter.DeviceID = "OKI C5300(PCL)" objPrinter.Location = "Printer Location" objPrinter.Network = True objPrinter.Shared = False objPrinter.Put_ Set objNewPort = objWMIService.Get _ ("Win32_TCPIPPrinterPort").SpawnInstance_ objNewPort.Name = "IP_10.10.96.60" objNewPort.Protocol = 1 objNewPort.HostAddress = "10.10.96.60" objNewPort.PortNumber = "9100" objNewPort.SNMPEnabled = False objNewPort.Put_
|
|