I'm trying to run the following script and keep gettin this error...Microsoft VBScript runtime error: Object required: '[string: "..."]'It happens on line three. Please help!
Dim objnetwork
Set objNetwork = WScript.CreateObject("WScript.Network")
Set strComputer= objNetwork.ComputerName
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & objNetwork.ComputerName )
set objNewPort = objWMIService.get("Win32_TCPIPPrinterPort").SpawnInstance_
Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_
objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True
Set objDriver = objWMIService.Get("Win32_PrinterDriver")
objDriver.Name = "HP LaserJet P3005 PCL 6"
objDriver.SupportedPlatform = "Windows NT x86"
objDriver.Version = "3"
objDriver.FilePath = "V:\SETUP\Printers\HP LaserJet P3005 PCL 6"
objDriver.Infname = "V:\SETUP\Printers\HP LaserJet P3005 PCL 6\hpzipa13.inf"
intResult = objDriver.AddPrinterDriver(objDriver)
'Installs Printer Port
objNewPort.Name = "..."
objNewPort.Protocol = 1
objNewPort.HostAddress = "..."
objNewPort.PortNumber = 9999
objNewPort.SNMPEnabled = True
objNewPort.Put_
'Install Printer
objPrinter.DriverName = "HP LaserJet P3005 PCL 6"
objPrinter.PortName = "..."
objPrinter.DeviceID = "..."
objPrinter.Location = ""
objPrinter.Network = True
objPrinter.Put_
Dim objnetwork
Set objNetwork = WScript.CreateObject("WScript.Network")
Set strComputer= objNetwork.ComputerName
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & objNetwork.ComputerName )
set objNewPort = objWMIService.get("Win32_TCPIPPrinterPort").SpawnInstance_
Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_
objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True
Set objDriver = objWMIService.Get("Win32_PrinterDriver")
objDriver.Name = "HP LaserJet P3005 PCL 6"
objDriver.SupportedPlatform = "Windows NT x86"
objDriver.Version = "3"
objDriver.FilePath = "V:\SETUP\Printers\HP LaserJet P3005 PCL 6"
objDriver.Infname = "V:\SETUP\Printers\HP LaserJet P3005 PCL 6\hpzipa13.inf"
intResult = objDriver.AddPrinterDriver(objDriver)
'Installs Printer Port
objNewPort.Name = "..."
objNewPort.Protocol = 1
objNewPort.HostAddress = "..."
objNewPort.PortNumber = 9999
objNewPort.SNMPEnabled = True
objNewPort.Put_
'Install Printer
objPrinter.DriverName = "HP LaserJet P3005 PCL 6"
objPrinter.PortName = "..."
objPrinter.DeviceID = "..."
objPrinter.Location = ""
objPrinter.Network = True
objPrinter.Put_