I have a VBScript that is supposed to create a local TCP/IP printer port and then create a printer on that port. Here is my script...
When I run this file, I get an error message on the script saying "Expected end of statement" in line 13 char 14. Can anyone help me get my script working?
Many thanks.
SK
Code:
strComputer = "localhost"
INFSource = "C:\Drivers\IBM\Printers\Drivers\Print\Win_2KXP\GNUD0640.inf"
DriverType = "IBM Infoprint 1000 Series"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set WSHShell = CreateObject("WScript.Shell")
Set objNewPort = objWMIService.Get("Win32_TCPIPPrinterPort").SpawnInstance_
objNewPort.Name = "Port_Q990XPFP10"
objNewPort.Protocol = 1
objNewPort.HostAddress = "10.1.0.10"
objNewPort.PortNumber = "9100"
objNewPort.Put _
WSHShell.run "rundll32 printui.dll,PrintUIEntry /if /b Q990XPFP10 /f INFSource /r Port_Q990XPFP10 /m DriverType"
When I run this file, I get an error message on the script saying "Expected end of statement" in line 13 char 14. Can anyone help me get my script working?
Many thanks.
SK