RE: Script to add TCPIP Printer
- From: sfleck <sfleck@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 2 Oct 2008 15:05:00 -0700
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
- References:
- Script to add TCPIP Printer
- From: sfleck
- Script to add TCPIP Printer
- Prev by Date: Script to map TCPIP printerfor Users
- Next by Date: Location of personal folder in Outlook with VBS
- Previous by thread: Script to add TCPIP Printer
- Next by thread: Script to map TCPIP printerfor Users
- Index(es):
Relevant Pages
|