RE: Script to add TCPIP Printer

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Well I found some help but now to get them to work together

to add the port
-------------------------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewPort = objWMIService.Get _
("Win32_TCPIPPrinterPort").SpawnInstance_

objNewPort.Name = "IP_169.254.110.14"
objNewPort.Protocol = 1
objNewPort.HostAddress = "169.254.110.14"
objNewPort.PortNumber = "9999"
objNewPort.SNMPEnabled = False
objNewPort.Put_


-----------------------------------------------------------------
To add the driver
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set objDriver = objWMIService.Get("Win32_PrinterDriver")
objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True

objDriver.Name = "Apple LaserWriter 8500"
objDriver.SupportedPlatform = "Windows NT x86"
objDriver.Version = "3"
errResult = objDriver.AddPrinterDriver(objDriver)

----------------------------------------------------------------------

But now I need to figure out how to map the printer with the driver



"sfleck" wrote:

Hello i am looking for a script to Add Tcpip printer

currently I create the port for it under local printer

will need to run on xp thanks
.



Relevant Pages

  • Re: Vista does not discover printer
    ... Now choose 'Create New Port'. ... It will now ask to either use the installed driver, ... If, at 11, you can't pick up the required drivers on your pc then first install the printer as a local printer to an existing port. ... My problem is that when Vista searches, ...
    (microsoft.public.windows.vista.print_fax_scan)
  • Re: Networked HP deskjet 9650 and Vista 64
    ... I am having issues with my hp deskjet 9650 and Vista 64. ... driver comes bundled with vista and is not available on the HP site. ... Choose Add a local printer. ... Click on Create a new port. ...
    (microsoft.public.windows.vista.print_fax_scan)
  • RE: missing Microsoft Office Document Image Writer print driver
    ... select local printer attached (Microsoft won't find ... In the port option select Microsoft Document Image printer writer port ... Click on ports and select "Microsoft office document imaging driver ...
    (microsoft.public.office.misc)
  • Re: Remote descktop automatic printing
    ... The driver for the local printer must be available at the host in order to ... If the port is being redirected, but the driver is not available, ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: Seagate Barracuda 160 GB IDE becomes corrupted. RMA?
    ... Operating System Microsoft Windows 2000 Professional ... System Memory 512 MB ... Communication Port Communications Port ... Driver Download http://www.viaarena.com/?PageID=2 ...
    (comp.sys.ibm.pc.hardware.storage)